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

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>