Hi David ( and Erik via e-mail), I think David's code is working. While using it I discovered there was an error in some previous code of mine that generated my df.soil table. After running David's code, nearly all lab results were flagged as **H. Then I looked at the df.soil table and found that the medians were all set to .28, and naturally nearly all the lab results were too high.
Now I have to figure out what I did wrong in the previous steps when I set up the tables. Thanks for your help. Jerry Floren Minnesota Department of Agriculture -- View this message in context: http://n4.nabble.com/Comparing-Variables-and-Writing-a-New-Column-tp1458947p1459309.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.