This does downloading (via downloadFile), checksumming (Checksums),
and extracting from archives (extractFromArchive), plus cleaning up of input
arguments (e.g., paths, function names).
This is the first stage of three used in prepInputs.
preProcess(targetFile = NULL, url = NULL, archive = NULL, alsoExtract = NULL, destinationPath = ".", fun = NULL, quick = getOption("reproducible.quick"), overwrite = FALSE, purge = FALSE, useCache = getOption("reproducible.useCache", FALSE), ...)
| targetFile | Character string giving the path to the eventual file
(raster, shapefile, csv, etc.) after downloading and extracting from a zip
or tar archive. This is the file before it is passed to
|
|---|---|
| url | Optional character string indicating the URL to download from.
Normally, if used within a module, this url should be explicitly given as
sourceURL for an |
| archive | Optional character string giving the path of an archive
containing |
| alsoExtract | Optional character string naming files other than
|
| destinationPath | Character string of a directory in which to download
and save the file that comes from |
| fun | Character string indicating the function to use to load
|
| quick | Logical. This is passed internally to |
| overwrite | Logical. Should downloading and all the other actions occur even if they pass the checksums or the files are all there. |
| purge | Logical or Integer. |
| useCache | Passed to Cache in various places. Default |
| ... | Additional arguments passed to |
A list with 5 elements, checkSums (the result of a Checksums
after downloading), dots (cleaned up ..., including deprecated argument checks),
fun (the function to be used to load the preProcessed object from disk),
targetFilePath (the fully qualified path to the targetFile),
and tryRasterFn (a logical whether the the targetFilePath
should be loaded with raster).