flip_names: Flip names and multinames of a Composite Table

View source: R/Composite_table.R

flip_namesR Documentation

Flip names and multinames of a Composite Table

Description

The column names of the resulting Composite_table will be sorted lexically

Usage

flip_names(dat, id_vars)

Arguments

dat

A Composite_table

id_vars

a character vector of column names of dat. The selected columns will not be sorted lexically but kept to the left. If the columns have a multiname associated with them, they must be supplied in the format column_name.multiname.

Value

a Composite_table

Examples


dat <- comp_table(
  cars1 = head(cars),
  cars2 = tail(cars),
  data.frame(id = LETTERS[1:6])
)

flip_names(dat)
flip_names(dat, id_vars = "id")
flip_names(dat, id_vars = c("id", "speed.cars1"))


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