【发布时间】:2021-03-29 13:23:14
【问题描述】:
我有兴趣看看是否可以从 url 直接加载(到 R)txt 文件,而不是下载它然后导入它。
我在这里看到了这个帖子:Access a URL and read Data with R
显然可以使用 csv 文件执行此操作。 txt文件可以做同样的事情吗?
我尝试为以下网站改编此 stackoverflow 帖子中的代码:https://mantas.info/wp/wp-content/uploads/simple_esn/MackeyGlass_t17.txt
myfile <- read.txt(url("https://mantas.info/wp/wp-content/uploads/simple_esn/MackeyGlass_t17.txt"))
但它似乎不起作用。
我做错了吗?或者是不能直接将一个txt文件从一个url加载到R中?
谢谢
【问题讨论】:
标签: r url text import download