There is also some inconsistency. Even though sqrt(-1) returns the warning/error about NaNs in German after setting the language to Spanish, if you give the command > messages() it will respond in Spanish.
On Mon, Jun 26, 2023 at 4:39 PM Dirk Eddelbuettel <e...@debian.org> wrote: > > > Ben, > > POSIX level / glibc level variables are set at process start and AGAIK cannot > really be altered after start. They clearly work when set _before_ calling > sqrt(-1): > > $ LANGUAGE=es Rscript -e 'sqrt(-1)' > [1] NaN > Warning message: > In sqrt(-1) : Se han producido NaNs > $ LANGUAGE=de Rscript -e 'sqrt(-1)' > [1] NaN > Warnmeldung: > In sqrt(-1) : NaNs wurden erzeugt > $ > > I think the `callr` package can help you with this use from with R by > effectively spawning a new process for you. Or, lower-level, you can call > `system()` or `system2()` yourself and take care of the setup. > > Cheers, Dirk > > -- > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel