[R] Equivalent of 'Retain' statement in R

Daniel Nordlund res90sx5 at verizon.net
Mon May 21 17:58:45 CEST 2007


> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]
> On Behalf Of Shubha Vishwanath Karanth
> Sent: Monday, May 21, 2007 7:40 AM
> To: r-help
> Subject: [R] Equivalent of 'Retain' statement in R
> 
> Hi R,
> 
> 
> 
> What is the equivalent keyword for 'retain' statement of SAS in R?
> 
> 
> 
> Thank you, Shubha
> 
Shubha,

I don't believe there is an R equivalent to the SAS RETAIN keyword.  This is because R does not make the same kind of distinction between variables read from data files and those created by programming statements.  R is not SAS and you will be most successful using R if you don't try to force SAS solutions into it.

If you could give an example of some R code that you think requires the equivalent of RETAIN, I am sure someone on the list will be able to help with an appropriate R solution.

Dan

Daniel Nordlund
Bothell, WA USA



More information about the R-help mailing list