cat_names: Returns unquoted column names for scripting

View source: R/cat_names.R

cat_namesR Documentation

Returns unquoted column names for scripting

Description

Returns unquoted column names for scripting

Usage

cat_names(df, pattern = NULL, index = NULL, sep = "\n")

Arguments

df

a dataframe or tibble

pattern

an optional regex for selection of column names

index

an optional vector of column indices for selection

sep

seperator for column names, suggestions include ", ", " + ", and combinations with newline.

Value

An unquoted string of column names

Examples

df <-  data.frame(A = 0L, B= 0L, C = 0L, test1 = 0L, test2 = 0L)
cat_names(df)
cat_names(df, sep = ',')
cat_names(df, index =2:3, sep = '+')
cat_names(df, pattern = "test", sep = '+')

Lingtax/Qualtrics documentation built on July 4, 2022, 3:24 a.m.