r:correlation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
r:correlation [2018/12/26 14:52] – hkimscil | r:correlation [2018/12/26 15:01] – hkimscil | ||
---|---|---|---|
Line 16: | Line 16: | ||
Valiant | Valiant | ||
< | < | ||
- | library(" | + | install.packages(" |
- | rcorr(x, type = c(" | + | library(Hmisc) |
+ | # rcorr(x, type = c(" | ||
</ | </ | ||
< | < | ||
- | rcorr(my_data) | + | rcorr(as.matrix(my_data)) |
</ | </ | ||
+ | < | ||
+ | | ||
+ | mpg 1.00 -0.85 -0.78 0.68 -0.87 0.42 | ||
+ | disp -0.85 1.00 0.79 -0.71 0.89 -0.43 | ||
+ | hp | ||
+ | drat 0.68 -0.71 -0.45 1.00 -0.71 0.09 | ||
+ | wt | ||
+ | qsec 0.42 -0.43 -0.71 0.09 -0.17 1.00 | ||
+ | |||
+ | n= 32 | ||
+ | |||
+ | |||
+ | P | ||
+ | | ||
+ | mpg | ||
+ | disp 0.0000 | ||
+ | hp | ||
+ | drat 0.0000 0.0000 0.0100 | ||
+ | wt | ||
+ | qsec 0.0171 0.0131 0.0000 0.6196 0.3389 | ||
+ | > </ |
r/correlation.txt · Last modified: 2018/12/26 15:19 by hkimscil