On Apr 22, 2009, at 3:42 PM, Bronagh Grimes wrote:
Hi there, I am interested in converting SAS code to R & I wondered if anyone had any quick R code/tips for the following piece of test SAS code? Any feedback greatly appreciated. data A1; set A1; count + 1; by subject_id; if first.subject_id then count = 1; run;
There were several solution offered a couple of months back to the challenge of replicating the features of the SAS _N_ construct. At least that is my memory of how it looks in SAS. You probably have the right books to consult for that question to construct a proper search:
http://search.r-project.org/nmz.html David Winsemius, MD Heritage Laboratories West Hartford, CT ______________________________________________ R-help@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.