url2data: Create local copies of files read from urls.

Description Usage Arguments Details Examples

View source: R/url2data.R

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

1
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

1
# See ~R\library\FinTS\scripts\TsayFiles.R  

FinTS documentation built on May 29, 2017, 9:08 a.m.