【问题标题】:Error using download.file for web data on PC在 PC 上使用 download.file 获取 Web 数据时出错
【发布时间】:2014-11-14 16:30:19
【问题描述】:

我的代码:

网址http://dl.dropboxusercontent.com/u/26929842/ug_sch_apps.csv”

download.file(url, destfile = "./ug_sch_apps.csv", method="curl")

list.files("./ug_sch_apps.csv") 下载日期=日期()

ug_sch_apps 字符串AsFactors=F)

收到我的错误:

文件中的错误(文件,“rt”):无法打开连接 另外:警告信息: 在文件(文件,“rt”)中: 无法打开文件'./data/ug_sch_apps.csv':没有这样的文件或目录

【问题讨论】:

    标签: download


    【解决方案1】:

    您似乎忘记了 https:// 中的 s

    使用这些代码:

    url <- "https://dl.dropboxusercontent.com/u/26929842/ug_sch_apps.csv"

    download.file(url, destfile = "./data/ug_sch_apps.csv", method="curl")

    ug_sch_apps <- read.csv("./data/ug_sch_apps.csv" , stringsAsFactors=F)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-29
      • 1970-01-01
      • 1970-01-01
      • 2016-06-05
      • 2018-02-20
      • 2014-02-21
      • 1970-01-01
      相关资源
      最近更新 更多