Re: [R] A problem on zoo object

2009-07-04 Thread Bogaso
No reply yet. Is my question is not clear? Please let me know. Thanks Bogaso wrote: Thanks Gabor for this reply. However can please clarify one more thing? How I want to create a list, wherein each member of that list is the monthly observations. For example, 1st member of list contains

Re: [R] A problem on zoo object

2009-07-04 Thread Bogaso
No reply yet. Is my question not clear? Please let me know. Thanks Bogaso wrote: Thanks Gabor for this reply. However can please clarify one more thing? How I want to create a list, wherein each member of that list is the monthly observations. For example, 1st member of list contains

Re: [R] A problem on zoo object

2009-07-04 Thread stephen sefick
Try some reproducible example and why you want this list. I don't understand why you are trying to do what you want to do. On Sat, Jul 4, 2009 at 2:51 AM, Bogasobogaso.christo...@gmail.com wrote: No reply yet. Is my question not clear? Please let me know. Thanks Bogaso wrote: Thanks

Re: [R] A problem on zoo object

2009-07-04 Thread David Winsemius
I looked at the question and Gabor's reply and could not figure out why you were not simply replacing the function list() for head() in the second line of his example. Or perhaps you were, and the result was not what you wanted, in which case it would be of you not being clear about the

Re: [R] A problem on zoo object

2009-07-03 Thread Bogaso
Thanks Gabor for this reply. However can please clarify one more thing? How I want to create a list, wherein each member of that list is the monthly observations. For example, 1st member of list contains daily observation of 1st month, 2nd member contains daily observation of 2nd month etc.

[R] A problem on zoo object

2009-07-01 Thread Bogaso
I have a zoo object on daily data for 10 years. Now I want to create a list, wherein each member of that list is the monthly observations. For example, 1st member of list contains daily observation of 1st month, 2nd member contains daily observation of 2nd month etc. Then for a particular month,

Re: [R] A problem on zoo object

2009-07-01 Thread Gabor Grothendieck
Try this: z - zooreg(1:365, start = as.Date(2001-01-01), freq = 1) f - head tapply(seq_along(z), as.yearmon(time(z)), function(ix) f(z[ix])) where you should replace f with a function that does whatever you want with each month's data. Here we just used head as an example. On Wed, Jul 1, 2009