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. ______________________________________________ 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.