extreme_triplet_grouping_rearranger_ | R Documentation |
Wrapper for running extreme triplet grouping
extreme_triplet_grouping_rearranger_(
data,
col = NULL,
middle_is = "middle",
unequal_method_1 = "middle",
unequal_method_2 = c("middle", "middle"),
order_by_aggregates = FALSE,
shuffle_members = FALSE,
shuffle_triplets = FALSE,
num_groupings = 1,
balance = "mean",
factor_name = ".triplet",
overwrite = FALSE
)
data |
|
col |
Column to create sorting factor by.
When |
middle_is |
Whether the middle element in the triplet is the nth closest element to the median value or the nth+1 lowest/highest value. One of: Triplet grouping is performed greedily from the most extreme values to the least extreme
values. E.g. Examples: When
When
When
|
order_by_aggregates |
Whether to order the groups from initial groupings (first N.B. Only used when |
shuffle_members |
Whether to shuffle the order of the group members within the groups. (Logical) |
shuffle_triplets |
Whether to shuffle the order of the triplets. Triplet members remain together. (Logical) |
num_groupings |
Number of times to group into triplets (recursively). At least Based on |
balance |
What to balance triplets for in a given secondary triplet grouping.
Either The first triplet grouping always groups the actual element values. meanTriplets have similar means. The values in the triplets from the previous grouping
are aggregated with spreadTriplets have similar spread (e.g. standard deviations). The values in the triplets
from the previous triplet grouping are aggregated with min / maxTriplets have similar minimum / maximum values. The values in the triplets from the
previous triplet grouping are aggregated with |
factor_name |
Name of new column with the sorting factor.
If |
overwrite |
Whether to allow overwriting of existing columns. (Logical) |
The sorted data.frame
(tibble
) / vector
.
Optionally with the sorting factor(s) added.
When `data`
is a vector
and `factor_name`
is `NULL`
,
the output will be a vector
. Otherwise, a data.frame
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.