url2data {FinTS} | R Documentation |
Create local copies of files read from urls
Description
Call 'download.file' with each element of a vector of character strings assumed to be URLs, create a local copy for each, and return a character matrix summarizing what was done.
Usage
url2data(url.)
Arguments
url. |
a vector of character strings assumed to be URLs, whose names are assumed to be the names to be used for local copies of the URLs. |
Details
1. fili <- names(urls.)
2. dati <- fili
without its extension, i.e., the part
following the last '.'
3. for(i in 1:length(url.)try(download.file(url.[i], fili[i]));
found[i] = TRUE
if something found and FALSE if not.
4. Return a character matrix with 4 columns: data = dati, file = fili, url = url., and found.
Examples
# See ~R\library\FinTS\scripts\TsayFiles.R
[Package FinTS version 0.4-9 Index]