Great!
Thanks.
--
View this message in context:
http://r.789695.n4.nabble.com/Using-Aggregate-with-FUN-arguments-which-require-more-than-one-input-variables-tp4303936p4306170.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-pr
lting vector will be length(unique(groups)).
I think this draws a clearer picture to you. Sorry for not precisely pointing
it out in my first post.
Thanks and Regards!
sapply(split(numbers, groups), function(x) cor(x[,1], x[,2]))
Uwe Ligges
-Ursprüngliche Nachricht-
Von: Uwe
will be
length(unique(groups)).
I think this draws a clearer picture to you. Sorry for not precisely pointing
it out in my first post.
Thanks and Regards!
-Ursprüngliche Nachricht-
Von: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de]
Gesendet: Dienstag, 17. Januar 2012 19:21
An: Alexan
as.matrix() will not help here. I will get the same error message.
And also, I don't need correlation matrices. I simply need a vector of
correlations. I will show you some code and data I am using.
Here you can see my main dataframe:
> head(test)
industry datetestvar ret
Hello,
RNoob wrote
>
> Dear all,
>
> I am trying to apply the aggregate() function to calculate correlations
> for subsets of a dataframe. My argument x is supposed to consist of 2
> numerical vectors, which represent x and y for the cor() function.
>
> The following error results when callin
On 17.01.2012 18:10, RNoob wrote:
Dear all,
I am trying to apply the aggregate() function to calculate correlations for
subsets of a dataframe. My argument x is supposed to consist of 2 numerical
vectors, which represent x and y for the cor() function.
The following error results when calling
Dear all,
I am trying to apply the aggregate() function to calculate correlations for
subsets of a dataframe. My argument x is supposed to consist of 2 numerical
vectors, which represent x and y for the cor() function.
The following error results when calling the aggregate function: Error in
FUN
7 matches
Mail list logo