cranvas (version 0.8.5)

link_var: Set or query the linking variable in a mutaframe

Description

Set or query the linking variable in a mutaframe

Usage

link_var(data)
link_var(data) <- value

Arguments

data
the mutaframe (typically created by qdata), with an attribute Link
value
the name of the linking variable (or NULL to disable linking); the variable must be a factor (i.e. categorical variable)

Value

link_var returns the name of the linking variable

See Also

qdata

Examples

Run this code
mf <- qdata(head(iris))
link_var(mf)  # NULL
link_var(mf) <- "Species"  # linking by 'Species'
link_var(mf)
link_var(mf) <- NULL  # disable linking

Run the code above in your browser using DataLab