Unzip password protected zip files in R

前端 未结 4 1112
臣服心动
臣服心动 2021-01-06 04:48

A password cannot be specified in unzip (utils) function. The other function I am aware of, getZip (Hmisc), only works fo

4条回答
  •  时光说笑
    2021-01-06 05:13

    password ← "your password"

    read.table(text=system(paste0("unzip -p -P ", password, " yourfile.zip ", "yourfile.csv"),intern = "TRUE"),stringsAsFactors=FALSE,header=TRUE,sep=",")
    

提交回复
热议问题