popelem: popelem

View source: R/popelem.R

popelemR Documentation

popelem

Description

The function identifies in a matrix y, profiles in prof. For each row of matrix y, the function returns the location of the corresponding profile in object prof.

Usage

popelem(prof, ...)
## S3 method for class 'wprof'
popelem(prof, y, ...)

Arguments

prof

an object of S3 class wprof.

y

a matrix or data.frame representing a set of observations with variables (the same contained in prof) by columns.

...

any of the above.

Examples

vl <- c(2, 3, 2)
prf <- var2prof(varlen = vl)
pop <- matrix(c(2, 1, 1, 1, 2, 1, 2, 3, 1), 3, 3)
rownames(pop) <- LETTERS[1:3]

v <- popelem(prof = prf, y = pop)
v
prf$profiles[v,]

parsec documentation built on Aug. 19, 2023, 5:07 p.m.