Learn R Programming

parsec (version 1.2.7)

proFreq: Observed profile frequencies

Description

The function computes profile frequencies, by counting the number of times a profile appears in the population.

Usage

proFreq(profiles, population)

Value

An object of class wprof with the same profiles of the argument but with different frequencies.

Arguments

profiles

an object of S3 class wprof.

population

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

Author

Alberto Arcagni

See Also

popelem

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]

proFreq(profiles = prf, population = pop)

Run the code above in your browser using DataLab