in R how to get error messages in english

喜你入骨 提交于 2019-12-01 14:05:54

问题


I am trying some tutorials on bioconductor; but I get error messages, that I would like to search/submit; unfortunately, since R is installed on a system configured in french, R returns me messages in french; how could I have these messages in english.

My system: Ubuntu 10.04 runing gnome 3; R version is the last (2.15.1) Bioconductor have been updated to 2.10,

and I try to download/use datasets GSE20986 (but I have had a similar error with another dataset GSE2034, while following the procedure given in "R in a nutshell"); to those of you speaking french the error message that I get is:

> getGEOSuppFiles("GSE20986")
[1] "ftp://ftp.ncbi.nlm.nih.gov/pub/geo/DATA/supplementary/series/GSE20986/"
Erreur dans scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
  la ligne 1 n'avait pas 6 éléments

Thanks for your help.


回答1:


I think you need to set the LANGUAGE environment variable when you start R. try starting R like this:

$ LANGUAGE=en R



回答2:


In general, on linux, try at the command line

locale -a

to get a list of locales, maybe you want en_US.utf8, and then

LC_ALL=en_US.utf8 R

but it's often better to opt for "C" locale, which is plain old text.

LC_ALL=C R

In an R session, Sys.setlocale("LC_ALL", "en_US.utf8") or other components from Sys.getlocale() and the locales supported on your system and reported from locale -a.




回答3:


For me worked in R:

Sys.setlocale("LC_MESSAGES", "C")

Ubuntu 16.04
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"

Also for me Sys.setenv(LANGUAGE='en') did not work.



来源:https://stackoverflow.com/questions/12642651/in-r-how-to-get-error-messages-in-english

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!