[R] Excluding NAs from round correlation

2011-08-13 Thread Julie
Hello, I am quite new to R and I am trying to get a round correlation from a table with dozens of columns. However, all the columns contain several blank places which show to me as NAs. Then, when I type round(cor(data),2), I get no results - everything (except correlation of one column with the

Re: [R] Excluding NAs from round correlation

2011-08-13 Thread Weidong Gu
check ?cor Please note the parameter 'use' Weidong Gu On Sat, Aug 13, 2011 at 9:06 AM, Julie julie.novak...@gmail.com wrote: Hello, I am quite new to R and I am trying to get a round correlation from a table with dozens of columns. However, all the columns contain several blank places

Re: [R] Excluding NAs from round correlation

2011-08-13 Thread Julie
Thank you, I found this in the help pack: use: an optional character string giving a method for computing covariances in the presence of missing values. This must be (an abbreviation of) one of the strings everything, all.obs, complete.obs, na.or.complete, or pairwise.complete.obs I should

Re: [R] Excluding NAs from round correlation

2011-08-13 Thread Julie
The help pack says: use: an optional character string giving a method for computing covariances in the presence of missing values. This must be (an abbreviation of) one of the strings everything, all.obs, complete.obs, na.or.complete, or pairwise.complete.obs If I used everything, the results