downloadIfOld: Download a file

View source: R/download.R

downloadIfOldR Documentation

Download a file

Description

Checks if a downloaded file is old and re-downloads is necessary

Usage

downloadIfOld(
  url,
  path = getwd(),
  file = file.path(path, make.names(basename(url))),
  age = "6 months",
  overwrite = FALSE,
  verbose = FALSE,
  ...
)

Arguments

url

a string specifying the remote location

path

local directory to store downloaded files

file

local file name

age

maximum age of the local file

overwrite

replace existing unzipped files

verbose

print additional information

...

additional arguments for download.file

Details

Checks if a downloaded file is old and re-downloads is necessary. Any zip files are unzipped.

Value

A character string of files downloaded or unzipped.

See Also

download.file, unzip

Examples

## Not run:   
  theFiles = Pmisc::downloadIfOld(
    'https://cran.r-project.org/src/base/Historic/Windows/mva.zip'
  )
  theFiles

## End(Not run)

Pmisc documentation built on Feb. 14, 2024, 3 a.m.