powered by
egor
composition() calculates the proportional or absolute composition of alters for a given attribute/variable.
composition()
composition(object, alt.attr, absolute = FALSE)
A tibble with the ego ID and values per category of alt.attr as numeric columns.
tibble
alt.attr
numeric
An egor object.
A character naming the variable containing the alter-attribute.
character
Logical indicating if the results should be absolute.
Logical
data("egor32") composition(egor32, "sex")
Run the code above in your browser using DataLab