[19258] in s-news-athena
Re: [S] SUMMARY: SAS v8 to SPlus conversion
daemon@ATHENA.MIT.EDU (Frank E Harrell Jr)
Fri Sep 17 17:04:58 1999
Message-Id: <37E2A9AA.322DA520@virginia.edu>
Date: Fri, 17 Sep 1999 16:50:51 -0400
From: Frank E Harrell Jr <fharrell@virginia.edu>
Mime-Version: 1.0
To: "Cande V. Ananth" <ananthcv@epi.umdnj.edu>
Cc: s-news@wubios.wustl.edu
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
You should be able to simply edit sas.get and change every occurence of
ssd01 to the new SAS suffix. Better still would be to come up with changes
that would allow both ssd01 and the new suffix to work. Suggested code
changes welcomed.
I'm surprised that one user said it's easier to write out a comma-delimited file
in SAS and use read.table in S+. sas.get retrieves variable names, labels,
formats, special missing values, etc., so the user doesn't have to define
those. -Frank Harrell
"Cande V. Ananth" wrote:
> Folks:
>
> I had asked for help for converting SAS version 8 data sets to Splus
> using the sas.get() function. Thanks to the following individuals
> for the very quick, and efficient responses: James Handsfield (CDC)
> <partha_bagchi@hgsi.com>, Ron Fehd (CDC). I've summarized their
> responses below.
>
> -------------------------------------------------------
> Original Question:
>
> From: Cande V. Ananth [mailto:ananthcv@epi.umdnj.edu]
> Sent: Friday, September 17, 1999 12:53 PM
> To: s-news@wubios.wustl.edu
> Subject: [S] SAS v8 to SPlus conversion
>
> Folks:
>
> I have a SAS data set (created using SAS version 8.0 on the UNIX),
> and need to have that data converted to a SPlus dataframe. Using
> the "sas.get" option in Splus does not seem to do the job (gives
> an error message that *.ssd data not found). Since a SAS data
> that's created using ver 8.0 gives the "*.sas7bdat" extension, I
> presume that that's where the problem lies -- "sas.get" is not
> capable of reading "sas7bdat" data sets, and therefore, cannot
> write out a SPlus data (please correct me if I'm mistaken).
> Anyway, is there a solution to my problem ?
>
> I'm running SPlus 3.4 on the UNIX, operating on Solaris. Thanks.
>
> Cande Ananth
> ananthcv@EPI.UMDNJ.EDU
> -------------------------------------------------------
> Responses:
>
> > From jhh0@cdc.gov Fri Sep 17 13:23:44 1999
> > To: "'Cande V. Ananth'" <ananthcv@epi.umdnj.edu>
> > Subject: RE: [S] SAS v8 to SPlus conversion
> > Date: Fri, 17 Sep 1999 13:27:40 -0400
> >
> > You can either use SAS to make a v6 data base or create a SAS export data
> > set to bring it in to Splus. Those are the only ways I know.
> >
> > James Handsfield
> > mailto:jhh0@cdc.gov
>
> -------------------------------------------------------
> > From partha_bagchi@hgsi.com Fri Sep 17 13:29:41 1999
> > Subject: Re: [S] SAS v8 to SPlus conversion
> > To: "Cande V. Ananth" <ananthcv@epi.umdnj.edu>
> > Date: Fri, 17 Sep 1999 13:32:39 -0400
> >
> > While this will not answer the "sas.get" issue (I don't use it) - the
> > solution I prefer in general is to write out a comma delimited file from
> > SAS and read that into Splus using read.table with sep= "," something like
> > > x <- read.table(file= "sasoutput.csv", sep= ",", header= T)
> > You can easily turn this into a macro in SAS to output a comma delimited
> > file.
>
> -------------------------------------------------------
> > From rjf2@cdc.gov Fri Sep 17 13:59:45 1999
> > To: "'Cande V. Ananth'" <ananthcv@epi.umdnj.edu>
> > Subject: RE: [S] SAS v8 to SPlus conversion
> > Date: Fri, 17 Sep 1999 14:03:36 -0400
> >
> > I am currently doing R&D in S-Plus and the first thing I notice when I moved
> > up to SAS V7 was that the V7 data sets could not read by S-Plus.
> > Here is SAS code to copy your V8 data sets down to V6, which are readable by
> > S-Plus.
> >
> > %LET PATH_SSD = C:\SAS;
> >
> > LIBNAME LIBV6 V6 "&path_ssd.\v6";
> > LIBNAME LIBV8 V8 "&path_ssd.\v8";
> >
> > proc DATASETS nolist;
> > memtype = data;
> > copy in = LIBV8
> > out = LIBV6;
> > quit;run;
> >
> > Ron Fehd SAS-List's macro maven CDC Atlanta GA
>
> Thanks for all the responses; Ron Fehd's suggestion worked best for
> me, and I appreciate everyone for the time they took to answer my
> question.
>
> Cande Ananth
> -----------------------------------------------------------------------
> This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
> send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
> message: unsubscribe s-news
--
Frank E Harrell Jr
Professor of Biostatistics and Statistics
Division of Biostatistics and Epidemiology
Department of Health Evaluation Sciences
University of Virginia School of Medicine
http://hesweb1.med.virginia.edu/biostat
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news