I've tried a bunch of different R versions, I can't seem to replicate what
you described. Here's the code I used:
R.pattern <- paste0("^R-", .standard_regexps()$valid_R_system_version, "$")
x <- list.files(dirname(R.home()), pattern = R.pattern, full.names = TRUE)
x <- x[file.info(x, extra_cols
> grep(value=TRUE, invert=TRUE, "$", strsplit(Sys.getenv("PATH"),
";")[[1]])
[1] "C:\\rtools40\\usr\\bin"
[2] "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath"
[3] "C:\\Program Files\\ImageMagick-7.0.11-Q16-HDRI"
[4] "C:\\WINDOWS\\system32"
[5] "C:\\WINDOWS"
[6]
> Bill Dunlap
> on Mon, 20 Dec 2021 08:40:04 -0800 writes:
>>
>> > Why would one ever *add* a final unneeded path separator,
>> > unless one wanted it?
>>
> Good question, but it is common for Windows installer programs to add a
> terminal backslash to PATH
>
> > Why would one ever *add* a final unneeded path separator,
> > unless one wanted it?
>
Good question, but it is common for Windows installer programs to add a
terminal backslash to PATH entries. E.g., on my Windows laptop I get
> grep(value=TRUE, "$",
LSE, & base::t.
Jorgen Harmse.
Message: 1
Date: Sat, 18 Dec 2021 15:55:37 +0100
From: Mario Reutter
To: r-help@r-project.org
Subject: [R] Bug in list.files(full.names=T)
Message-ID:
Content-Type: text/plain; charset="utf-8"
Dear everybody,
> Martin Maechler
> on Mon, 20 Dec 2021 09:46:23 +0100 writes:
> Mario Reutter
> on Sat, 18 Dec 2021 15:55:37 +0100 writes:
>> Dear everybody,
>> I'm a researcher in the field of psychology and a
>> passionate R user. After having updated to the newest
> Mario Reutter
> on Sat, 18 Dec 2021 15:55:37 +0100 writes:
> Dear everybody,
> I'm a researcher in the field of psychology and a
> passionate R user. After having updated to the newest
> version, I experienced a problem with list.files() if the
> parameter
I don't know the answer to your question, but I see the same behaviour
on MacOS, e.g. list.files("./") includes ".//R" in the results on my
system. Both "./R" and ".//R" are legal ways to express that path on
MacOS, so it's not a serious bug, but it does look ugly.
Duncan Murdoch
On
Dear everybody,
I'm a researcher in the field of psychology and a passionate R user. After
having updated to the newest version, I experienced a problem with
list.files() if the parameter full.names is set to TRUE.
A path separator "/" is now always appended to path in the output even if
path %>%
9 matches
Mail list logo