Re: [Rd] dir.exists returns FALSE on Symlink directory

2023-06-26 Thread Dipterix Wang
Thanks! I think Sys.readlink resolved my issue. Indeed I found a permission issue. I will post my questions to r-help next time. Best, Dipterix > On Jun 26, 2023, at 11:17 AM, Serguei Sokol wrote: > > Le 26/06/2023 à 16:26, Dipterix Wang a écrit : >> I hope I'm not asking a stupid question...

Re: [Rd] dir.exists returns FALSE on Symlink directory

2023-06-26 Thread Serguei Sokol via R-devel
Le 26/06/2023 à 17:17, Serguei Sokol a écrit : Le 26/06/2023 à 16:26, Dipterix Wang a écrit : I hope I'm not asking a stupid question... Many think that there is no such thing as "stupid question". However, this one looks more appropriate for r-help list, does not it?   If I symlink a directo

Re: [Rd] dir.exists returns FALSE on Symlink directory

2023-06-26 Thread Serguei Sokol via R-devel
Le 26/06/2023 à 16:26, Dipterix Wang a écrit : I hope I'm not asking a stupid question... Many think that there is no such thing as "stupid question". However, this one looks more appropriate for r-help list, does not it? If I symlink a directory, is symlink considered as directory in R? If

Re: [Rd] dir.exists returns FALSE on Symlink directory

2023-06-26 Thread Stephen H. Dawson, DSL via R-devel
It sounds like either R as a whole or the R session does not have permission to view the directory. *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdawson.com On 6/26/23 11:07, Ivan Krylov wrote: В Mon, 26 Jun 2023 10:26:07 -0400 Dip

Re: [Rd] dir.exists returns FALSE on Symlink directory

2023-06-26 Thread Ivan Krylov
В Mon, 26 Jun 2023 10:26:07 -0400 Dipterix Wang пишет: > If I symlink a directory, is symlink considered as directory in R? It seems to work, at least on GNU/Linux: # (on this system, /var/lock is a symbolic link pointing to /run/lock/) system('ls -l /var/lock') # lrwxrwxrwx 1 root root <...> /

[Rd] dir.exists returns FALSE on Symlink directory

2023-06-26 Thread Dipterix Wang
I hope I'm not asking a stupid question... If I symlink a directory, is symlink considered as directory in R? If so, why `dir.exists` returns FALSE on directory? I understand symlink is essentially a file, but functionally a symlink to directory is no different to the directory itself, but a di

Re: [Rd] restoring LANGUAGE env variable within an R session

2023-06-26 Thread Ben Bolker
Thanks, this is exactly PR#18055. Should have looked (but assumed I was probably just overlooking something ...) On 2023-06-26 10:02 a.m., Sebastian Meyer wrote: Translated strings are cached. I'd recommend to use the     • New partly experimental Sys.setLanguage() utility, solving the    

Re: [Rd] restoring LANGUAGE env variable within an R session

2023-06-26 Thread Sebastian Meyer
Translated strings are cached. I'd recommend to use the • New partly experimental Sys.setLanguage() utility, solving the main problem of PR#18055. introduced in R 4.2.0. Best, Sebastian Meyer Am 26.06.23 um 15:15 schrieb Ben Bolker: I was playing around with the settin

Re: [Rd] restoring LANGUAGE env variable within an R session

2023-06-26 Thread Ben Bolker
That's reasonable, but I'm wondering why it works the *first* time it's called in a session. Is this just undefined behaviour (so I shouldn't be surprised whatever happens)? Again, $ Rscript -e 'sqrt(-1); Sys.setenv(LANGUAGE="es"); sqrt(-1)' [1] NaN Warning message: In sqrt(-1) : NaNs produc

Re: [Rd] restoring LANGUAGE env variable within an R session

2023-06-26 Thread Eric Berger
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 wrote: > > > Ben, > > POSIX level / gli

Re: [Rd] restoring LANGUAGE env variable within an R session

2023-06-26 Thread Dirk Eddelbuettel
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 $ LANGUA

[Rd] restoring LANGUAGE env variable within an R session

2023-06-26 Thread Ben Bolker
I was playing around with the setting of the LANGUAGE variable and am wondering whether I'm missing something obvious about resetting the value to its original state once it's been set. I seem to be able to reset the language for warnings/errors once, but not to change it a second time (or r