sample_strict: Assign Rows and Sample

View source: R/sample_strict.R

sample_strictR Documentation

Assign Rows and Sample

Description

Assign rows to columns of a matrix with maxcol_strict and subsequently sample from each column's group.

Usage

sample_strict(mat, size, min = 1, diff = 0.5, replace = F)

Arguments

mat

a matrix

size

sample size

min

minimum value required for a row to be assigned to a column. Default: 1

diff

minimum difference in value to the 'next-best' row that is required for a row to be assigned to a column. Default: 0.5

replace

boolean value indicating whether sample replacement is allowed. Will be set to TRUE with warning if the sample is smaller than the sample size. Default: F

Value

a list of sampled rows for each column, each elemnent a character vector of size <size>


jlaffy/scalop documentation built on March 24, 2024, 9 a.m.