s-news
[Top] [All Lists]

Months as a character vector? (summary)

To: s-news@wubios.wustl.edu
Subject: Months as a character vector? (summary)
From: Karl Nissen <karl.nissen@anu.edu.au>
Date: Mon, 19 Nov 2001 09:16:27 +1100
Hi,

The enquiry was a function to return a character vector of the names of the months.

Nick Ellis and Prof. Brian Ripley suggested the use of levels(months(0)).

Prof. Brian Ripley, Dr Renaud Lancelot and Bill Dunlap suggested the use of builtin datasets. I've reproduced Bill Dunlap's reply below as it contains some useful information about localisation.

Thanks for the enlightenment

Karl

Bill says...

The are datasets in the 'data' library called month.name and month.abb
that contain the English names and abbreviations for the months.

The same information is stored in options("time.month.name") and
options("time.month.abb"). Those may be reset by any user to reflect
the local language. They are used for printing objects of class "timeDate".


-------------------------------------------------------------------------------------------------------------------------------
Karl Nissen
Programmer/System administrator Phone: (+61 2) 6125 4613 School of Resources, Environment and Society Fax: (+61 2) 6125 3770 The Australian National University e-mail: karl.nissen@anu.edu.au
-------------------------------------------------------------------------------------------------------------------------------



<Prev in Thread] Current Thread [Next in Thread>
  • Months as a character vector? (summary), Karl Nissen <=