[R] max and in the zoo package

2010-02-13 Thread Edouard Tallent
hi everyone.
i am dealing on a zoo-class object.i am aware of the 'min' and 'max' function 
to get the minimum and the maximum values.getting these maximum and minimum 
values is ont thing.but, how to get the (zoo) dates these values occur ?
in fact, in analysing a time series i am interested in the particular (extreme) 
values AND in the moments they happen.
regards.edouard.

[[alternative(swapped) HTML version deleted]]

This is MIME Epilogue

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ADF test : how to deal with the missing values ?

2010-01-03 Thread Edouard Tallent

[[alternative(swapped) HTML version deleted]]

This is MIME Epilogue

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ADF test : how to deal with the missing values ?

2010-01-03 Thread Edouard Tallent

   hi everyone, and happy new year.
   i want to perform an Augmented Dickey Fuller test.
   the basic adf.test function doesn't work on my dataset as data are missing.
   has a package a function enabling missing values ? does any one know a trick
   to get through ?
   thanks,
   édouard.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] how to create a simple loop ?

2009-12-27 Thread Edouard Tallent
I have a 5-row matrix called “data”. There are headers.
it look like this :
Row 1   Row2Row3Row4Row5
Line1 …………
Line2 …………
Line3 …………
…
Line 1838 …………
 I want to calculate several simple arithmetic means for Row5, that is from 
Line173 to Line193, from Line434 to Line455, from Line699 to Line724, from 
Line955 to Line977
 A simple way is to individually compute these means. The first one (Line173 to 
Line193) is then obtained by :
mean(data[173:193,5], na.rm = TRUE)
That’s right ! But, I aim to automate this calculation by creating a loop.
I tried many things, but I have been unsuccessful at using the ‘for’ loop 
function.
Please, don’t explain things too hard as it is often the case that people 
wants to help but gets into too much sophistication.
Someone can write that little code for this example ? Or suggest functions ?
Thanks for your help.
Cheers,
Édouard.

[[alternative(swapped) HTML version deleted]]

This is MIME Epilogue

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] how to create a simple loop ?

2009-12-27 Thread Edouard Tallent
Hi everyone. And, Merry Xmas !
I have a 5-row matrix called “data”. There are headers.
it look like this :
Row 1   Row2Row3Row4Row5
Line1 …………
Line2 …………
Line3 …………
…
Line 1838 …………
 I want to calculate several simple arithmetic means for Row5, that is from 
Line173 to Line193, from Line434 to Line455, from Line699 to Line724, from 
Line955 to Line977
 A simple way is to individually compute these means. The first one (Line173 to 
Line193) is then obtained by :
mean(data[173:193,5], na.rm = TRUE)
That’s right ! But, I aim to automate this calculation by creating a loop.
I tried many things, but I have been unsuccessful at using the ‘for’ loop 
function.
Please, don’t explain things too hard as it is often the case that people 
wants to help but gets into too much sophistication.
Someone can write that little code for this example ? Or suggest functions ?
Thanks for your help.
Cheers,
Édouard.

[[alternative(swapped) HTML version deleted]]

This is MIME Epilogue

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.