从RSTUDIO项目解开拉链文件返回错误



我将数据集的zip文件保存到rstudio项目中。我正在尝试解压缩文件。我从中得到了zip文件。然后,我将其保存在我的Rstudio项目中。我尝试了此代码:

filetemp <- "appendicitis.zip" ## just assign a name to a zip.file
appendDat <- read.table(unz( filetemp,"appendicitis.zip"))  ## to unzip and read the data.

我有这个错误"

    Error in open.connection(file, "rt") : cannot open the connection
In addition: Warning message:
In open.connection(file, "rt") :
  cannot locate file 'appendicitis.zip' in zip file 'appendicitis.zip'
Called from: open.connection(file, "rt")

请有任何帮助吗?

似乎不是使用appendicitis.zip的正确文件是问题。

appendDat <- read.table(unz( filetemp,"appendicitis.zip"))

请将appendicitis.zip名称更改为ZIP下文件的实际名称。假设appendicitis.zip中的实际文件是abc.dat。那么上线应为

appendDat <- read.table(unz( filetemp,"abc.dat"))

最新更新