reshape_longer {dataMojo}R 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")


[Package dataMojo version 1.0.0 Index]