sas.contents(library, member, keep.log=T, log.file="_temp_.log", macro="sas_vars", macro.dir=<<see below>>, clean.up=T, quiet=F, temp=tempfile("SaS"))
FALSE
, we delete the SAS log file after extracting
the information from SAS.
TRUE
, all temporary files are removed upon finishing.
You may want to keep these while debugging the SAS macro.
FALSE
, print the contents of the SAS log file if
there has been an error.
"n"
will be the number of observations in the dataset.
quiet
is
FALSE
, then the SAS log file will be
printed under the control of the less pager.
You must be able to run SAS (by typing sas from the Bourne shell)
on your system.
If the S-PLUS command
unix("sas", out=F)
does not start SAS,
then this function cannot work.
In particular, sas should not be a csh alias: the directory containing
the sas command should be in your PATH environmental variable.
The references cited below explain the structure of SAS datasets and how they are stored under UNIX.
SAS Institute Inc. (1988).
SAS\u\s-1\(rg\s+1\d Technical Report P-176,
Using the SAS\u\s-1\(rg\s+1\d System, Release 6.03, under UNIX\u\s-1\(rg\s+1\d Operating Systems and Derivatives.
SAS Institute Inc., Cary, North Carolina.
SAS Institute Inc. (1985).
SAS\u\s-1\(rg\s+1\d Introductory Guide.
Third Edition.
SAS Institute Inc., Cary, North Carolina.
sas.contents("saslib", "mice") sas.contents(lib=unix("echo $HOME/saslib"), mem="mice") [1] "dose " "ld50 " "strain" "lab_no" attr(, "n"): [1] 117 mice <- sas.get(lib=unix("echo $HOME/saslib"), mem="mice", var=c("dose", "strain", "ld50"))