
Create an association matrix from a nugget of flavour associations.
Source: R/association_matrix.R
association_matrix.RdThe association matrix is a matrix where rows correspond to antecedents, columns correspond to consequents, and the values are taken from a specified column of the nugget. Missing values are filled with zeros.
Usage
association_matrix(
x,
value,
error_context = list(arg_x = "x", arg_value = "value", call = current_env())
)Arguments
- x
A nugget of flavour
associations.- value
A tidyselect expression (see tidyselect syntax) specifying the column to use for filling the matrix values.
- error_context
A list of details to be used in error messages. It must contain: -
arg_x: the name of thexargument; -arg_value: the name of thevalueargument; -call: an environment in which to evaluate the error messages. Defaults to the current environment.
Value
A numeric matrix with row names corresponding to antecedents and
column names corresponding to consequents. Values are taken from the
column specified by value. Missing values are filled with zeros.