rown_to_var: rown_to_var function

View source: R/format.R

rown_to_varR Documentation

rown_to_var function

Description

creates a variable from the row names, optionally makes it the first variable, optionally removes the row names, and names it what you want

Usage

rown_to_var(df, keeprn = FALSE, makefirst = TRUE, varname = "terms")

Arguments

df

a dataframe for which you want to turn row names into a variable

keeprn

boolean indicating whether you want the rownames kept as rownames after they get added as a variable. default is FALSE

makefirst

boolean indicating whether you want to make the rownames the first variable in the dataframe. default is TRUE

varname

the name given to the new variable containing the rownames. default is 'terms'

Examples

rown_to_var_function()

clmacleod/highlandr documentation built on Oct. 11, 2023, 8:04 p.m.