Hello! merge(TablePatient, TableSpecial, by.x="ID", by.y="PATIENTID")
works fine for me. (There is also a variable ID in TableSpecial). One problem - or what has to be known - is that merge is using the levels, not the labels, if the merged variables are factors. Karl ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html