问题:
[问题类型]:
程式咨询(我想用R 做某件事情,但是我不知道要怎么用R 写出来)
[软件熟悉度]:
新手(没写过程式,R 是我的第一次)
[问题叙述]:
想要写自动化下载气象局监测资料CSV档的脚本,但光单纯下载一个连结的CSV档却跟
单纯连结手动点选下载的CSV档内容不同
[程式范例]:
testurl =
"https://e-service.cwb.gov.tw/HistoryDataQuery/YearDataController.do?
command=viewMain&station=466950&stname=%25E5%25BD%25AD%25E4%25BD%25B3
%25E5%25B6%25BC&datepicker=2018"
download.file(url = testurl,destfile = "C:/DATA/4669502018.csv",method =
"curl")
[环境叙述]:
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950
[2] LC_CTYPE=Chinese (Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RCurl_1.95-4.12 bitops_1.0-6 RSQLite_2.1.2
loaded via a namespace (and not attached):
[1] bit_1.1-14 compiler_3.6.1 backports_1.1.5 DBI_1.0.0
[5] tools_3.6.1 memoise_1.1.0 Rcpp_1.0.2 bit64_0.9-7
[9] vctrs_0.2.0 blob_1.2.0 zeallot_0.1.0 digest_0.6.21
[13] rlang_0.4.0
[关键字]:
气象局