tag_assert: Assert the status of a 'tag'

View source: R/tag_assert.R

tag_assertR Documentation

Assert the status of a tag

Description

This function check the condition of a tag object.

Usage

tag_assert(tag, condition = "tag", type = "abort")

Arguments

tag

a GeoPressureR tag object.

condition

condition to assert tag for. One of "tag" (default), "pressure", "light", "acceleration", "label", "stap", "setmap", "map_pressure", "map_light" "map_pressure_mse" and "twilight"

type

Message type to display. One of "abort" (default), "warn" or "inform"

Value

logical indicating the tag object has the relevant element

Examples

withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
  tag <- tag_create("18LX", quiet = TRUE) |> tag_label(quiet = TRUE)
})

tag_assert(tag)

tag_assert(tag, "stap")

tag_assert(tag, "setmap", type = "warn")

tag_assert(tag, "map_pressure", type = "inform")


Rafnuss/GeoPressureR documentation built on April 17, 2025, 12:58 p.m.