Learn R Programming

biogram (version 1.0)

data_sample: Subsample data

Description

Creates random subsample of population using indices.

Usage

data_sample(indices, train_size, test_size)

Arguments

indices
of data.
train_size
size of training sample.
test_size
size of test sample.

Value

  • a list of a length 2 containing train and test sample indices.

Details

Check it for 0 sample size.

Examples

Run this code
data_sample(1:20, 5, 5)

Run the code above in your browser using DataLab