K-clustering
kclus(
dataset,
vars,
fun = "kmeans",
hc_init = TRUE,
distance = "sq.euclidian",
method = "ward.D",
seed = 1234,
nr_clus = 2,
standardize = TRUE,
lambda = NULL,
data_filter = "",
envir = parent.frame()
)
A list of all variables used in kclus as an object of class kclus
Dataset
Vector of variables to include in the analysis
Use either "kmeans" or "kproto" for clustering
Use centers from hclus as the starting point
Distance for hclus
Method for hclus
Random see to use for k-clustering if hc_init is FALSE
Number of clusters to extract
Standardize data (TRUE or FALSE)
Parameter > 0 to trade off between Euclidean distance of numeric variables and simple matching coefficient between categorical variables. Also a vector of variable specific factors is possible where the order must correspond to the order of the variables in the data. In this case all variables' distances will be multiplied by their corresponding lambda value.
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")
Environment to extract data from
See https://radiant-rstats.github.io/docs/multivariate/kclus.html for an example in Radiant
summary.kclus
to summarize results
plot.kclus
to plot results
store.kclus
to add cluster membership to the selected dataset
kclus(shopping, c("v1:v6"), nr_clus = 3) %>% str()
Run the code above in your browser using DataLab