[R] Fwd: Extract element of a list based on an index value
Corey Sparks
corey.sparks at UTSA.EDU
Fri Jun 24 16:54:36 CEST 2011
Solved it:
oldest<-unlist(tapply(warmerge$birth.year, warmerge$SibID,function(x)
ifelse (x==min(x, na.rm=T)|is.na(x)==T,1,0)))
-----
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at' utsa.edu
https://rowdyspace.utsa.edu/users/ozd504/www/index.htm
--
View this message in context: http://r.789695.n4.nabble.com/Fwd-Extract-element-of-a-list-based-on-an-index-value-tp3622601p3622714.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list