Average Hex Colors per Group. This function takes a data frame
with two columns: one for the hex color values and another for
the group labels. It calculates the average color for each
group and returns a data frame with the group labels and their
corresponding average hex colors.
Usage
avgHex(df, hex_col, group_col)
Value
A data frame with the group labels and their corresponding average hex colors.
Arguments
df
A data frame with columns for hex color values and group labels.
hex_col
The name of the column containing hex color values. Default is "hex".
group_col
The name of the column containing group labels. Default is "group".