Re: [R] correlation among variables in the same subset

2012-05-16 Thread R. Michael Weylandt
? 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  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@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.

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


[R] correlation among variables in the same subset

2012-05-16 Thread Andrea Sica
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@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.