- factor_vec
A vector containing the factor_vec to compare. Can be of any type (character, numeric, factor, etc.).
- ref
Optional. A vector containing the reference factor_vec. If NULL (default), comparisons are made within the factor_vec vector.
- symmetric
Logical. If TRUE (default), unique unordered pairs are returned. If FALSE, all ordered pairs are returned.
- include_na
Logical. If FALSE (default), NA values are excluded from comparisons. If TRUE, NA values are included.
- include_self
Logical. If FALSE (default), pairs where Var1 == Var2 are excluded. If TRUE, they are included.
- filter_fn
Optional. A custom function to filter the pairs. Should accept a data frame and return a logical vector.
- pre_fn
Optional. A function to preprocess the factor_vec before comparison (e.g., tolower, trimws). Default is trimws.
- sort_by
Character string specifying how to sort the output. Options are "Var1", "Var2", "both", or "none" (default).
- output_format
Character string specifying the output format. Options are "data.frame" (default), "list", or "matrix".