Learn R Programming

meteoForecast (version 0.56)

Forecast variables: Forecast Variables available in each model.

Description

The grepVar retrieves the XML file with the names, description, and labels of each variable available in the service, and searches for matches in the description field.

Usage

grepVar(x, service, day = Sys.Date() - 1, complete = FALSE)

Value

If complete = TRUE this function provides a data.frame with three columns, name, label, and description. Use the elements of the name column to choose a variable with the argument var of getRaster and getPoint.

Arguments

x

character string to be matched in the description field of the set of variables. Try x = "" and complete = TRUE to get the complete list of choices with the description field.

service

Character, to choose from 'meteogalicia', 'gfs', 'nam', and 'rap'

day

Date. Services change the variables availability over time.

complete

Logical, if FALSE (default) only the name of the variables is returned. If TRUE the name, label, and description columns are provided.

Examples

Run this code

if (FALSE) {
## Variables available recently
grepVar('cloud', service = 'gfs', complete = TRUE)

## Variables available some days ago
grepVar('cloud', service = 'nam',
        day = Sys.Date() - 10,
        complete = TRUE)

## You can get the complete list with x = ""
grepVar("", service = 'meteogalicia', complete = TRUE)
}

Run the code above in your browser using DataLab