[Rd] cor() and cor.test() (PR#9781)
kristle.krichbaum at gmail.com
kristle.krichbaum at gmail.com
Thu Jul 5 21:48:47 CEST 2007
Hello,
I am trying to make a correlation matrix in R using cor() and also to get
the p-value for each correlation using cor.test(). I can't get these
commands to work. I'm getting errors like the following:
cor(Pollution, Wet.days)
Error in inherits(x, "data.frame") : Object "Wet.days" not found
cor("Pollution", "Wet.days")
Error in cor("Pollution", "Wet.days") : missing observations in cov/cor
In addition: Warning messages:
1: NAs introduced by coercion
2: NAs introduced by coercion
I know that "Wet.days" is there because when I type the name of the data set
(Pollution) it appears. There are no missing values in the data set for
there to be any NAs coerced. This is the example given in Mick Crawley's
book on R with Pollution data so it should definitely work.
Can you help me to get it working, please?
Kristle
--
Kristle Krichbaum
Graduate Assistant
Hudson Lab
208 Mueller Lab
University Park, PA 16801
www.cidd.psu.edu
[[alternative HTML version deleted]]
More information about the R-devel
mailing list