reshape_wider: Reshape data frame to a wider format

View source: R/col_str_reshape.R

reshape_widerR Documentation

Reshape data frame to a wider format

Description

Reshape data frame to a wider format

Usage

reshape_wider(dt, keep_cols, col_label, col_value)

Arguments

dt

input data table

keep_cols

columns to be kept

col_label

columns that each unique values will be reshaped as a column name

col_value

columns that fill the reshaped columns

Value

reshaped widen data table

Examples

data("dt_long")
dataMojo::reshape_wider(dt_long,
  keep_cols = c("Full_name"),
  col_label = c("Date_Type"),
  col_value = "Exact_date")


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