[R] matching by gender and age

1Rnwb sbpurohit at gmail.com
Thu Jun 16 22:50:46 CEST 2011


the examples work great but it gives me this error on this file
http://r.789695.n4.nabble.com/file/n3603737/il1ra_L.csv il1ra_L.csv 

> Age.co<-c(dat2b$Dr_Age)
> Sex.co<-as.factor(dat2b$Sex)
> casecont.co<-as.factor(dat2b$Self_T1D)
> stat.co<-as.factor(dat2b$status)
> 
> m <- matchControls(Sex.co~Age.co,contlabel="F")
Error in retval[k] <- controls[which.is.min(d[cases[k], controls])] : 
  replacement has length zero
In addition: Warning message:
In min(x, na.rm = TRUE) : no non-missing arguments to min; returning Inf

I would appreciate help to solve this.
Thanks
Sharad

--
View this message in context: http://r.789695.n4.nabble.com/matching-by-gender-and-age-tp3552825p3603737.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list