[R] sas.get problem
jrkrideau at yahoo.ca
Wed Apr 11 16:17:28 CEST 2007
--- Cody_Hamilton at Edwards.com wrote:
> According to the sas.get documentation, the format
> library option must
> specify the directory containing the file
> formats.sct (I don't think it can
> be a sas dataset).
Ah yes. I think I had it in one attempt and then
decided I had misread the documentation.
> Also, do you need a forward slash after C: in the
>sasprog option below?
Yes. It was correct in the orginal program but I got a
typo then sticking it in the posting. I have
corrected it. Thanks
Finally, sas may not like the
> period in the file
> name form.ea1 (it will read 'form' as the libname) -
> can you rename the
Just tried it. I had originally renamed them from
form_ea1 etc because I did not trust the " _ " .
I was a bit too groggy yesterday to understand the
warning about the format file . I now have it renamed
'format.sas7dbat' which R, or SAS, is telling me
cannot be found.
So far I have cleaned up all of this with no luck.
Now, on to Tim's hack!
Thanks for all the help.
> I have 3 SAS files all in the directory F:/sas, two
> data files
> and a format file :
> F is a USB.
> I am trying import them to R using "sas.get".
> I have not used SAS since I was downloading data
> and having to write JCL. I had forgotten how
> SAS can be.
> I currently have not even figured out how to load
> files into SAS but
> they look fine since I can import them with no
> into SPSS.
> I am using R2.4.1 under Windows XP
> SAS files were created with SAS 9.x
> They convert easily into SPSS 14
> n the example below I have tried various versions of
> the file names with
> with no luck.
> Can anyone suggest some approach(s) that I might
> mydata <- sas.get(library="F:/sas", mem="form.ea1",
> sasprog = '"C:Program Files/SAS/SAS
> Error message (one of several that I have gotten
> while trying various things.)
> The filename, directory name, or volume label syntax
> is incorrect.
> Error in sas.get(library = "F:/sas", mem =
> format.library = "sas.fmts.sas7bdat", :
> SAS job failed with status 1
> In addition: Warning messages:
> 1: sas.fmts.sas7bdat/formats.sc? or formats.sas7bcat
> not found. Formatting ignored.
> in: sas.get(library = "F:/sas", mem = "form.ea1",
> format.library = "sas.fmts.sas7bdat",
> 2: 'cmd' execution failed with error code 1 in:
> shell(cmd, wait = TRUE, intern = output)
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained,
> reproducible code.
More information about the R-help