Dear all, I have created a subset from my dataset, which contains 6 variables. I need to make the correlation among all of them, possibly, without making it one by one. Is there any command that can permits me to do it directly for all of them in the same time? Thank you so much in advance. Andrea [[alternative HTML version deleted]]
R. Michael Weylandt
2012-May-16 14:11 UTC
[R] correlation among variables in the same subset
? cor e.g., x <- data.frame(rnorm(5), rnorm(5), rnorm(5), rnorm(5), rnorm(5)) cor(x) Best, Michael On Wed, May 16, 2012 at 6:52 AM, Andrea Sica <aerdna.sica at gmail.com> wrote:> Dear all, > > I have created a subset from my dataset, which contains 6 variables. > I need to make the correlation among all of them, possibly, without > making it one by one. Is there any command that can permits me to > do it directly for all of them in the same time? > > Thank you so much in advance. > > Andrea > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > 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.