I use the function tempdirto create a temporary directory where I extract the .zip files using the function unzip. In this regard, I found it advisable to delete temporary directories so as not to fill up my computer with recycling data. For this purpose I used a function unlink. Using functions unlinkbefore functions ?or plotcauses an error on my computer (OS X Mavericks). I did not check if this is the case for other operating systems. I did some search queries and one theory for a similar error message that this problem could be related to an encrypted hard drive. My hard drive is encrypted so that it can fit. But I do not understand why this is important, since functions plotor ?should not be associated with the operationunlink. Here is an example:
location <- tempdir()
?plot
unlink(location, recursive = TRUE)
?plot
The job of working with a warning in R does not work in R Studio:
plot(1:10)
# Warning message:
# In file(out, "wt") :
# cannot open file
This is similar to working in studio R, but not in R:
graphics.off()
?plot
plot(1:10)
What's going on here? If the problem is with my encrypted hard drive, is there an easier way to extract ZIP files without generating recycling data?
PS. Here is my session information (I had the same problem with R version 3.0.2):
sessionInfo()
R version 3.0.3 (2014-03-06)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grDevices datasets splines grid utils graphics stats methods base
other attached packages:
[1] devtools_1.4.1 roxygen2_3.0.0 gridExtra_0.9.1 data.table_1.8.10 xlsx_0.5.5 xlsxjars_0.5.0 rJava_0.9-6
[8] reshape2_1.2.2 ggplot2_0.9.3.1 plyr_1.8 Hmisc_3.13-0 Formula_1.1-1 survival_2.37-7 lattice_0.20-24
[15] cluster_1.14.4
loaded via a namespace (and not attached):
[1] brew_1.0-6 codetools_0.2-8 colorspace_1.2-4 dichromat_2.0-0 digest_0.6.4 evaluate_0.5.1
[7] gtable_0.1.2 httr_0.2 labeling_0.2 MASS_7.3-29 memoise_0.1 munsell_0.4.2
[13] parallel_3.0.3 proto_0.3-10 RColorBrewer_1.0-5 RCurl_1.95-4.1 scales_0.2.3 stringr_0.6.2
[19] tools_3.0.3 whisker_0.3-2
Mikko source
share