[R] the first. from SAS in R

David Katz david at davidkatzconsulting.com
Wed Nov 24 16:17:08 CET 2010

Often the purpose of first/last in sas is to facilitate grouping of
observations in a sequential algorithm. This purpose is better served in R
by using vectorized methods like those in package plyr.

Also, note that first/last has different meanings in the context of "by x;"
versus "by x notsorted;". R "duplicated" does not address the latter, which
splits noncontiguous records with equal x.

View this message in context: http://r.789695.n4.nabble.com/the-first-from-SAS-in-R-tp3055417p3057476.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list