bug in pdf(file = NULL)
Hi, pdf(file = NULL) will actually create a file named NA, which is inconsistent with its documentation. A minimal example: pdf(file = NULL) plot(1) dev.off() Perhaps this is a bug?
list.files(pattern = '^NA$')
character(0)
pdf(file = NULL) plot(1) dev.off()
null device ? ? ? ? ?1
list.files(pattern = '^NA$')
[1] "NA"
sessionInfo()
R version 2.14.1 (2011-12-22) Platform: x86_64-pc-linux-gnu (64-bit) locale: ?[1] LC_CTYPE=en_US.UTF-8 ? ? ? LC_NUMERIC=C ?[3] LC_TIME=en_US.UTF-8 ? ? ? ?LC_COLLATE=en_US.UTF-8 ?[5] LC_MONETARY=en_US.UTF-8 ? ?LC_MESSAGES=en_US.UTF-8 ?[7] LC_PAPER=C ? ? ? ? ? ? ? ? LC_NAME=C ?[9] LC_ADDRESS=C ? ? ? ? ? ? ? LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats ? ? graphics ?grDevices utils ? ? datasets ?methods ? base Regards, Yihui -- Yihui Xie <xieyihui at gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA