This function changes the tags
of a safeframe
object, using the same
syntax as the constructor make_safeframe()
.
Arguments
- x
a
data.frame
or atibble
, equivalent to parameter.data
inmake_safeframe()
- ...
<
dynamic-dots
> A series of tags provided astag_name = "column_name"
See also
make_safeframe()
to create a safeframe
object
Examples
## create a safeframe
x <- make_safeframe(cars, mph = "speed")
tags(x)
#> $mph
#> [1] "speed"
#>
## add new tags and fix an existing one
x <- set_tags(x, distance = "dist")
tags(x)
#> $mph
#> [1] "speed"
#>
#> $distance
#> [1] "dist"
#>
## remove tags by setting them to NULL
old_tags <- tags(x)
x <- set_tags(x, mph = NULL, distance = NULL)
tags(x)
#> list()
## setting tags providing a list (used to restore old tags here)
x <- set_tags(x, !!!old_tags)
tags(x)
#> $mph
#> [1] "speed"
#>
#> $distance
#> [1] "dist"
#>