> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of muzz56
> Sent: Wednesday, November 16, 2011 12:28 PM
> To: r-help@r-project.org
> Subject: Re: [R] Pairwise correlation
> 
> Thanks Peter. I tried this after reading in the csv (read.csv) and
> converted the data to matrix (as.matrix). But when I tried the
> correlation,
> I keeping getting the error (x must be numeric) yet when I view the
> data,
> its numeric.
> 

What does R tell you if you execute the following?

str(x)

Just because the data looks like it is numeric when it prints doesn't mean it 
is. 


Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204


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

Reply via email to