Date: Fri, 4 Jul 2008 23:50:38 +0100
Reply-To: Phil Holland <news@HOLLANDNUMERICS.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Phil Holland <news@HOLLANDNUMERICS.COM>
Organization: Holland Numerics Ltd
Subject: Re: "SAS to R to SAS" by Phil Holland
Content-Type: text/plain;charset=iso-8859-1
In message
<180af0de-d7bc-49eb-8b62-deba7bf5e302@2g2000hsn.googlegroups.com>,
RolandRB <rolandberry@hotmail.com> writes
>On Jul 3, 8:57 am, RolandRB <rolandbe...@hotmail.com> wrote:
>> Here is a good paper entitled "SAS to R to SAS" by Phil Holland.
>>
>> http://www.hollandnumerics.co.uk/pdf/SAS2R2SAS_paper.pdf
>>
>> It is a good marriage of SAS and R that I think is an ideal jumping
>> off point for the use of R alongside SAS in the pharmaceutical
>> industry. The more I read, the less I think that SAS is going to "go
>> away" for the purposes of clinical reporting and be replaced by R. R
>> currently can't handle large volumes of data such as lab data. SAS
>> can. So with SAS staying around then it is likely that all data
>> manipulation will be done using SAS. So that's us SAS programmers who
>> do clinical reporting still safe in our jobs..........
>>
>> ......However, I do see R being used alongside SAS. The ideal
>> situation is to call R from a SAS program that does all the data
>> manipulation, to run the R code using a system call and to incorporate
>> the R log output into the SAS log output. This is the best of both
>> worlds since this way data of any volume can be easily manipulated, we
>> can use routines or special statistical analysis in R where needed and/
>> or produce its famous "superior graphics" that can be incorporated
>> into output and have both the SAS and R logs in the same file where it
>> can be scanned for errors, warnings and important notes.
>>
>> Phil's paper is a good jumping off point, as I said. I wouldn't have
>> done things quite that way and for us SAS programmers, a lot more
>> detail would be helpful. I hope to create some pages on my web site
>> sometime that goes into this in a lot of detail so that clinical sas
>> programmers can comfortably make the transition across into
>> incorporating R code in their SAS programs.
>
>I am guessing the method Phil is describing would in principle work
>with other software packages such as matlab and stata. If running
>other software packages like that then I would try the XSYNC NOXWAIT
>system options and not launch the software with the "x" command but
>rather using:
>
>systask command "the command" taskname=xxx;
>waitfor xxx;
>
>.....as you might get annoying application windows flashing open and
>closed otherwise.
>
>If the code for the external software were in the form of DATALINES
>then it would be much neater than enclosing the code in quotes
>preceded by a "put".
>
>I think SAS is here to stay (within the pharmaceutical sector) and
>where SAS is deemed lacking such as in graphics and statistical
>analysis then using this method of combining sas code with external
>software is a happy marriage that keeps everything neat and simple.
Roland,
The original aim of the paper was to demonstrate how to use external
graphics packages to include images in SAS-based ODS reports, in the
same way that S-Plus can be interfaced to SAS. However, you are correct
in guessing that the method could easily be extended to work with any
external application with a command prompt and a scripting input file.
I should point out that I presented a follow-up paper at PhUSE the
following year which generated exactly the same trellis graphs, but only
used SAS 9.1.3! My presentations and sample code can be downloaded from
my SAS paper web page:
www.hollandnumerics.com/SASPAPER.HTM
Enjoy...........Phil Holland
--
--------------------------------------------------------
Holland Numerics Ltd
94 Green Drift, Royston, Herts SG8 5BT, UK
mobile : +44-(0)7714-279085
email : <NEWS@hollandnumerics.com>
URL : http://www.hollandnumerics.com/
--------------------------------------------------------
|