简体   繁体   中英

Unable to read a .txt zipped file with readtext in R

I have a zipped file containing Another folder with multiple text files

It is structured like below:

C:\DS\SUPERvised\**excerise.7z**\Data Science excercie \**Articles**\

The articles file has approximately 2000 text files

I tried the below command in R but it gives an error

DATA_DIR <- system.file("extdata/", package = "readtext")

readtext(paste0(DATA_DIR, "/C:/DS/SUPERvised/**excerise.7z**/Data Science excercie /**Articles**/*"))

I guess it is confusing with the multiple zip files anyway to resolve it such that I can read the text files in Article folder without un-compressing them locally

解压缩函数有一个名为“ list”的参数(如果您询问我的话,名称很短),其默认值为FALSE,但是如果将其设置为TRUE,则只会得到zip文件的内容:

unzip(zipfile, files = NULL, list = FALSE,  #leaving off the rest of the named arguments

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM