简体   繁体   English

无法读取R中具有readtext的.txt压缩文件

[英]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 文章文件包含大约2000个文本文件

I tried the below command in R but it gives an error 我在R中尝试了以下命令,但给出了错误

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 我想无论如何它都会与多个zip文件混淆,以便我可以读取Article文件夹中的文本文件而无需在本地解压缩它们

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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