Environment: Windows 7 RStudio Version 0.99.491
I programmed R for 4 months through the Coursera Data Science curriculum, but NEVER was successful in using the decompress function.
I looked on the forums for hours for potential solutions, syntax problems, undefined arguments, etc., but to no avail. I, in the end, unzip the contents manually and get down to the task, but I'm tired of not knowing why it doesn't work.
Here are some examples of errors:
fileName <- "StormData.zip"
unzip(fileName, exdir = mainDir,subDir)
Warning message: in unzip (fileName, exdir = mainDir, subDir): error 1 when extracting from a zip file
unzip(fileName)
Warning message: in unzip (fileName): error 1 while extracting from zip file
unzip(fileName, "stormdata.csv")
Warning message: in unzip (fileName, "stormdata.csv"): error 1 to extract from zip file
unzip(fileName, "stormdata.csv", list = TRUE)
Unpacking error (file_name, "stormdata.csv", list = TRUE): zip file 'StormData.zip' cannot be opened
Any suggestions would be greatly appreciated.
r unzip
Richmodo
source share