Using pakage foreign and to import SAS file
It is highly unlikely that SAS is on the path, as it does not put itself there. read.ssd () has a 'sascmd' argument to give the path to SAS. This is explained *with a functioning Windows example*, on the help page for read.ssd.
On Mon, 14 Nov 2005, Austin, Matt wrote:
If sas isn't in the path, then you might have trouble with sas.get or read.ssd. Assuming you are using windows, go to the Start menu, select run and type "sas". If sas fires up it's in your path, if not then that is the reason. --Matt
-----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Rick Bilonick Sent: Monday, November 14, 2005 8:22 PM To: Walter R. Paczkowski Cc: r-help at stat.math.ethz.ch Subject: Re: [R] Using pakage foreign and to import SAS file On Mon, 2005-11-14 at 22:55 +0000, Walter R. Paczkowski wrote:
Hi, I'm struggling with foreign to import a SAS file. The
file, for lack of imagination, is d.sas7bdat and is in my root directory (c:\) under Windows XP. When I type
read.ssd("c:\\", "d")
which I think I'm suppose to enter, I get
SAS failed. SAS program at
C:\DOCUME~1\Owner\LOCALS~1\Temp\Rtmp32758\file19621.sas
The log file will be file19621.log in the current directory
NULL
Warning messages:
1: "sas" not found
2: SAS return code was -1 in: read.ssd("c:\\", "d")
I have SAS 9.1 running on my computer so SAS is there.
What am I doing wrong?
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595