By default this function will check for an up to date local version of the remote file using the download.file.wcheck function.

fc_download_data(url, type = c("data", "db", "bigmat", "ff"),
  overwrite = getOption("flycircuit.remote_overwrite"), ...)

Arguments

url

the location of the remote file.

type

the type of file (data, db, or bigmat).

overwrite

whether to overwrite an existing file. If NULL (the default package option), the HTTP headers are inspected to see if the remote version is newer than the local version and only downloads the remote version if this is so.

...

additional arguments passed to download.file (e.g. quiet).

Value

The path to the downloaded file.

Details

The default value for the overwrite argument can be changed by setting options('flycircuit.remote_overwrite') to TRUE or FALSE. Setting this to FALSE may be useful if checking the headers of the remote files takes too long.

See also

Examples

# NOT RUN {
fc_download_data("http://myurl.com/data", quiet=TRUE)
fc_download_data("http://myurl.com/data.ff", type='ff')

fc_download_data("http://myurl.com/data.desc", type='bigmat')
# }