tbl_id_variables: Create id variables

tbl_id_variablesR Documentation

Create id variables

Description

Create id variables

Usage

tbl_id_variables(
  data,
  id_variables = NULL,
  id_name = "id",
  override_id_name = F,
  remove = T,
  sep = "|"
)

Arguments

data

a 'tibble'

id_variables

vector of id variables

id_name

name of the new id variable

override_id_name
remove

remove original variable

sep

id separator

Examples

library(tidyverse)
library(asbtools)
diamonds %>% tbl_id_variables()
diamonds %>% tbl_id_variables(id_variables = c("cut", "clarity"), id_name = "id")
diamonds %>% tbl_id_variables(id_variables = c("cut", "clarity"), id_name = NULL)
diamonds %>% tbl_id_variables(id_variables = c("cut", "clarity"), group_name = NULL, remove = F)

abresler/asbtools documentation built on July 28, 2022, 11:04 p.m.