add.to.label: Add values to label

Description Usage Arguments Value Examples

View source: R/functions_label.r

Description

Adds values to the end of the label of each modality.

Usage

1
add.to.label(object, value = "freq", prefix = "default", suffix = ")", dim = 1)

Arguments

object

is a soc.ca object

value

the type of values added to the labels. "freq" adds frequencies, "mass" adds mass values to the active modalities, "ctr" adds contribution values to the active modalities, "cor" adds correlation values. value also accepts any vector with the length of the number of active modalities. "linebreak" adds a linebreak \n after the first ":" in the label.

prefix

if "default" an appropriate prefix is used

suffix

the suffix

dim

the dimension from which values are retrieved

Value

a soc.ca object with altered labels in names.mod and names.sup

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
example(soc.ca)
result.label  <- add.to.label(result)
result.label$names.mod
result.label  <- add.to.label(result, value = "ctr", dim = 2)
result.label$names.mod
result.label  <- add.to.label(result, value = result$variable, prefix = " - ", suffix = "")
result.label$names.mod
result.label  <- add.to.label(result, value = "linebreak")
result.label$names.mod
map.ctr(result.label)

soc.ca documentation built on Sept. 5, 2021, 5:21 p.m.

Related to add.to.label in soc.ca...