Basic Computing Information
for Statistics Graduate Students, Faculty, and Staff
For general help with your accounts or hardware
or software that will not start properly, e-mail
help@stat.sc.edu.
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!
Questions by students concerning the acquisition of new software or hardware should be directed to Georgie Baker, the graduate coordinator.
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 Kerrie Nelson, 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 bringing a ream of printer paper (500 sheets, about $4 if you shop around) to Alfred 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 Helen Chen in room 127C.
If Helen is not in, and it is an emergency, see
Alfred McNulty in room 415.
If Alfred is not in, and it is an emergency,
see Minna Moore in room
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 www.r-project.org [At home, after reading the instructions!, choose: CRAN, then Windows (95 and later), then base, then SetupR.exe].
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.
ex3<-c(0,2,1,2,3,4)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.
mean(ex3) ex3[3] sort(ex3) qqnorm(ex3) qqline(ex3)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.
edf<-function(y){
x<-sort(y)
plot(c(min(x)-1,max(x)+1),c(0,1),type="n",xlab="x",ylab="p")
lines(c(x[1]-1,x[1]),c(0,0),lty=1)
lines(c(x[1],x[1]),c(0,1/length(x)),lty=2)
for (i in 1:(length(x)-1)){
lines(c(x[i],x[i+1]),c(i/length(x),i/length(x)),lty=1)
lines(c(x[i+1],x[i+1]),c(i/length(x),(i+1)/length(x)),lty=2)}
lines(c(x[length(x)],x[length(x)]+1),c(1,1),lty=1)
}
edf(ex3)
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.
x<-rnorm(10,mean=0,sd=1) y<-rchisq(30,df=10) par(mfrow=c(2,1)) edf(x) edf(y)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
http://cran.r-project.org/bin/windows/contrib/1.9/
and choose tree_1.0-18.zip
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 "tree_1.0-18.zip"
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
library(tree,lib.loc="z:/") library(help=tree,lib.loc="z:/")The following commands will perform a regression tree analysis on a portion of the Bumpus sparrow data:
bumpus2<-read.table("http://www.stat.sc.edu/~habing/courses/data/bumpus2.txt",header=TRUE)
library(MASS)
bumpus2[,1]<-as.factor(bumpus2[,1])
b.tr<-tree(survive~length+alar+weight+lbh+lhum+lfem+ltibio+wskull+lkeel,bumpus2)
summary(b.tr)
plot(b.tr)
text(b.tr)
predict.tree(b.tr)
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:
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 help@stat.sc.edu and asking them to install it on your PC using the instructions at http://www.stat.sc.edu/~habing/courses/740/mingw.html. Make sure to tell them your room number and computer name (e.g. LC084 or whatever).
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.
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:
| caldas.math.sc.edu |
| cartago.math.sc.edu |
| cauca.math.sc.edu |
| coban.math.sc.edu |
| cucata.math.sc.edu |
| ibague.math.sc.edu |
| jalapa.math.sc.edu |
| java.math.sc.edu |
| kona.math.sc.edu |
| ocana.math.sc.edu |
| mabuni.math.sc.edu |
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:
Now if you do something that should call up a graphics window, it will appear on your PC screen. Try typing xv for example.
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 pname | runs the program called pname in nice mode |
| man commandname | opens 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 file2.ps to convert it to a ps file first.
Six of the printers are:
| lex69 | Room 219, this is one of your primary printer and you have a key to this room. |
| lex54 | Room 127, this is another of your primary printers and you have a keey to this room. |
| lex4 | Room 124 (locked after hours) |
| lex3 | Room 303A (locked after hours) |
| lex70 | Room 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:
You have two e-mail accounts at the University of South Carolina. One of them is your departmental account which will have the address: yourunixlogin@stat.sc.edu. You also have a University web-mail account (GEM=Gamecock E-mail) at: yourviplogin@mailbox.sc.edu.
You are responsible for checking both of these accounts.
The recommended course of action for students is to choose a single way of getting your e-mail through the web. This could be the GEM interface or a previously owned account through hotmail, AOL, Yahoo, etc... (Faculty and Staff can e-mail help@stat.sc.edu to have a copy of Eudora installed on their machine. This will not be done for students who are more likely to switch computers and offices, and who are less likely to have a strictly private machine.)
For any of these web-based systems you will need to set it so that your Unix e-mail account with the department forwards correctly. To do this, use secure shell to login to your home directory (hit cd to make sure), type vi .forward, ( forward preceded by a period and no space), type in the name of the address you want your mail to go to, hit the "escape" key and then type :wq. Your e-mail will no longer be readable through any means except the account you are forwarding it to, and a copy will not be saved on our Unix server.
Your GEM account uses the network login name and password you get under the TECHNOLOGY link at VIP. If you are not using GEM, you will also need to set that up to forward to the account you are using. The instructions for doing this are at the Gamecock e-mail FAQ. If you are using the GEM system, but would rather use your @stat.sc.edu address because it looks better, you can set GEM so that your outgoing mail uses that address.
Setting up a vacation message: The following is
only for those who are not forwarding all of there mail to a web-based
account. To set up an
automatic reply message from your Unix account, simply type the word
vacation into a
prompt while at your unix home directory. Then follow the instructions.
It will send out the message you give it _once_ to each _address_ that
sends you a message while you are away. Make sure to turn this off
when you get back!
For Eudora users, note that you have to leave your PC and copy of Eudora
on if you want to use Eudora's built in vacation message. Only use one or
the other... don't use both the unix one and the eudora one.
The department web pages reside on our Unix machines, and your personal/class
web-page is stored in your Unix account.
To set up your first web page,
you need to make the appropriate
directory for it in Unix.
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:
For those not used to dealing with Unix the easiest way to put this
page on-line 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:
Automatic Index Files: If you just enter a
web-address for a directory into your web-browser
(say http://www.stat.sc.edu/~habing/courses/)
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
dirindex
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.
Dissertation Style Files
Some Helpful LaTeX Sites
The following are a few recommendations for those who are new to LaTeX:
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:
http://www.stat.sc.edu/~yourloginname
or http://www.stat.sc.edu/~yourloginname/index.html
<HTML>
<HEAD>
<TITLE>Your Name Here's Homepage</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
Under Construction!!
<P>
<HR>
<CENTER><I>
This page (
<A href="http://www.stat.sc.edu/~yourloginname/index.html">
www.stat.sc.edu/~yourloginname/index.html
</A>
) is maintained by yourname (
<A href="mailto:yourloginname@stat.sc.edu">
yourloginname@stat.sc.edu
</A>
). <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.
</I></CENTER>
<HR>
<P> <P> <P> <P>
</BODY>
</HTML>
<img src="http://www.stat.sc.edu/~yourname/imgname">
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.
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:
Last updated April 18, 2007