Learn R Programming

gghilbertstrings (version 0.3.3)

create_id_column: Function to create an id column from a character column

Description

Function to create an id column from a character column

Usage

create_id_column(df, col)

Arguments

df

the dataframe that is used

col

the column name in NSE format that should be converted

Value

a dataframe with an additional gghid column

Examples

Run this code
# NOT RUN {
mtcars %>% tibble::rownames_to_column() %>% create_id_column(rowname)
# }

Run the code above in your browser using DataLab