which_var: Retrieve the full variable name that best matches the...

Description Usage Arguments Value

View source: R/NAM218.R

Description

This functions helps resolve the issues that arise with changing GRIB2 variable names but note that it is possible for more than one variable name may be returned.

Usage

1
2
3
4
5
6
which_var(
  nc,
  pattern = c("Total_precipitation", "Convective_precipitation")[1],
  ignore.case = TRUE,
  ...
)

Arguments

nc

a ncdf4 class object

pattern

to match - see grepl()

ignore.case

logical it TRUE ignore case in the pattern

...

further arguments for grepl()

Value

character vector of zero or more matches


BigelowLab/namanl documentation built on Nov. 15, 2021, 3:11 p.m.