reshape_longer: Reshape data frame to a longer format

View source: R/col_str_reshape.R

reshape_longerR Documentation

Reshape data frame to a longer format

Description

Reshape data frame to a longer format

Usage

reshape_longer(dt, keep_cols, label_cols, value_cols)

Arguments

dt

input data

keep_cols

columns to be kept

label_cols

column name that contains the melted columns

value_cols

column name that contains the value of melted columns

Value

data table in a longer format

Examples

data("dt_dates")
reshape_longer(dt_dates,
                        keep_cols = "Full_name",
                        label_cols = c("Date_Type"),
                        value_cols = "Exact_date")


dataMojo documentation built on March 7, 2023, 8:10 p.m.