Description Usage Arguments Value Examples
This is an accesory function that catch error when downloading zip files It is OS dependent, using "curl" in Linux and "auto" in Windows.
1 | filedownload(url, filename)
|
url |
url of the file (currently a .zip) |
filename |
name of the downloaded file |
it returns the error or warning in case it has been producen. Otherwise it just download the file into the desired filename directory
1 2 3 4 5 6 7 8 9 10 | ## Not run:
# Download zip with municipality concello (in case it does not exist)
tempzip <- paste0(temp, concello, '.zip')
if(!file.exists(tempzip)){
getzip <- filedownload(URLencode(ziplink), tempzip)
} else {
cat("Not downloading PBA --> ", concello, "--> already exists")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.