prepare_data {clusterWebApp} | R Documentation |
Prepare Built-in Datasets for Clustering
Description
Loads and preprocesses a built-in dataset for clustering analysis. Depending on the dataset name provided, different cleaning steps are applied.
Usage
prepare_data(dataset)
Arguments
dataset |
A string specifying the dataset name. Options are: "iris", "USArrests", "mtcars", "CO2", "swiss", "Moons". |
Details
- iris
The classic iris dataset, excluding the species column.
- USArrests
State-wise arrest data. Missing values are removed.
- mtcars
Motor trend car data set. No transformation applied.
- CO2
CO2 uptake in grass plants. Only numeric columns are selected and rows with missing values are removed.
- swiss
Swiss fertility and socio-economic indicators. Used as-is.
- Moons
Synthetic non-linear dataset generated by
mlbench::mlbench.smiley()
.
Value
A cleaned data.frame
containing only numeric variables and no missing values.
Examples
data <- prepare_data("iris")
head(data)
[Package clusterWebApp version 0.1.3 Index]