sectors.to.role: Roles and position on the basis of sectors

View source: R/tags.R

sectors.to.roleR Documentation

Roles and position on the basis of sectors

Description

sectors.to.role constructs a role or position variable on the basis of sectors. If the sectors are mutually exclusive it constructs a single named vector. If a person has roles in more than one sector it is the last sector in the list of sectors that counts.

Usage

sectors.to.role(
  den,
  list.dens,
  role = c("Chief executive", "Executive"),
  other = "Other",
  mutually.exclusive = FALSE
)

Arguments

den

a den class object, see as.den with a ROLE variable

list.dens

a list of den objects that corresponds to the sectors

role

the set of roles

other

either FALSE or the label for the "Other" category.

mutually.exclusive

if TRUE sectors are mututally exclusive

Value

either a matrix or a named vector

Examples

data(den)
den                 <- as.den(den)
list.dens           <- tags.to.sectors(den, standard.sectors("Danish"))
sectors.to.role(den, list.dens, mutually.exclusive = TRUE)

antongrau/eliter documentation built on March 2, 2024, 8:05 p.m.