Learn R Programming

parsec (version 1.2.7)

popelem: 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 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

Run this code
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,]

Run the code above in your browser using DataLab