help@r-project.org
Subject: [R] using acf() for multiple columns
Hi everyone,
I'm trying to use the acf() function to calculate the autocorrelation of
each column in a matrix. The trouble is that I can only seem to get the
function to work if I extract the data in the column into a separat
This should do.
sapply(split(A,col(A)), function(ts) acf(ts,plot=F)$acf)
-gary
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of rcoder
Sent: Thursday, August 07, 2008 4:11 AM
To: r-help@r-project.org
Subject: Re: [R] using acf() for multiple columns
t; #Or
>> lapply(split(A,col(A)), function(ts) acf(ts, lag.max=10))
>>
>>
>>
>>
>>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> On Behalf Of rcoder
>> Sent: Wednesday, August 06, 2008 4:13 PM
>>
lag.max=10))
>
>
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of rcoder
> Sent: Wednesday, August 06, 2008 4:13 PM
> To: r-help@r-project.org
> Subject: [R] using acf() for multiple columns
>
>
>
(ts, lag.max=10))
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of rcoder
Sent: Wednesday, August 06, 2008 4:13 PM
To: r-help@r-project.org
Subject: [R] using acf() for multiple columns
Hi everyone,
I'm trying to use the acf() function to calcu
Hi everyone,
I'm trying to use the acf() function to calculate the autocorrelation of
each column in a matrix. The trouble is that I can only seem to get the
function to work if I extract the data in the column into a separate matrix
and then apply the acf() function to this column.
I have somet
6 matches
Mail list logo