我正在尝试使用以下代码将CSV文件直接导入到我的R中:
url <- "https://www.kaggle.com/zusmani/us-mass-shootings-last-50-years/downloads/us-mass-shootings-last-50-years.zip/4"
temp <- tempfile()
download.file(url, temp)
citibike <- read.csv(unz(temp, "Mass-Shootings-Dataset-Ver-5.csv"),
stringsAsFactors = FALSE)
unlink(temp)
但是我收到以下错误消息:
Error in open.connection(file, "rt") : cannot open the connection
In addition: Warning message:
In open.connection(file, "rt") :
cannot open zip file 'C:\Users\corey\AppData\Local\Temp\RtmpCMd1pT\file4084193345f6'
我在做什么错?