varSelect: Utility for Selecting Variables to Download

View source: R/varSelect.R

varSelectR Documentation

Utility for Selecting Variables to Download

Description

Loops through the available variables in an edinfo object and asks whether or not each should be downloaded, then stores the result for passing on to formatURL

Usage

varSelect(edinfo, select = NULL)

Arguments

edinfo

a datalist, either from getEdinfo or created by erddapToEdinfo

select

(optional) logical vector of which variables to select. If left as default NULL, user will be prompted to select which variables to keep. If not NULL, can either be a single TRUE to select all variables, or a logical vector of length equal to the number of variables in edinfo. Can also be a vector of variable names to select.

Value

the same object as edinfo with an updated varSelect field

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples


sstEdi <- getEdinfo()[['jplMURSST41']]
## Not run: 
# interactively select
sstEdi <- varSelect(sstEdi)

## End(Not run)
# select all variables
sstEdi <- varSelect(sstEdi, TRUE)
# select the first two of four
sstEdi <- varSelect(sstEdi, c(TRUE, TRUE, FALSE, FALSE))


PAMmisc documentation built on June 22, 2024, 9:37 a.m.