From hb at stat.berkeley.edu  Thu Dec 31 00:42:23 2009
From: hb at stat.berkeley.edu (Henrik Bengtsson)
Date: Wed, 30 Dec 2009 15:42:23 -0800
Subject: [Rd] Should file.access(as.character(NA)) return -1 (now 0)?
Message-ID: <59d7961d0912301542y4a0fe0d7u411fd7accca7a50c@mail.gmail.com>

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



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