我想用R读取在线数据,download.file()如下所示.
URL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv"
download.file(URL, destfile = "./data/data.csv", method="curl")
Run Code Online (Sandbox Code Playgroud)
有人向我建议我添加该行setInternet2(TRUE),但它仍然无效.
我得到的错误是:
Warning messages:
1: running command 'curl "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv" -o "./data/data.csv"' had status 127
2: In download.file(URL, destfile = "./data/data.csv", method = "curl", :
download had nonzero exit status
Run Code Online (Sandbox Code Playgroud)
感谢您的帮助.