sample_compliment: A Sampling Compliment Function

Description Usage Arguments Examples

View source: R/sample_compliment.R

Description

Designed to work in tandem with sample_rows to return a complimentary data set to a sample from an original set.

Usage

1
sample_compliment(orig = NULL, samp = NULL)

Arguments

orig

an object; the original/complete data set being sampled

samp

an object; a subset, randomly sampled from the orig

Examples

1
2
3
4
5
6
7
iris_test <- sample_rows(
  x = iris
  , n = floor(0.2 * nrow(iris))
  , seed = 1
  , replace = FALSE
)
iris_train <- sample_compliment(orig = iris, samp = iris_test)

mike-decarlo/caser documentation built on Sept. 23, 2019, 7:15 a.m.