View source: R/roles_accessor.R
| roles | R Documentation |
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.
roles(m)
m |
A |
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).
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.
synthetic(), data_card(), mask().
r <- propose_roles(iris)
r <- set_role(r, "Sepal.Length", role = "outcome")
m <- mask(iris, r, seed = 1)
roles(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.