Skip to contents

add_kmean_cls_var() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add k-means clustering class variable. The function returns Dataset (a tibble).

Usage

add_kmean_cls_var(
  ds_tb,
  classes_1L_int,
  components_1L_int,
  pca_df,
  kmean_var_nm_1L_chr = "kmeans_cls_int",
  start_1L_int = 25L
)

Arguments

ds_tb

Dataset (a tibble)

classes_1L_int

Classes (an integer vector of length one)

components_1L_int

Components (an integer vector of length one)

pca_df

Principal component analysis (a data.frame)

kmean_var_nm_1L_chr

K-means clustering variable name (a character vector of length one), Default: 'kmeans_cls_int'

start_1L_int

Start (an integer vector of length one), Default: 25

Value

Dataset (a tibble)