admin 管理员组

文章数量: 1184232

R语言使用download.file函数下载网络文件到本地(Download File from the Internet)

目录


download.file函数

download.file(url,destfile,method,quiet=FALSE,mode="w",cacheOK=TRUE,extra=getOption("download.file.extra"))
    url:字符串,必须
    destfile:下载文件的保存地址,默认工作目录,file为保存文件名
    method:提供"internal","wget","curl","lynx","libcurl","wininet".windows上通常internal就能解决大多数的问题,少数搞不定的如Cygwin,gnuwin32用"wget",windows二进制文件用"curl".method对于Mac用户来说是都要设置的."lynx"主要针对historical interest
    quiet:TRUE-禁止状态消息,显示进度条
    mode:写入文件模式,只能在method="internal"时使用,"w"/"wb"(binary)/"a"(append)/"ab"
    cacheOK:是否接受服务器端的缓存值,对

#压缩文件链接

#数据连接

本文标签: 新手必学 利用 编程