[R] matching by gender and age
1Rnwb
sbpurohit at gmail.com
Thu May 26 17:19:47 CEST 2011
Hello R gurus, I have a data set from which i have to extract the gender and
age matched rows from controls and disease group
disease<-paste(rep(c('y','n'),11))
gender<-paste(rep(c('m','f'),11))
mcp<-rnorm(700,1400)
age<-rnorm(32,34)
dat<-data.frame(disease=disease,sex=gender,Dr_age=age[1:22],MCP=mcp[1:22])
I have other categorical variables also to add to the matching. all the
posts I came across are matching for a single column from two
matrix/dataframe. How can i match for multiple variables when all the data
is in one single dataframe
--
View this message in context: http://r.789695.n4.nabble.com/matching-by-gender-and-age-tp3552825p3552825.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list