Skip to content

sas.get function in Hmsic 3.4-4 vs. 3.0-12

4 messages · Larry Ma, David Winsemius, Daniel Nordlund

#
Could the R Windows FAQ 2.16 be relevant?

http://cran.r-project.org/bin/windows/base/rw-FAQ.html#R-can_0027t-find-my-file

--  
D Winsemius
On Dec 12, 2008, at 11:34 PM, Larry Ma wrote:

            
#
Larry,

I presume your unstated OS is some version of MS Windows (it probably
doesn't matter which, in this case).  If you search R-help for "sas.get" you
will find a lot of posts dealing with the fact that sas.get() does not work
out of the box on Windows.  This has been true for some time, so I am
surprised that it worked for you prior to upgrading to R-2.8.0 and Hmisc
3.4-4.  Anyway, from the Rgui console select Help, then
search.r-project.org, and search for sas.get.  The following post has the
solution to your problem. 

http://finzi.psych.upenn.edu/R/Rhelp02a/archive/97413.html

Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA
#
Dan,

Thanks for the link.  Here is what I learned:

#1 new Hmsic sas.get which didn't work
status <- sys(paste(shQuote(sasprog), shQuote(sasin), "-log",
     shQuote(log.file)), output = FALSE)

#2 old Hmsic which worked, and you can replace the following line in the new 
sas.get
status <- sys(paste(sasprog, sasin, "-log", log.file), output = FALSE)

#3 revision suggested by others
status <- system(paste(shQuote(sasprog), shQuote(sasin), "-log", 
shQuote(log.file)))

I am not sure why, but both #2 and #3 worked.

Kind regards,
Larry


----- Original Message ----- 
From: "Daniel Nordlund" <djnordlund at verizon.net>
To: <r-help at r-project.org>
Sent: Saturday, December 13, 2008 6:24 AM
Subject: Re: [R] sas.get function in Hmsic 3.4-4 vs. 3.0-12