Basic Computing Information
for Statistics Graduate Students, Faculty, and Staff

PCs: Where to Save Files, Basics of R,
       Using R packages on MATHSTAT, Graphics in Word, Copy/Paste from Minitab,
       Fortran 77/C++ Compiler
Secure Shell (SSH): Telnet, File Transfer (FTP), X-windows
Unix: Basic Commands, Printing, emacs, Changing Password
e-mail: Web Based e-mail, Vacation Messages
Web Pages: First Time, Sample Page, Automatic Index Files,
        .pdf files, Helpful Sites
Using the Stat Computing cluster: Instructions on Use of the STAT computering cluster
LaTeX: Dissertation Style Files, Helpful Sites

For general help with your accounts or hardware
or software that will not start properly, e-mail
Do NOT physically track down a computer assistant on your own.

Do not use this address to request help on the particular details of how software packages work!

For some general information about policies for using the computers in LeConte, please see the math computing information page. Some of this pertains more to the math department, but much of it is also applicable to statistics.

Questions by students concerning the acquisition of new software or hardware should be directed to Tim Hanson, the graduate coordinator or David Hitchcock, the computer committee chair.

Questions concerning whether the internet is down for the entire university can generally be answered by logging into the University IT Connection (clicking on "List View" is a bit easier to view).

Comments on this page should be directed to Professor Hitchcock, the computer committee chair.

For the printers on the first and second floor, printer paper is available in the Stat Department office. For printers on the third floor, paper is available in the Math Department office. Graduate student print quotas are reset at the beginning of each semester. If your quota runs out, you can get an additional 100 pages by sending an email request to (You may be asked to bring a ream of printer paper (500 sheets, about $4 if you shop around) to Shawn in room 415.)

If you are using a PC restarting the machine will fix many problems, but obviously don't try that if you have a file that won't save or the like.

If the problem is an emergency requiring immediate attention see Sean Wang in room 204B.
If Sean is not in, and it is an emergency, see Shawn Hagan on the 4th floor.
If Shawn is not in, and it is an emergency, see Jun Zhou in room 415 or 417.
Bothering them in flagrantly non-emergency cases may result in suspension of computer privileges.


In addition to the individual graduate student offices, PCs can be found in rooms 124 and 303A of LeConte during regular business hours. If a staff member arrives to lock the lab at the end of the business day you must leave, NO EXCEPTIONS, including faculty members. You may re-enter later if a faculty member opens the door for you and takes responsibility for the lab. All of these machines will have Microsoft Word, Excel, SAS, Minitab, and R. Half of the PCs in room 102 PSC (Physical Sciences Building) are also equipped with SAS. That lab typically has longer hours.

These machines are on the MATHSTAT domain, and your accounts on these machines are separate from your accounts on the UNIX machines. You will therefore need to remember the possibly different passwords and login names (the MATHSTAT login name will be the same as the one you find under the TECHNOLOGY link at VIP, the password will not necessarily be the same). To get a login screen to appear, if the computer is on, simply hit the Ctrl, Alt, and Delete keys simultaneously (you will need to make sure that the domain is sat to MATHSTAT and not to administrator). This will also let you logout later, or kill any hung programs.

Each account has storage room on the Z drive. In most cases this is where you should store your files. You will generally not have access to installing new software on the machines C drives.

R is a free statistical package based on the same underlying language (S) that S-Plus is. It can be downloaded from [At home, after reading the instructions!, choose: CRAN, then Download R for Windows, then base, then the .exe file].

