takeSubset: Take random subset of n samples.

View source: R/analysisFuns.R

takeSubsetR Documentation

Take random subset of n samples.

Description

Function for taking a random subset of the data. Used for top-down selection in model fitting to speed up processes. This creates a representative sample across fields and years if they're present.

Usage

takeSubset(x, respvar, sub_n = 1250)

Arguments

x

data.frame or data.table.

respvar

Character, the response variable column name.

sub_n

Numeric, the number of random observations to take.

Value

A random subset of the data.


paulhegedus/OFPE documentation built on Nov. 23, 2022, 5:09 a.m.