hai_kmeans_mapped_tbl | R Documentation |
Create a tibble that maps the hai_kmeans_obj()
using purrr::map()
to create a nested data.frame/tibble that holds n centers. This tibble will be
used to help create a scree plot.
hai_kmeans_mapped_tbl(.data, .centers = 15)
kmeans_mapped_tbl(.data, .centers = 15)
.data |
You must have a tibble in the working environment from the
|
.centers |
How many different centers do you want to try |
Takes in a single parameter of .centers. This is used to create the tibble
and map the hai_kmeans_obj()
function down the list creating a nested tibble.
A nested tibble
Steven P. Sanderson II, MPH
https://en.wikipedia.org/wiki/Scree_plot
Other Kmeans:
hai_kmeans_automl_predict()
,
hai_kmeans_automl()
,
hai_kmeans_obj()
,
hai_kmeans_scree_data_tbl()
,
hai_kmeans_scree_plt()
,
hai_kmeans_tidy_tbl()
,
hai_kmeans_user_item_tbl()
library(healthyR.data)
library(dplyr)
data_tbl <- healthyR_data %>%
filter(ip_op_flag == "I") %>%
filter(payer_grouping != "Medicare B") %>%
filter(payer_grouping != "?") %>%
select(service_line, payer_grouping) %>%
mutate(record = 1) %>%
as_tibble()
ui_tbl <- hai_kmeans_user_item_tbl(
.data = data_tbl,
.row_input = service_line,
.col_input = payer_grouping,
.record_input = record
)
hai_kmeans_mapped_tbl(ui_tbl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.