[R] sas.get problem
jrkrideau at yahoo.ca
Wed Apr 11 19:56:06 CEST 2007
--- Cody_Hamilton at Edwards.com wrote:
> I believe the format file must have a .sc or
> .sas7bcat file extension (not
> .sas7bdat which is a sas dataset extension). I
> think that's why you're
> getting the error F:/sas/formats.sc? or
> formats.sas7bcat not found.
I looked at that about 4 times and did not see it.
Thanks. That is probably the major problem I am
having getting the files to load in SAS. I knew it was
a format problem but since the format worked with SPSS
I didn't think of that.
> Also, is the carriage return after '"C:/Program in
> the code below caused
> by copying and pasting into the email or is the code
> that way in your
That's a Cut & Paste problem but thanks for catching
Well time to finish lunch and hike back to the
computer lab. I'm beginning to regret being to cheap
to ask for an SAS licence :(
I may get this running today after all. I really
don't want to do a SAS > SPSS > R route. It is a bit
too much like a Rube Goldbeg cartoon.
> John Kane
> <jrkrideau at yahoo.
> Sent by:
> tchur at optusnet.com.au
> r-help-bounces at st
> at.math.ethz.ch R R-help
> <r-help at stat.math.ethz.ch>
> Re: [R]
> sas.get problem
> 04/11/2007 07:41
> --- Tim Churches <tchur at optushome.com.au> wrote:
> > John Kane wrote:
> > > I have 3 SAS files all in the directory F:/sas,
> > two
> > > data files
> > > and a format file :
> > > form.ea1.sas7bdat
> > > form.ea2.sas7bdat
> > > sas.fmts.sas7bdat
> > >
> > > F is a USB.
> > > I am using R2.4.1 under Windows XP
> > > SAS files were created with SAS 9.x
> > > They convert easily into SPSS 14
> > > Example.
> > >
> > > library(Hmisc)
> > > mydata <- sas.get(library="F:/sas",
> > mem="form.ea1",
> > > format.library="sas.fmts.sas7bdat",
> > > sasprog = '"C:Program Files/SAS/SAS
> > > 9.1/sas.exe"')
> > >
> > > Error message (one of several that I have
> > > while trying various things.)
> > > The filename, directory name, or volume label
> > syntax
> > > is incorrect.
> > > Error in sas.get(library = "F:/sas", mem =
> > "form.ea1",
> > > 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 =
> > > format.library = "sas.fmts.sas7bdat",
> > > 2: 'cmd' execution failed with error code 1 in:
> > > shell(cmd, wait = TRUE, intern = output)
> > The sas.get function in the Hmisc library is
> > under Windows.
> > Change line 127 from:
> > status <- sys(paste(shQuote(sasprog),
> > shQuote(sasin), "-log",
> > shQuote(log.file)), output = FALSE)
> > to:
> > status <- system(paste(shQuote(sasprog),
> > shQuote(sasin), "-log",
> > shQuote(log.file)))
> > Tim C
> Thanks Tim,
> How do I make this change? I naively have tried by
> a) list sas.get and copy to editor
> b) reload R without loading Hmisc
> c) made recommended changes to sas.get
> d) stuck a "sas.get <- " in front of the function
> ran it.
> R returns the same error messages. I have also
> corrected the typo in sasprog and done some renaming
> following Cody's suggestions.
> Currently I have:
> mydata <- sas.get(library="F:/sas", mem="formea1",
> sasprog = '"C:/Program
> Error in sas.get(library = "F:/sas", mem =
> format.library = "F:/sas", :
> SAS job failed with status -1
> In addition: Warning messages:
> 1: F:/sas/formats.sc? or formats.sas7bcat not
> Formatting ignored.
> in: sas.get(library = "F:/sas", mem = "formea1",
> format.library = "F:/sas",
> 2: "\"C:/Program not found
> I really don't see why the sagprog does not work
> unless an early error is falling through.
> Thanks for all the help
> 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