index: Calculate the index of a variable

Description Usage Arguments Value Examples

View source: R/index.R

Description

Calculate the index of a variable

Usage

1
index(grouping_variable, index_variable)

Arguments

grouping_variable

A discrete grouping variable

index_variable

A discrete variable for which to calculate index

Value

A table of index values which are equal to 100 times the frequency of a level of index_variable within levels of grouping_variable relative to the aggregate of all its levels.

Examples

1
2
3
with(experiment_data, index(duration, social_proof))
with(survey_data, index(s_gender, s_age))
plot(with(survey_data, index(s_gender, s_age)))

e3bo/zmarket documentation built on Dec. 20, 2021, 2:21 a.m.