Description Usage Arguments Value Examples
View source: R/containment-and-band-creation.R
I believe this will error unless one projects from the simplex to the lower dimensional space
1 2 3 4 5 | create_convex_hull_structure(
data_points,
data_columns = NULL,
.lower_simplex_project = TRUE
)
|
data_points |
points to create the convex hull structure from |
data_columns |
columns of data.frame that relate to the point's
coordinates in euclidean space. This should be at least 3 columns (else it
doesn't really make sense to use this function). The input should look like
something like |
.lower_simplex_project |
boolean, if data points should be projected to a simplex and then to the lower dimensional simplex (for this package, this should always be done) |
a convex_hull_structure
object, that is a data frame similar
to data_points (but with out data_columns
columns) and only points
that define the convex hull. This object also has an normals
attribute which contains a matrix with the first p columns defining "A"
and the last defining "b", such that -Ax >= b defines the convex hull.
1 2 3 4 5 6 7 8 9 10 | library(dplyr)
# this will look like a 2d data frame (but this is becuase pomp_df info is
# on the 3d simplex)
convex_hull_cb <- EpiCompare::pomp_df %>%
filter(.id <= 10) %>%
arrange(time) %>% # just to be safe
select(-time, -H, -cases) %>%
group_by(.id) %>%
grab_top_depth_filaments(conf_level = .9) %>%
create_convex_hull_structure() #data_columns = c(S,I,R)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.