[R] Excluding NAs from round correlation

Weidong Gu anopheles123 at gmail.com
Sat Aug 13 15:16:26 CEST 2011


check

?cor

Please note the parameter 'use'

Weidong Gu

On Sat, Aug 13, 2011 at 9:06 AM, Julie <julie.novakova at 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 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 same one,
> of course) is NA.
> I do not want to replace NA with zero, because it would ruin the results. I
> just want R "not to look at NA" and correlate just places with numbers. Is
> it possible?
> Thank you very much for help!
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Excluding-NAs-from-round-correlation-tp3741296p3741296.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list