get_modes_counts {dotsViolin} | R Documentation |
get modes, handle ties, ignore less frequent values
Description
This function comes from an answer for a question in stackoverflow https://stackoverflow.com/questions/42698465/obtaining-3-most-common-elements-of-groups-concatenating-ties-and-ignoring-les
Usage
get_modes_counts(data, grouping_col, col2, mode_number = 3)
Arguments
data |
data.frame |
grouping_col |
string split by this column |
col2 |
string numerical data column |
mode_number |
numeric number of modes to retrieve |
Value
data.frame with modes and counts per group
Examples
get_modes_counts(fabaceae_clade_n_df, "clade", "parsed_n")
[Package dotsViolin version 0.0.1 Index]