Re: [R] Change the language of the labels in a graph

2006-04-24 Thread Prof Brian Ripley
LANGUAGE controls the language of message translations: see the R-admin 
manual, which incidentally also points out you should not expect to change 
that whilst R is running.

Second, your input dates are in English so you need English as the 
language for your as.Date command.  The following works for me

x <- as.Date(c("1jan1960", "2jan1960", "31mar1960", "30jul1960"), "%d%b%Y")
Sys.setlocale("LC_TIME", "fr_CA")
plot(x, 1:4)

but you haven't told us your OS and the locale name will be 
OS-dependent (and so may the abbreviations).

On Mon, 24 Apr 2006, Lapointe, Pierre wrote:

> Hello,
>
> How do you change the language of the labels in a graph.  In this example, I
> want to get French labels by changing Sys.putenv.  I should get "Mai"
> instead of "May".
>
> Sys.putenv(LANGUAGE="fr")
> x <- as.Date(c("1jan1960", "2jan1960", "31mar1960", "30jul1960"), "%d%b%Y")
> y <-1:4
> plot(x,y)
>
>
> Regards,
>
> Pierre Lapointe
>
>
> **
> AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

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


Re: [R] Change the language of the labels in a graph

2006-04-24 Thread Gabor Grothendieck
This works for me on my Windows XP system:

Sys.putenv("LANGUAGE"="FR"); Sys.setlocale("LC_ALL","FR")


On 4/24/06, Lapointe, Pierre <[EMAIL PROTECTED]> wrote:
> Hello,
>
> How do you change the language of the labels in a graph.  In this example, I
> want to get French labels by changing Sys.putenv.  I should get "Mai"
> instead of "May".
>
> Sys.putenv(LANGUAGE="fr")
> x <- as.Date(c("1jan1960", "2jan1960", "31mar1960", "30jul1960"), "%d%b%Y")
> y <-1:4
> plot(x,y)
>
>
> Regards,
>
> Pierre Lapointe
>
>
> **
> AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

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


[R] Change the language of the labels in a graph

2006-04-24 Thread Lapointe, Pierre
Hello,

How do you change the language of the labels in a graph.  In this example, I
want to get French labels by changing Sys.putenv.  I should get "Mai"
instead of "May".

Sys.putenv(LANGUAGE="fr")
x <- as.Date(c("1jan1960", "2jan1960", "31mar1960", "30jul1960"), "%d%b%Y")
y <-1:4
plot(x,y)


Regards,

Pierre Lapointe


**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}

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