sampler: Splitting your dataset in training and testing

Description Usage Arguments Examples

View source: R/sampler.R

Description

A training/test partition are created by sampler function.

Usage

1
sampler(data, p, seed = NULL)

Arguments

data

the data frame that contains the variables to be separeted.

p

the percentage of the training dataset to be obtained randomly. It can be expressed in either decimal fraction (such as 0.7) or percent (such as 72.12).

seed

a single value, interpreted as an integer, or NULL. The default value is NULL, but for future checks of the model or models generated it is advisable to set a random seed to be able to reproduce it.

Examples

1
2
# The best way to demostrate the functionality is test the function
Sampling <- sampler(EGATUR,p=0.7)

MachineLearning documentation built on March 13, 2020, 2:54 a.m.