supplementary.individuals: Add supplementary individuals to a result object

View source: R/functions_analysis.r

supplementary.individualsR Documentation

Add supplementary individuals to a result object

Description

Add supplementary individuals to a result object

Usage

supplementary.individuals(object, sup.indicator, replace = FALSE)

Arguments

object

is a soc.ca class object created with soc.mca

sup.indicator

is a indicator matrix for the supplementary individuals with the same columns as the active variables in object.

replace

if TRUE the coordinates of the active individuals are discarded. If FALSE the coordinates of the supplementary and active individuals are combined. The factor object$supplementary.individuals marks the supplementary individuals.

Value

a soc.ca class object created with soc.mca

Examples

example(soc.mca)
res.pas   <- soc.mca(active, passive = "Costume")
res.sup   <- supplementary.individuals(res.pas, sup.indicator = indicator(active))
a         <- res.sup$coord.ind[res.sup$supplementary.individuals == "Supplementary",]
b         <- res.pas$coord.ind
all.equal(as.vector(a), as.vector(b))
map.ind(res.sup)

Rsoc/soc.ca documentation built on March 7, 2024, 8:59 p.m.