Fetch: Fetch R objects described in a data.frame

Description Usage Arguments Details Value Author(s) Examples

View source: R/Fetch.r

Description

Download a batch of R objects from Opasnet servers.

Usage

1
2
Fetch(dependencies, evaluate = FALSE, indent = 0, verbose = TRUE, ...)
Fetch2(...)

Arguments

dependencies

data.frame which defines variable names and "locations"

evaluate

TRUE to run EvalOutput on each variable (non-ovariables are ignored)

indent

integer internal argument for verbose printing

verbose

use TRUE to enable status messages in between fetches

...

excess arguments are ignored or passed to EvalOutput if evaluate is TRUE

Details

The input data.frame should have columns "Name" and at least one of "Key" and "Ident".

Key is the R-tools session identifier (shown at the end of the url). Ident should be in format <page_id>/<code_name>.

Fetch first checks if the variable (or something with the same name) is already available, if it is nothing will be done. If Key is defined (not NA or "") for a variable it takes precedence over Ident.

Fetch is run as first part of ComputeDependencies.

See also: http://en.opasnet.org/

Value

No return value. Fetched variables are written in .GlobalEnv.

Author(s)

T. Rintala [email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
deps <- data.frame(Name = "exposure", Key = "6WYTFxiZUIxiY8tw")
## Not run: 
Fetch(deps)
exposure

## End(Not run)

# If variable exists
exposure <- 1
Fetch(deps)
exposure # by default existing variables are not changed

OpasnetUtils documentation built on July 4, 2017, 9:44 a.m.