This function computes the density matrix for a given object, optionally taking into account a grouping variable.
Usage
density_matrix(x, groups, ...)
Arguments
- x
The input object for which the density matrix should be computed.
- groups
An optional grouping variable to consider when computing the density matrix.
- ...
Additional arguments to be passed to the density matrix computation method.
Value
A density matrix representing the input object, taking into account the specified grouping variable if provided.
Examples
if (FALSE) { # \dontrun{
# Example usage of the density_matrix function
result_density_matrix <- density_matrix(input_object, groups = grouping_variable)
} # }