roles: The role table of a masked clone

View source: R/roles_accessor.R

rolesR Documentation

The role table of a masked clone

Description

Returns the role each column of the clone was masked under, in the clone's own vocabulary: one row per column of synthetic(), in the same order and under the same names. When the column names were aliased (alias_names in mask()), the rows carry the aliases, so the table can travel with the clone without disclosing the original names. A dropped column is not in the clone and has no row.

Usage

roles(m)

Arguments

m

A masque object from mask(), or a masque_set from mask_set().

Details

Only the four public columns are returned. The proposal's notes and its value summaries describe the original table and stay on the private recipe, as does the full role table used on the original (recipe(m)@roles).

Value

For a masque, a data.table with columns col, role, action and kind. For a masque_set, a named list of such tables, one per table of the set.

See Also

synthetic(), data_card(), mask().

Examples

r <- propose_roles(iris)
r <- set_role(r, "Sepal.Length", role = "outcome")
m <- mask(iris, r, seed = 1)
roles(m)


masque documentation built on Nov. 19, 2026, 1:06 a.m.