【发布时间】:2016-05-27 07:35:50
【问题描述】:
我对 R 中的 weatherData 包有一些问题。因为我正在使用此代码:
a <- read.csv(url("http://www.wunderground.com/history/airport/sfo/2016/1/1/CustomHistory.html?dayend=27&monthend=5&yearend=2016&req_city=NA&req_state=NA&req_statename=NA&format=1"),
method ="libcurl")
我收到此错误:
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
unused argument (method = "libcurl")
经过一番搜索,我知道这可能是由于我的 R 版本 3.2.1 中没有安装 RCurl 包。但是当我开始安装RCurl 时,我得到了这个:
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/dell/R/x86_64-pc-linux-gnu-library/3.2/RCurl’
Warning in install.packages :
installation of package ‘RCurl’ had non-zero exit status
我使用的是 Ubuntu 14.04。 谁能帮帮我?
【问题讨论】:
-
您不需要这样做。只需将
read.csv()与url 一起使用,同时删除对url()的调用。所以试试read.csv("http://...")。 -
仍然出现同样的错误! @RichardScriven
-
它适用于我在 R 3.3.0 上并使用
read.csv("https://www.wunderground.com/history/airport/sfo/2016/1/1/CustomHistory.html?dayend=27&monthend=5&yearend=2016&req_city=NA&req_state=NA&req_statename=NA&format=1") -
哦...我的 R 版本是 3.2.2。您认为这可能是问题所在吗?
-
哦,你能告诉我有关 RCurl 包的信息吗?它没有安装。 @RichardScriven
标签: r ubuntu-14.04 packages rcurl install.packages