has_enough_IDs: Get names of groups that has enough unique cases.

View source: R/count_spectra.R

has_enough_IDsR Documentation

Get names of groups that has enough unique cases.

Description

Get names of groups that has enough unique cases.

Usage

has_enough_IDs(OBJ, Var = colnames(OBJ)[1], ID = "ID", n_min = 5, na.rm = TRUE)

Arguments

OBJ

hyperSpec object

Var

(string) variable name of factor variable

ID

(string) variable name of ID variable

n_min

(integer) minimum number of unique IDs not to be treated as too few.

na.rm

(logical) used by function sum(). Default is TRUE.

Value

Vector of strings.

See Also

Other count spectra functions: count_spectra(), has_too_few_IDs()

Examples

has_enough_IDs(Spectra2, "class", ID = "gr")

has_enough_IDs(Spectra2, "class", ID = "gr", n_min = 2)


GegznaV/spHelper documentation built on April 16, 2023, 1:42 p.m.