 |

Transferring an S-PLUS file into a SAS file
- 1) In the S-PLUS file,
- write.table(tdat,file="test.dat",dimnames.write=F,sep=" ")
-
- where tdat is the name of the Splus dataframe, and
test.dat is the file where you will write the ascii values
-
- 2) In the SAS file,
- filename test '/p/username/project_directory/test.dat';
- data test;
- infile test;
- input variable1 variable2;
- run;
Creating color plots in S-PLUS
To get color on plots from S-PLUS, you need to do 3 things:
- Include at the bottom of the program in which you make the plots
the following lines:
ps.options.send(colors=xgetrgb('lines'),
background=xgetrgb('background'),
image.colors=xgetrgb('images'))
- In your S-PLUS graphics window (which you could start by typing
motif() ), under options, color scheme, define a new color scheme and
put in colors you want. For example, I have a color scheme called
SallyPropser, where the background is black (I have to type in black
in the background box), and the other colors are: white yellow red
magenta blue green cyan (I type in this list in each of the other
places, e.g. for lines, text, polygons, and images). This means if
you say something like "abline(... col=2)", the color will be yellow
because this is the second color in your list of colors under the
lines part. This color scheme works well for pdf files which you
might display via computer. For postscript files I use a different
color scheme with a white background.
- In your S-PLUS program, you specify col= whenever you want a
different color than the first color in your list. I have white as my
first color everywhere (with the black background) so if I don't
specify a color it will be white. Here is an example:
par(mfrow=c(2,3),mar=c(4.1,5.1,4.1,2.1),oma=c(0,0,5,0))
plot(y=snovelty[hi.non==1],x=logspcb[hi.non==1],xlab="",ylab="",cex=1.2)
title("Hi SES, BF=N",cex=0.8)
abline(ttt$coef["hi.non"],ttt$coef["hi.non:logspcb"],col=2,lwd=3)
plot(y=snovelty[hi.st==1],x=logspcb[hi.st==1],xlab="",ylab="",cex=1.2)
title("Hi SES, BF=S",cex=0.8)
abline(ttt$coef["hi.st"],ttt$coef["hi.st:logspcb"],col=6,lwd=3)
mtext("Novelty fixation (%) vs log(serum PCB)",side=3,outer=T,line=0,cex=2)
Please send your comments and suggestions
about this web page to C. Brower
(brower@bst.rochester.edu)
Back to top
|