答案 0 :(得分:0)
在这种情况下,您会将其视为FTP
。
library(RCurl)
url = "https://www.ncei.noaa.gov/data/gsoy/access/"
filenames = getURL(url, dirlistonly = TRUE)
filenames <- strsplit(filenames, "\r\n")
filenames <- unlist(filenames)
download_filenames <- c("ZI000067781.csv", "ZI000067755.csv") #specify what files you want, do this in whatever way you desire, with a regex, list, etc.
sapply(download_filenames, function(x) {
download.file(paste(url, filename, sep = ""), paste(getwd(), "/", filename,
sep = ""))
}) #apply a download to your file names
您还可以依次将所需的csv
读入数据框中。就像MrFlick所说的那样,不确定您到底想要什么。