Learn R Programming

sdglinkage (version 0.1.0)

split_data: Split the data into a training_set and a testing_set.

Description

split_data split the data into a training_set and a testing_set based on the training_percentage.

Usage

split_data(dataset, training_percentage)

Arguments

dataset

A data frame of the dataset.

training_percentage

A number between 0 and 100 indicating the percertage of the training dataset.

Value

A list with two data frame: training_set and testing_set.

Examples

Run this code
# NOT RUN {
adult_data <- split_data(adult[1:100,], 70)

# }

Run the code above in your browser using DataLab