Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

untag

Remove tags


Description

Remove tags from an R object if present, otherwise return the object unchanged.

Usage

untag(x, ...)

## Default S3 method:
untag(x, ...)

## S3 method for class 'generic_spct'
untag(x, byref = FALSE, ...)

## S3 method for class 'generic_mspct'
untag(x, byref = FALSE, ...)

Arguments

x

an R object.

...

ignored (possibly used by derived methods).

byref

logical indicating if new object will be created by reference or by copy of x

Value

if x contains tag data they are removed and the "spct.tags" attribute is set to NA, while if x has no tags, it is not modified. In either case, the byref argument is respected: in all cases if byref = FALSE a copy of x is returned.

Methods (by class)

  • default: Default for generic function

  • generic_spct: Specialization for generic_spct

  • generic_mspct: Specialization for generic_spct

See Also

Other tagging and related functions: is_tagged(), tag(), wb2rect_spct(), wb2spct(), wb2tagged_spct()


photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.