varSelect: Utility for Selecting Variables to Download

Description Usage Arguments Value Author(s) Examples

View source: R/varSelect.R

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

1
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

Value

the same object as edinfo with an updated varSelect field

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 Oct. 8, 2021, 9:08 a.m.