multinames: Set the multinames attribute of a Composite_table

Description Usage Arguments See Also Examples

View source: R/Composite_table.R

Description

Set the multinames attribute of a Composite_table

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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 May 1, 2019, 9:52 p.m.