Wonderful!
Thank you very much Gabor! I'll check it out now.
Kind regards,
Denise
2008/8/19 Gabor Grothendieck <[EMAIL PROTECTED]>
> Another possibility is to use the yearmon and yearqtr classes in the
> zoo package. Assuming quarters end in Feb, May, Aug and Nov
> we have (using dat from the p
Another possibility is to use the yearmon and yearqtr classes in the
zoo package. Assuming quarters end in Feb, May, Aug and Nov
we have (using dat from the prior post):
> library(zoo)
> z <- zoo(dat$price, dat$date)
> aggregate(z, as.yearqtr(as.yearmon(time(z)) + 1/12), mean)
2008 Q1 2008 Q2
On Mon, 2008-08-18 at 14:31 +0100, Denise Xifara wrote:
> Thank you very much Stephen, but how will aggregate deal with months that
> fall outside annual quarters? eg, one extra month at the end of the dataset?
[Without your data I'm kind of guessing at the exact format and problem,
but the exampl
Thank you very much Stephen, but how will aggregate deal with months that
fall outside annual quarters? eg, one extra month at the end of the dataset?
2008/8/18 stephen sefick <[EMAIL PROTECTED]>
> ?aggregate
> may do what you want
>
> On Mon, Aug 18, 2008 at 8:19 AM, Denise Xifara
> <[EMAIL PROT
?aggregate
may do what you want
On Mon, Aug 18, 2008 at 8:19 AM, Denise Xifara
<[EMAIL PROTECTED]> wrote:
> Dear R users,
>
> I have a dataframe where column is has countries, column 2 is dates
> (monthly) for each countrly, the next 10 columns are my factors where I have
> measurements for each c
Dear R users,
I have a dataframe where column is has countries, column 2 is dates
(monthly) for each countrly, the next 10 columns are my factors where I have
measurements for each country and for each date. I have attached a sample
of the data in csv format with the data for 3 countries.
I wou
6 matches
Mail list logo