0

How can I change permanently the language of error messages in R? I have seen this question but I still don't get how to add the environment variable to the system.

Thanks a lot

Alberto
  • 41
  • 6
  • OS, please? This is easier to answer if you tell us which of the solutions in the link you have tried and what failed. – Rui Barradas Aug 26 '20 at 15:39
  • You can add `LANG="fr"` (or whatever language) to [`.Renviron`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html), or add `Sys.setenv(LANG="fr")` to `.Rprofile`, or export an environment variable in your OS outside of and before starting R. In windows, search for `environment` and you'll see `Edit the system environment variables`; in linux, add `export LANG="fr"` to one of your home/dot-bash files or etc/bash files; in macos ... I suspect it's the same as linux, but I don't know. A web search for `environment variable` (and your OS) will be very fruitful. – r2evans Aug 26 '20 at 15:45
  • Windows10, thank you. I am speaking about Chase's solution with the `Sys.setenv()` function, which changes the language but only temporarily. I tried Alessandro Jacopson's solution as well but it didn't work – Alberto Aug 26 '20 at 15:48
  • Did you try *my* comment? All of those are non-temporary, either R-only (`.Renviron` or `.Rprofile`) or all apps/terminal (user or system variables). – r2evans Aug 26 '20 at 16:23
  • Thanks so much, I used `.Renviron` and it worked! – Alberto Aug 27 '20 at 15:20

0 Answers0