[R-br] set locale no Linux

Manoel Galdino mcz.fea em gmail.com
Segunda Setembro 15 15:20:54 BRT 2014


Olá,

Eu tentei mudar o local do R (time) pra Brasil, mas não consegui. Alguém
consegue me ajudar? Segue abaixo o que tentei fazer e o máximo de info
possível para o resultado ser reproduzível.

Eu tentei:

Sys.setlocale("LC_TIME", "Portuguese_Brazil.UTF-8")[1] ""Warning
message:In Sys.setlocale("LC_TIME", "Portuguese_Brazil.UTF-8") :
  OS reports request to set locale to "Portuguese_Brazil.UTF-8" cannot
be honored


Tentei outras variantes de Brasil (como "br", "BR", mas não funcionou). Aí,
procurando no StackOverflow, descobri como recuperar os localles possíveis
(no linux, pelo que entendi):

locales <- system("locale -a", intern = TRUE)> library(stringr)>
unique(str_split_fixed(locales, "\\.", 2)[, 1]) [1] "C"     "POSIX"
"en_AG" "en_AU" "en_BW" "en_CA" "en_DK" "en_GB" "en_HK" "en_IE"
"en_IN" "en_NG" "en_NZ" "en_PH" "en_SG" "en_US" "en_ZA" "en_ZM"
"en_ZW"


Como se vê pela lista acima, não parece haver opção de pt ou br. Alguma
ideia de como resolver isso?

Session info do R:

> sessionInfo()R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C         LC_TIME=C
LC_COLLATE=C         LC_MONETARY=C        LC_MESSAGES=C
LC_PAPER=C
 [8] LC_NAME=C            LC_ADDRESS=C         LC_TELEPHONE=C
LC_MEASUREMENT=C     LC_IDENTIFICATION=C

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets
methods   base

other attached packages:
 [1] stringr_0.6.2          RGoogleAnalytics_0.1.1 httr_0.5
   lubridate_1.3.2        extrafont_0.16         scales_0.2.3
 [7] httpuv_1.3.0           reshape_0.8.5          gridExtra_0.9.1
   plyr_1.8               rjson_0.2.13           RCurl_1.95-4.1
[13] bitops_1.0-6           ggplot2_0.9.3.1        data.table_1.9.3
   RJDBC_0.2-1            rJava_0.9-4            DBI_0.2-7

loaded via a namespace (and not attached):
 [1] MASS_7.3-29        RColorBrewer_1.0-5 Rcpp_0.11.1
Rttf2pt1_1.3.2     colorspace_1.2-4   dichromat_2.0-0    digest_0.6.3
     extrafontdb_1.0
 [9] gtable_0.1.2       jsonlite_0.9.11    labeling_0.2
memoise_0.1        munsell_0.4.2      proto_0.3-10
reshape2_1.2.2     tools_3.0.2




Meu OS é Linux GNU Ubuntu 12.04

Grato,
Manoel
-- 
Manoel Galdino
https://sites.google.com/site/galdinomcz/
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20140915/6c3b2aa8/attachment.html>


Mais detalhes sobre a lista de discussão R-br