Re: [R] Month names

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

From: Prof Brian Ripley (ripley@stats.ox.ac.uk)
Date: Tue 25 May 2004 - 02:12:41 EST


Message-id: <Pine.LNX.4.44.0405241708310.5031-100000@gannet.stats>

As far as I know the original solution uses the current locale, and mine
is just a much-simplified version of the same underlying call.

On 24 May 2004, Peter Dalgaard wrote:

> Martin Maechler <maechler@stat.math.ethz.ch> writes:
>
> > >>>>> "Roger" == Roger D Peng <rpeng@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:

Just as you did with the original code, which gives English names on my
machine.

> > 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"

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ 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