[R] Viewing specific data from a dataframe
p.hiemstra at geo.uu.nl
Tue Oct 6 14:56:31 CEST 2009
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?
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
> Save time by using Hotmail to access your other email accounts.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> 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
P.O. Box 80.115
3508 TC Utrecht
Phone: +3130 274 3113 Mon-Tue
Phone: +3130 253 5773 Wed-Fri
More information about the R-help