Could not find function “zip.file.extract”

2020-04-21 07:28发布

问题:

library(utils)

a<-zip.file.extract("\\1\\1.csv",zipname="drivers.zip")

Error: could not find function "zip.file.extract"

What's going on?

回答1:

zip.file.extract() is a defunct function as of R 2.14 (see ?"utils-defunct" help page or try brining up the ?zip.file.extract help page). Use the unzip() function instead. Perhaps

unzip("drivers.zip", files="\1\1.csv")

or you can omit the files= to extract all files in the zip archive to the current working directory.



标签: r unzip zipfile