Re: [R] moving correlation coef ?

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Thu 30 Jun 2005 - 00:57:38 EST

or ?rapply in package zoo.

          spencer graves

Sundar Dorai-Raj wrote:

>
> vincent wrote:
>

>>Hello,
>>
>>R gives us the correlation functions cor(). (Many thanks ;-))
>>Does it also exist a "moving correlation" coefficient ?
>>(like the moving average).
>>If not, could someone give me some infos or link
>>on how to practically implement such a function in R.
>>
>>(I did search for "moving correlation" on the R homepage
>>but didn't find anything.)
>>
>>Thank you.
>>Vincent
>>

>
>
>
> See ?running in the gtools package:
>
> library(gtools)
> X <- rnorm(100); Y <- rnorm(100)
> running(X, Y, cor)
>
> HTH,
>
> --sundar
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
-- 
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

spencer.graves@pdf.com
www.pdf.com <http://www.pdf.com>
Tel:  408-938-4420
Fax: 408-280-7915

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jun 30 01:02:25 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:06 EST