[R] list.files changed in 2.7.0
davidr at rhotrading.com
davidr at rhotrading.com
Fri Jan 23 23:42:24 CET 2009
I just noticed a change in the behavior of list.files from 2.6.1pat to
2.7.0
(I noticed it in 2.8.1 and traced back.)
Previously, if the directory ended with a slash, and full.names=TRUE,
the names
returned had a single slash at the end of the directory,
but now there are two. I noticed since I was getting a list of certain
files and
then grepping in the list for a full name formed with a single slash.
(The double slash would be OK if I were opening the file since the OS
treats double
slash in a path the same as a single slash.)
I searched through the release notes, etc., and couldn't find this
announced.
Try
> list.files("C:", full.names=TRUE)
> list.files("C:/", full.names=TRUE)
Is there any chance that this could be put back to the single slash
behavior?
(This was on Windows XP.)
Thanks,
David L. Reiner
More information about the R-help
mailing list