as_multinames: Create Composite Table multinames from a character vector

View source: R/Composite_table.R

as_multinamesR Documentation

Create Composite Table multinames from a character vector

Description

Create Composite Table multinames from a character vector

Usage

as_multinames(x)

Arguments

x

a character vector of equal length as the data.frame for which it the multinames should be created.

Value

a named integer vector that can be used as multinames attribute for a Composite_table

Examples


dat <- data.frame(
  apple = 1,
  banana = 2,
  dog = 1,
  cat = 2,
  parrot = 3
)

multinames(dat) <- as_multinames(
  c('fruit', 'fruit', 'animal', 'animal', 'animal')
)

multinames(dat)


tatoo documentation built on March 31, 2023, 8:16 p.m.