create.classdata {DECIDE}R Documentation

Create data frames for each class

Description

Takes a data frame and creates a list of data frames by splitting the data by the factor "class".

Usage

create.classdata(dataset)

Arguments

dataset

A data frame produced by prepare.dataset.

Value

data_class

A list with number of elements equal to the number of classes and each element a data frame for each class.

Author(s)

Christiana Kartsonaki

Examples

# generate a dataset
data <- data.frame(seq(1:10), rep(c(1, 2, 3), length.out = 10), 
rbinom(1, n = 10, p = 0.7), c(rnorm(8, 0, 1), NA, NA))

data_clean <- prepare.data(data)

create.classdata(data_clean)

[Package DECIDE version 1.3 Index]