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 des
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, Bogaso wrote:
>
> No reply yet. Is my question not clear? Please let me know.
>
> Thanks
>
>
> Bogaso wrote:
>>
>> Thanks Gabor for this reply
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
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 conta
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.
Thank
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, 2
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,
7 matches
Mail list logo