[Rd] normalizePath output depends on existence of directory
murdoch.duncan at gmail.com
Wed Mar 11 14:07:12 CET 2015
On 11/03/2015 8:55 AM, Thierry Onkelinx wrote:
> Dear all,
> I'm not sure whether this is intended behaviour or a bug. The path returns
> from normalizePath is different when the directory doesn't exist. I have
> included a reproducible example.
See the help page.
> path <- tempfile()
> missing.dir <- normalizePath(path, winslash = "/", mustWork = FALSE)
> existing.dir <- normalizePath(path, winslash = "/", mustWork = FALSE)
> > all.equal(missing.dir, existing.dir)
>  "1 string mismatch"
> > missing.dir
>  "C:/Users/THIERR~2/AppData/Local/Temp/RtmpagA8Gx/filed5c2cd03543"
> > existing.dir
> R version 3.1.2 (2014-10-31)
> Platform: i386-w64-mingw32/i386 (32-bit)
>  LC_COLLATE=Dutch_Belgium.1252 LC_CTYPE=Dutch_Belgium.1252
>  LC_NUMERIC=C LC_TIME=Dutch_Belgium.1252
> attached base packages:
>  stats graphics grDevices utils datasets methods base
> loaded via a namespace (and not attached):
>  fortunes_1.5-2 tools_3.1.2
> Best regards,
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
> team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
> Kliniekstraat 25
> 1070 Anderlecht
> To call in the statistician after the experiment is done may be no more
> than asking him to perform a post-mortem examination: he may be able to say
> what the experiment died of. ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data. ~ Roger Brinner
> The combination of some data and an aching desire for an answer does not
> ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
> [[alternative HTML version deleted]]
> R-devel at r-project.org mailing list
More information about the R-devel