add_tags {tagr}R Documentation

Add tags to an R object

Description

This function adds tags to an existing R object. The tags are stored as attributes of the object and can be later used to identify and manipulate the object. If the specified object does not exist in the specified environment, an error is thrown.

Usage

add_tags(x, ..., envir = parent.frame())

Arguments

x

The name of the object to tag (unquoted).

...

The tags to add to the object.

envir

The environment in which the object exists (defaults to the parent frame).

Value

No return value.

Examples

# create a vector and add some tags
x <- c(1, 2, 3)
add_tags(x, "foo", "bar")


[Package tagr version 1.0.1 Index]