select_sample: Select Subset of Rows

Description Usage Arguments Details Value Examples

View source: R/select_sample.R

Description

Function select_sample selects subset of rows from data set. This is useful if data is large and we need just a sample to calculate profiles.

Usage

1
select_sample(data, n = 100, seed = 1313)

Arguments

data

set of observations. Profile will be calculated for every observation (every row)

n

number of observations to select.

seed

seed for random number generator.

Details

Note that select_subsample() function is S3 generic. If you want to work on non standard data sources (like H2O ddf, external databases) you should overload it.

Value

a data frame with selected rows

Examples

1
2
3
4
library("ingredients")

small_apartments <- select_sample(DALEX::apartments_test)
head(small_apartments)

ingredients documentation built on April 10, 2021, 5:06 p.m.