Since water quality is ordered, you could use cor.test with method of kendall or spearman. This will basically give a test of whether the rank based correlation is significantly different from 0. Often more interesting information can come from the data if you do some more work. Start by graphing your data to see what is there and if anything stands out. Then decide what you really want to learn from the data to decide what other tests to do. If you want to predict nitrogen given water quality, then you can use lm or aov (or other related methods), if you want to predict quality given nitrogen, then possibilities include proportional odds logistic regression (polr in MASS, lrm in Design) or recursive partitioning (rpart and other packages).
Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > project.org] On Behalf Of kdebusk > Sent: Thursday, October 16, 2008 6:54 AM > To: r-help@r-project.org > Subject: [R] correlation between a discrete variable and a continuous > variable > > What test would you use to determine if a correlation exists between a > discrete variable and a continuous variable? > > For example, I have a rating for stream water quality (excellent, > good, fair, poor) and a corresponding nitrogen concentration. I want > to see if there is a correlation between the water quality rating and > the concentration of nitrogen in the stream. > > Help? > > ______________________________________________ > 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. ______________________________________________ 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.