捕获的天气数据,我想执行环路捕获从使用以下代码的多个站的气象数据:R:循环从多个站
library(rwunderground)
sample_df <- data.frame(airportid = c("K6A2",
"KAPA",
"KASD",
"KATL",
"KBKF",
"KBKF",
"KCCO",
"KDEN",
"KFFC",
"KFRG"),
stringsAsFactors = FALSE)
history_range(set_location(airport_code =sample_df$airportid), date_start = "20170815", date_end = "20170822",
limit = 10, no_api = FALSE, use_metric = FALSE, key = get_api_key(),
raw = FALSE, message = TRUE)
它不会工作。
太棒了!乐意效劳。并且请注意在StackOverflow上说[谢谢](https://meta.stackexchange.com/a/5235)的特殊方式! – Parfait
再次感谢您的帮助。作为最后一个问题,我如何将它保存为csv文件或其他文件? –
我不知道API返回的是什么。如果是数据帧/矩阵,请参见在'write.csv'中添加的上述更新中的扩展函数。 – Parfait