r - R编程中的download.file
问题描述
我试图从函数“download.file”下载文件,当我尝试编写这段代码时发现了这个问题
fileurl1<-"https://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD"
download.file(fileUrl1, destfile = "./C:/Users/DELL/Desktop")
download.file 中的错误(fileUrl1,destfile = “./C:/Users/DELL/Desktop”):无法打开 destfile './C:/Users/DELL/Desktop',原因是“参数无效”
解决方案
Destination 必须是 csv 文件的路径,而不是文件夹的路径。尝试 :
download.file(fileurl1, './C:/Users/DELL/Desktop/temp.csv')
推荐阅读
- android - 用动态键改造 gson
- r - 将具有相交基因和冗余列的 data.frames 列表连接到一个唯一的 data.frame 中
- ionic3 - 带有 api 的 Ionic 应用程序未在真实设备上运行
- amazon-web-services - 如何为 AWS 创建 Kubernetes Ingress
- postgresql - postgresql 查询未返回预期结果
- javascript - Promise 的脚本执行顺序
- r - 找不到对象“真”
- java - 带有旧 TableModel 的 JavaFx TableView
- docker - docker上的couchdb:打开控制台
- r - 查找最近的封闭 FALSE 值位置