Skip to content
Prev 334487 / 398503 Next

why there is no quarters?

Hi,

try

x <- seq(as.Date("2001/1/1"),as.Date("2010/1/1"),"3 months")

best,
daniel
________________________________________
Felad?: r-help-bounces at r-project.org [r-help-bounces at r-project.org] ; meghatalmaz&#243;: Pancho Mulongeni [p.mulongeni at namibia.pharmaccess.org]
K?ldve: 2013. december 16. 13:05
To: 1248283536 at qq.com
Cc: r-help at r-project.org
T?rgy: Re: [R] why there is no quarters?

Hi,
I also would like to use quarters. I think a work around would be to just label each record in the dataframe by its quarter.
i.e. you add a factor called 'Quarter' with four levels (Q1 to Q4) for each row and you assign the level based on the month of the date.
You can easily do this with as.Date and as.character.

Pancho Mulongeni
Research Assistant
PharmAccess Foundation
1 Fouch? Street
Windhoek West
Windhoek
Namibia

Tel:   +264 61 419 000
Fax:  +264 61 419 001/2
Mob: +264 81 4456 286

______________________________________________
R-help at 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.