One of the nice things about the statistical package R (besides the fact that it's powerful and free) is that you can save everything you've done after you've finished each time. Since you don't have access to the C drive on your accounts, you will need to manually load and save the .Rdata file in your Z drive each time you want to start and end the program, respectively.

Once you know the name of a function, you can get help about it simply by typing help(functionname). In R, parentheses indicate either mathematical grouping, like they usually do, or that you are applying a function. Braces [ ] indicate that you are finding an element in a string.

This brief example shows some of R's flexibility.

This first line simply enters a sample data string "ex3". (Why ex3? it needed some name! If you don't like it, choose another.) No output should appear on the screen. Entering the following lines one at a time will give: the mean of x, the third element of x, the values of x in order, a qqplot of x, and the line for the qqplot.
The following code enters a function that draws the empirical distribution function for any string given to it. After a while, you should be able to follow through most of the commands. The type="n" in the first plot command says to just draw the axes and no values. The lines command gives the two x coordinates and then the two y coordinates. The first lines segment goes from 1 less than the smallest x to the smallest x, with the y values not changing at all.
for (i in 1:(length(x)-1)){

We could use this function to compare the edf of a sample of size 10 from normal and one of size 30 from a chi-squared populations.
Help will tell you what rnorm and rchisq do. The row with par tells the computer to disply the output in 2 rows and 1 column.

Some other S-Plus commands are: var, cor, lm, hist, plot, t.test, prop.test, and var.test. There are literally hundreds of others. A good reference is Modern Applied Statistics with S-Plus by Venables and Ripley (published by Springer).

Using R Packages on MATHSTAT: One feature that R has is the ability to download extensions directly from on-line through the Packages menu. The difficulty with using the Install package from CRAN... option in this menu is that you generally will not have appropriate access when you are on a CSM domain computer. (This is not a problem for several of the built in libraries like MASS.... all those listed in the Load package... list.) The following instructions demonstrate how you can install the package tree on your Z drive and then call it up later.

Start up internet explorer and go to the page
and choose

When it asks you what you want to do with the file...
* select "Save this file to disk"
* choose your Z drive and save it there

On the next box that comes up, select "Open Folder" and select ""

It should now automatically open WinZip...
* Choose "Extract"
* Highlight the Z drive so it shows in the window in the upper left
* Extract
* Choose Exit in the File Menu

Following the above commands should put a copy of all the needed code into a directory on your Z drive.
From now on all you need to do to get the trees functions are to use the following two lines

The following commands will perform a regression tree analysis on a portion of the Bumpus sparrow data:


Graphics in Word: It is possible to cut and paste graphics images from programs like SAS, R, and web-stat directly into your Microsoft Word documents. To copy a graphic from R, simply right click on the image and choose "Copy as bitmap". To copy a graphic from SAS, select the desired image and copy it just like it was text in any other program. An image on the screen can always be captured using Ctrl-Alt-PrintScrn. To paste the image into word simply use "Paste" from the "Edit Menu".

To make it so that you can move the image around the page, right click on the image and choose "Format Picture...". Under the "Layout" tab choose "In front of text."

If the fonts in your image (especially from SAS) do not quite look right, right click on the image and choose "Edit Picture" (or "Open" in the "Picture Object" menu). This will open the image up in a new window. Simply choosing "Close Picture" (or "Close & Return" in the "File" menu) will then close the image after automatically adjusting the fonts. This will often correct the problem of SAS images printing out at microscopic size.

Alternative Method of Copy/Paste from Minitab: If you have trouble copying and pasting from Minitab into other applications, follow these steps:

  1. Select the graph you wish to copy, the click on File->Save Graph As
  2. Navigate to where you would like your graph saved
  3. In the Save as type: box, select Windows BMP Color
  4. In the File name: box, name your graph and add .bmp at the end
  5. Click Save
  6. Now, your graph can be inserted into your application. In Word, this is done with Insert->Picture->From File... and then locating your graph where it was saved in the previous step.

Fortan 77 / C++ Compiler: Both Fortran and C compilers are available on our Unix network... but that requires you to use Unix. You can have the MinGW suite installed on your PC by e-mailing and asking them to install it on your PC using the instructions at Make sure to tell them your room number and computer name (e.g. LC084 or whatever).

Secure Shell (SSH)

Secure shell is the program that allows for you to utilize our UNIX network from a PC either here or at home. It replaces the programs Telnet and FTP that we have discontinued supporting.

NOTE: To request a UNIX account, you must email and ask for one. The help staff will provide you with a UNIX username and password.

To telnet, that is, gain Remote Access, to our UNIX system simply start up SSH Secure Shell on the PC you are working at. Hitting the space key will prompt it to give you a dialog box where you can tell it what machine you would like to access remotely. The following machine names should all work:

The "ankola" option is recommended if you are using the SSH from off campus. The "fhat" is recommended if you are using the SSH from on campus.

Note that the first time you try to access a unix machine from a particular PC it will ask you if you want to "save the host key to the local database"... hit Yes.

FTPing a file is the process of moving a file from your UNIX account to your PC account or vice-versa. You might use it to upload things from a PC to your web-page, or to download things from your e-mail on UNIX to your PC.

To FTP a file you again use SSH. Once you start SSH choose New File Transfer from the Window menu. If you have already logged in from the base window then the window that pops up will show your UNIX file directory already. If the window that pops up is all grey, then simply hit the space bar and enter in the requested information.

You choose directories in the file transfer window just as you would in a windows based system. To upload a file from the PC to the UNIX account you can choose Upload under the Operation window and then browse for the file you want. Make sure the right SSH-FTP window shows the directory you want the file to go to though! To download a file from the UNIX account to the PC choose the file in the right SSH-FTP window and select Download under the Operation window. Notice that the operation menu also includes a choice to make new files in your UNIX account as well.

If you open up Explorer (not internet explorer!) or My Computer on the PC at the same time you have SSH-FTP open, you can just select and move files between the two windows without having to choose the upload or download options.

Finally, X-windows is the program you can use to make you PC emulate a UNIX machine. Just using SSH will not allow you to get any of the UNIX graphics routines... and (supposedly) just using X-windows will not let you login to the UNIX system... but using both X-windows and SSH together will.

To do this:

  1. Start the program Xwin32 on the PC (a blue Xicon should appear on the bar at the bottom)
  2. Start the SSH program on the PC, but do not connect with it yet
  3. In the Edit menu in SSH choose Settings.... Choose Tunneling, check the Tunnel X11 connections option, and click OK.
  4. Now hit space and log-in to the computer of your choice

Now if you do something that should call up a graphics window, it will appear on your PC screen. Try typing xv for example.


NOTE: To request a UNIX account, you must email and ask for one. The help staff will provide you with a UNIX username and password.

Our UNIX system runs on the various Sun computers around the department. It hosts the web-server and mail-server, along with fortran and c compilers, S-Plus, and your personal home page. The "public access" unix machines are in rooms 127 and 310 (your key will open the door to room 127). You can also use secure shell (SSH) to connect to them remotely from the PCs in the building. Any programs that take a while to run must be in "nice" mode, or they may be killed (ended).

There are several other sun machines in the building. Your computer privileges will be revoked for running programs on fhat, milo, statman, or urn. It is also inadvisable to run programs on someone's "personal" sun without permission.

Be sure to log-off the machine before leaving. If you are using SSH, you can exit the window by simply typing exit, and then by choosing Exit under the File menu. If you are on a Sun, then go to a blank part of the screen (outside a current window) and use the right mouse button to select Exit.

It is important to remember that UNIX is case sensitive (it matters if you capitalize or not.)

The Math department has a bare-bones Unix page. A simple manual can be found at a Duke University web site.

Basic commands in UNIX
pwd tells you which directory you are currently in
cd puts you back in your home directory
cd .. moves you one directory lower
cd dirname moves you to the directory dirname (usually not called "dirname"!)
ls list the files in the current directory
ls -l list the files, their sizes, and the permissions.
ls -l | more lets you scroll through the list if it is to long to fit on the screen at once (type q to exit)
mkdir dirname makes a directory called dirname
cp f1 f2 copies file 1 to file 2
mv f1 f2 moves file 1 on top of file 2 BE CAREFUL!
rm f1 removes file 1 BE CAREFUL!
top shows you what other processes are running on that machine (type q to exit)
nice -10 pnameruns the program called pname in nice mode
man commandnameopens the help file for commandname

To copy text in unix, simply highlight it with the left mouse button. To paste, simply click the center mouse button (both buttons at the same time from a PC).

Printing The printers are for University work and they should not serve as photo-copiers!!! Over printing of duplicate copies or overprinting of personal documents will result in your printer privileges being revoked.

To print most kinds of documents, you can use the command lp -dprintername filename. So, to print on the printer hp6, the command would be lp -dhp6 filename. Do NOT use this command to print dvi files! For that, use the command dvips file1.dvi to convert it to a ps file first.

Six of the printers are:

lex69Room 219, this is one of your primary printer and you have a key to this room.
lex54Room 127, this is another of your primary printers and you have a keey to this room.
lex4Room 124 (locked after hours)
lex3Room 303A (locked after hours)
lex70Room 209 hallway

lpstat will show you your print jobs in progress. To cancel one of them, type cancel printjob#. For example you might have to type cancel lex4-621 for job 621 on lex4. The lpstat command will give you the name.

To set your default printer, type setenv PRINTER printername (for example setenv PRINTER hp127).

Editing files with emacs: emacs is one of the principle ways to edit a text file (like the ones for your personal web-pages) on Unix. Other possibilities include vi and joe. To open a file using emacs, simply type emacs filename where the filename is the name of your file.

Basic help for this program can be found on the web at the reference card provided by the University of Indiana.

Changing your password in UNIX: The machine libano controls the passwords, and you must be on that machine when changing your password. If you are not logged into that machine, then your password might not change everywhere. As it is, it can take up to an hour for your password to successfully propogate to all of the machines. To change your password, follow the following steps:

  1. Log into your UNIX account on any of the machines
  2. Type rlogin libano and hit return
  3. Type passwd and hit return
  4. Answer the questions, beginning by typing in your current password
  5. Type exit and hit return


Students have a university e-mail account at the University of South Carolina at:

You are responsible for checking this account.

Your university email account uses the network login name and password you get from the University. See for details.

Web Pages

The department web pages reside on our Unix machines, and your personal/class web page is stored in your Unix account.

NOTE: To request a UNIX account, you must email and ask for one. The help staff will provide you with a UNIX username and password.

To set up your first web page, you need to make the appropriate directory for it in Unix.

  1. start up ssh and open your account
  2. cd to make sure you are in your home directory
  3. mkdir public_html to form the directory in which your pages will reside

All of your web-pages will live in this public_html directory. In particular, your home page must be called index.html and will be found at either:

You may put other web pages in your public_html directory, and can even put other directories, graphics files, and .pdf documents in there. Every directory must have its own index.html file in it. If you want people to be able to locate your other files, you must have a link to that file from some index file.

The following is the basic outline for a page:

<TITLE>Your Name Here's Homepage</TITLE>
<BODY bgcolor="#FFFFFF">

Under Construction!!

This page (
<A href="">
) is maintained by yourname (
<A href="">
). <BR>
The views and opinions expressed in this page are strictly those
of the page author.  The contents of the page have not been reviewed or
approved by the University of South Carolina.


For those not used to dealing with Unix the easiest way to put this page online is to first open a copy of "Notepad" in the "Accessories" program sub-menu on your PC. Copy/write the page you would like to have using this program. When saving, simply choose type "All Files" and save it with a .html extension. For this base homepage the name would be index.html. Then use the FTP option in SSH to transfer the file to your public_html directory.

To see what the page looks like before you transfer it, you can view the page in progress using your web browser and the "Open" option under the "File" menu. Simply browse for the location of the page you are looking for. If you are going back to edit the code, just make sure to open the .html file using notepad and not internet explorer or Microsoft Word. The reason to use notepad instead of Word to edit raw html is that it doesn't add anything to the work you've done, and you don't have to close the file before you start using it.

One easy way to see what is involved in the code for a web page that someone else has designed is to use the view-source option on your browser. (On internet explorer it can be found as the "Source" option under the "View" menu.) This is a good way to see how people achieved various effects. It is important to remember that web sites are copyrighted and so you shouldn't just go willy-nilly pirating other peoples code.

If you want to put any images on your page, you will first have to put them into your directory. The easiest way to do this is to use SSH to ftp it there. Remember to put it into the correct directory.

To add an image to your page, you would simply insert the code:
<img src=""> If you wish to put a link to a .pdf file, simply include a reference line like you would to any other web page, but use a .pdf extension.

Automatic Index Files: If you just enter a web-address for a directory into your web-browser (say and there is not an index file already there, then you will get an error. In the past you would have seen a list of _all_ the files in that index (even the ones you might not want people to see).

You can automatically make an index file showing all the file names by going into unix, into the directory you want, and typing the command


BE CAREFUL THAT YOU ARE IN THE CORRECT DIRECTORY!!!! so that you don't accidentally erase an index.html file you wanted to keep.

Adobe Acrobat: can be used to change any Microsoft Word file into a .pdf file. This is done by using Adobe Acrobat distiller, a copy of which is on the PC in room 218.

To do this, simply open up your file in word is as usual. Choose the "Print" option under the "File" menu, but instead of choosing "OK", click on the arrow down at the right side of the printer name. You want to choose "Acrobat Distiller" as your printer. Now simply hit "OK" and wait for the page to come up in acrobat. You can "Save As.." the name you want, and then use FTP Explorer to put it in the appropriate Unix directory.

Some Helpful HTML Sites

STAT Computing Cluster Instructions


Dissertation Style Files
If you decide to write your dissertation in LaTeX, you have to adhere to the USC Dissertation Guidelines. The following files will enable you to write your dissertation that way:

Some Helpful LaTeX Sites The following are a few recommendations for those who are new to LaTeX:

  1. A Beginner's Guide to LaTeX (PDF). A good free introduction to LaTeX with information on installing it on your PC.
  2. Not so Short Introduction to LaTeX (PDF). Another introduction to LaTeX. It has more details on LaTeX markup.
  3. LaTeX Premier. Yet another introduction.
  4. A Guide to Latex. A printed book reference for beginners.
  5. For running LaTeX on your Windows machine, the best options would be to download MikTeX and use WinEdt or WinEdt as editor.
  6. The LaTeX Companion, Second edition. For the advanced user. At over 1000 pages, it covers everything.
  7. The TeX FAQ. The first place to go if you have a question.
  8. Comprehensive TeX Archive Network. The place where all contributed packages are stored. For advanced users only.

Last updated April 18, 2007