[R] Inefficiency of SAS Programming
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Fri Feb 27 14:57:06 CET 2009
Ajay ohri wrote:
>
> I would like to know if we can create a package in which r functions are
> renamed closer to sas language.doing so will help people familiar to SAS
> to straight away take to R for their work,thus decreasing the threshold
> for acceptance - and then get into deeper understanding later.
>
> since it is a package it would be optional only for people wanting to
> try out R from SAS.. Do we have such a package right now..it basically
> masks R functions to the equivalent function in another language just
> for user ease /beginners
>
> for example
>
> creating function for means
>
> procmeans<-function(x,y)
> + {
> summary (
> subset(x,select=c(x,y))
> +
> )
>
> creating function for importing csv
>
> procimport <-function(x,y)
> + {
> read.csv(
> textConnection(x),row.names=y,na.strings=" "
> +
> )
>
>
> creating function fo describing data
>
> procunivariate<-function(x)
> + {
> summary(x)
> +
> )
>
> regards,
>
> ajay
Ajay,
This will generate major confusion among users of all types and be hard
to maintain. A better approach is to get Bob Muenchen's excellent book
and keep it nearby.
Frank
>
> www.decisionstats.com <http://www.decisionstats.com>
>
> On Fri, Feb 27, 2009 at 4:27 AM, Frank E Harrell Jr
> <f.harrell at vanderbilt.edu <mailto:f.harrell at vanderbilt.edu>> wrote:
>
> If anyone wants to see a prime example of how inefficient it is to
> program in SAS, take a look at the SAS programs provided by the US
> Agency for Healthcare Research and Quality for risk adjusting and
> reporting for hospital outcomes at
> http://www.qualityindicators.ahrq.gov/software.htm . The
> PSSASP3.SAS program is a prime example. Look at how you do a vector
> product in the SAS macro language to evaluate predictions from a
> logistic regression model. I estimate that using R would easily cut
> the programming time of this set of programs by a factor of 4.
>
> Frank
> --
> Frank E Harrell Jr Professor and Chair School of Medicine
> Department of Biostatistics Vanderbilt University
>
> ______________________________________________
> R-help at r-project.org <mailto:R-help at r-project.org> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list