has.key: Test for keys

View source: R/has_key.R

has.keyR Documentation

Test for keys

Description

has.key tests whether a gribMessage object has a given key.

Usage

has.key(gribMessage, key)

Arguments

gribMessage

gribMessage object to be tested.

key

character string of the key to be tested for.

Value

Returns a logical

Examples

g <- grib_open(system.file("extdata", "lfpw.grib1", package = "gribr"))
gm <- grib_get_message(g, 1)
# this key exists
has.key(gm, "shortName")
# this key does not exist
has.key(gm, "grib")
grib_close(g)

nawendt/gribr documentation built on July 15, 2024, 10:51 a.m.