[R] Month names

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon May 24 17:40:48 CEST 2004


Martin Maechler <maechler at stat.math.ethz.ch> writes:

> >>>>> "Roger" == Roger D Peng <rpeng at jhsph.edu>
> >>>>>     on Mon, 24 May 2004 10:38:09 -0400 writes:
> 
>     Roger> How about `month.name'?
> 
> English only.
> 
> Note that he got the names in Danish (I think)
> Martin

Yep. Notice, however, that even with Brian's solution, you do need to
set the locale first:

> format(ISOdate(2004,1:12,1),"%B")
 [1] "January"   "February"  "March"     "April"     "May"       "June"
 [7] "July"      "August"    "September" "October"   "November"  "December"
> Sys.setlocale("LC_TIME","da_DK") ;format(ISOdate(2004,1:12,1),"%B")
[1] "da_DK"
 [1] "januar"    "februar"   "marts"     "april"     "maj"       "juni"
 [7] "juli"      "august"    "september" "oktober"   "november"  "december"


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list