multinames: Set the multinames attribute of a Composite_table

View source: R/Composite_table.R

multinames<-R Documentation

Set the multinames attribute of a Composite_table

Description

Set the multinames attribute of a Composite_table

Usage

multinames(x) <- value

multinames(x)

Arguments

x

a Composite_table ⁠or data.frame⁠

value

a named vector of ascending integers. The name is the multi-column heading, the integer value is the last column that this heading applies to

See Also

Composite_table, as_multinames()

Examples


df_mean <- data.frame(
  Species = c("setosa", "versicolor", "virginica"),
  length = c(5.01, 5.94, 6.59),
  width = c(3.43, 2.77, 2.97)
)

multinames(df_mean) = c("species" = 1, measures = 3)

# .species..     ...measures...
# 1    Species     length   width
# 2     setosa       5.01    3.43
# 3 versicolor       5.94    2.77
# 4  virginica       6.59    2.97



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