[R] Month names

About this list Date view Thread view Subject view Author view Attachment view

From: BXC (Bendix Carstensen) (bxc@steno.dk)
Date: Mon 24 May 2004 - 23:58:32 EST


Message-id: <0ABD88905D18E347874E0FB71C0B29E90179EB20@exdkba022.novo.dk>

This is how I get the month names from within R:

> mon <- rep(strptime("01/01/1952", format = "%d/%m/%Y"), 12)
> mon$mon <- mon$mon + 0:11
> mnam <- months(mon, abbreviate = F)
> mnam
 [1] "januar" "februar" "marts" "april" "maj" "juni"
"juli" "august" "september"
[10] "oktober" "november" "december"

Surely someone on the list can beat that in elegance?

Bendix Carstensen
----------------------
Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2
DK-2820 Gentofte
Denmark
tel: +45 44 43 87 38
mob: +45 30 75 87 38
fax: +45 44 43 07 06
bxc@steno.dk
www.biostat.ku.dk/~bxc

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:12 EST