-help [mailto:r-help-boun...@r-project.org] On Behalf Of David L Carlson
Sent: Friday, May 12, 2017 10:48 AM
To: Ismail SEZEN ; Micha Silver
Cc: R-help@r-project.org
Subject: Re: [R] apply and cor()
Actually, r is a vector, not an index value. You need
apply(compare_data, 1, function(r) cor(r, t(test
-project.org
Subject: Re: [R] apply and cor()
Actually, r is a vector, not an index value. You need
apply(compare_data, 1, function(r) cor(r, t(test_data)))
-
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-
to:r-help-boun...@r-project.org] On Behalf Of Ismail SEZEN
Sent: Friday, May 12, 2017 10:11 AM
To: Micha Silver
Cc: R-help@r-project.org
Subject: Re: [R] apply and cor()
> On 12 May 2017, at 17:57, Micha Silver wrote:
>
> I have two data.frames, one with a single row of 31 columns, a
> On 12 May 2017, at 17:57, Micha Silver wrote:
>
> I have two data.frames, one with a single row of 31 columns, and the second
> with 269 rows and the same 31 columns.
> > dim(compare_data)
> [1] 269 31
> > dim(test_data)
> [1] 1 31
>
> I want to apply cor() between the one row of 'test_dat
4 matches
Mail list logo