Learn R Programming

healthyR (version 0.1.4)

kmeans_scree_plt: K-Means Scree Plot

Description

Create a scree-plot from the kmeans_mapped_tbl() function.

Usage

kmeans_scree_plt(.data)

Arguments

.data

The data from the kmeans_mapped_tbl() function

Value

A ggplot2 plot

Details

Outputs a scree-plot

See Also

https://en.wikipedia.org/wiki/Scree_plot

Examples

Run this code
# NOT RUN {
library(healthyR.data)
library(dplyr)
library(tidyquant)

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 <-  kmeans_user_item_tbl(data_tbl, service_line, payer_grouping)

kmm_tbl <- kmeans_mapped_tbl(ui_tbl)

kmeans_scree_plt(.data = kmm_tbl)

# }

Run the code above in your browser using DataLab