在r中下载文本文件
downloading a text file in r
好吧,这真的很傻。为什么会出现此错误?不能 R 只在工作目录中创建一个新文件吗?
非常感谢
> url <- "http://faculty.chicagobooth.edu/lubos.pastor/research/liq_data_1962_2013.txt"
> download.file(url, file, mode='wb')
Error in download.file(url, file, mode = "wb") :
invalid 'destfile' argument
在工作目录中下载目标 file.txt:
getwd()
url <- "http://faculty.chicagobooth.edu/lubos.pastor/research/liq_data_1962_2013.txt"
download.file(url, "file.txt" )
好吧,这真的很傻。为什么会出现此错误?不能 R 只在工作目录中创建一个新文件吗?
非常感谢
> url <- "http://faculty.chicagobooth.edu/lubos.pastor/research/liq_data_1962_2013.txt"
> download.file(url, file, mode='wb')
Error in download.file(url, file, mode = "wb") :
invalid 'destfile' argument
在工作目录中下载目标 file.txt:
getwd()
url <- "http://faculty.chicagobooth.edu/lubos.pastor/research/liq_data_1962_2013.txt"
download.file(url, "file.txt" )