Description Usage Arguments Details Value Examples
View source: R/distance-depth.R
pulling out data points from curves that are ranked highest based on quantile function.
1 2 3 4 5 6 7 8 | top_curves_to_points(
x,
alpha,
tidy_dm,
quantile_func = distance_depth_function,
x_names_df = NULL,
...
)
|
x |
list or grouped_df containing curves, with index ordering associated
with the |
alpha |
the proportion of curves to be removed before presenting all the points together. Takes value in [0, 1.0]. |
tidy_dm |
a |
quantile_func |
function to calculate quantiles via the distance_matrix,
we now expect this function to handle |
x_names_df |
Only used when x is a list. Group structure associated with
the ordering of the items in the list |
... |
additional parameters to be passed to the |
See top_curves_to_points.list
and
top_curves_to_points.grouped_df
for more details and
commentary on expected parameters. top_curves_to_points.list
requires an additional parameter - x_names_df
.
data frame from curves of the top values associated with the
quantile_func
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(dplyr)
set.seed(1)
random_data_list <- lapply(1:5, function(x){data.frame(matrix(rnorm(10),
ncol = 2))})
dist_mat <- dist_matrix_innersq_direction(random_data_list,
position = 1:2,
verbose = FALSE)
combined_points_list <- quantile_curves_to_points(random_data_list,
alpha = .2,
dist_mat)
random_data_grouped <- random_data_list %>%
do.call(rbind, .) %>%
mutate(id = rep(1:5, each = 5)) %>%
group_by(id)
combined_points_grouped <- quantile_curves_to_points(random_data_grouped,
alpha = .2,
dist_mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.