Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get R warnings and errors in english

I'd like R to show me debug messages in english instead that in my locale (Italian). Having messages in italians makes it difficult to look on the internet for help on debugging. Not to mention that sometimes translations are sloppy at least.

How can revert R to use only the original version of messages and not to translate them?

thanks!

like image 542
Bakaburg Avatar asked Jul 31 '14 15:07

Bakaburg


People also ask

How to check for an error in R?

The most useful tool to determine where a error occurred is traceback() . Or use RStudio, which displays it automatically where an error occurs. browser() pauses execution at the specified line and allows you to enter an interactive environment.

How do I turn off error messages in R?

The simplest way of handling conditions in R is to simply ignore them: Ignore errors with try() . Ignore warnings with suppressWarnings() . Ignore messages with suppressMessages() .


1 Answers

You want to set the "LANGUAGE" environment variable (see relevant documentation):

Sys.setenv(LANGUAGE='en')

To do this, though, you need to have message translations installed (which I believe are optional on at least some platforms).

like image 119
Thomas Avatar answered Sep 27 '22 22:09

Thomas