[Rd] Should file.access(as.character(NA)) return -1 (now 0)?

From: Henrik Bengtsson <hb_at_stat.berkeley.edu>
Date: Wed, 30 Dec 2009 15:42:23 -0800


Should file.access(as.character(NA)) return -1 to be consisting with non-existing files?

> file.access(c("Non-existing-file", NA), mode=1)

Non-existing-file              <NA>
               -1                 0

> file.access(c("Non-existing-file", NA), mode=2)
Non-existing-file <NA> -1 0
> file.access(c("Non-existing-file", NA), mode=4)
Non-existing-file <NA> -1 0

/Henrik

> sessionInfo()

R version 2.10.1 Patched (2009-12-24 r50837) i386-pc-mingw32

locale:

[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 30 Dec 2009 - 23:49:16 GMT

This archive was generated by hypermail 2.2.0 : Thu 31 Dec 2009 - 06:21:16 GMT