powered by
Loads and preprocesses a built-in dataset for clustering analysis. Depending on the dataset name provided, different cleaning steps are applied.
prepare_data(dataset)
A cleaned data.frame containing only numeric variables and no missing values.
data.frame
A string specifying the dataset name. Options are: "iris", "USArrests", "mtcars", "CO2", "swiss", "Moons".
The classic iris dataset, excluding the species column.
State-wise arrest data. Missing values are removed.
Motor trend car data set. No transformation applied.
CO2 uptake in grass plants. Only numeric columns are selected and rows with missing values are removed.
Swiss fertility and socio-economic indicators. Used as-is.
Synthetic non-linear dataset generated by mlbench::mlbench.smiley().
mlbench::mlbench.smiley()
data <- prepare_data("iris") head(data)
Run the code above in your browser using DataLab