[R] Viewing specific data from a dataframe
Paul Hiemstra
p.hiemstra at geo.uu.nl
Tue Oct 6 14:56:31 CEST 2009
Hi,
I'm not sure I understand what you want. This would have been easier if
you had provided a reproducible example. See the following code:
bla = matrix(runif(10000), 10, 10)
cor_bla = cor(bla, method = "spearman")
Now what do you want to select. All the variables that have a
correlation higher than 0.8 with any of the other variables, excluding
themselves? Or a correlation higher than 0.8 in contrast to one of the
variables, e.g. the third variable?
cheers,
Paul
Krystyna Golabek wrote:
> Dear R users,
>
> Simple question. Can anyone help with the code that would allow me to view only the variables who's correlation output is >0.8?
>
> This is the code I'm using to date
>
>> cor(data, method="spearman")
>>
>
> Kind regards
> Krys
>
>
> --------------------------------------------
>
>
>
>
>
>
> _________________________________________________________________
> Save time by using Hotmail to access your other email accounts.
>
> [[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.
>
--
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: +3130 274 3113 Mon-Tue
Phone: +3130 253 5773 Wed-Fri
http://intamap.geo.uu.nl/~paul
More information about the R-help
mailing list