powered by
Reshape data frame to a wider format
reshape_wider(dt, keep_cols, col_label, col_value)
reshaped widen data table
input data table
columns to be kept
columns that each unique values will be reshaped as a column name
columns that fill the reshaped columns
data("dt_long") dataMojo::reshape_wider(dt_long, keep_cols = c("Full_name"), col_label = c("Date_Type"), col_value = "Exact_date")
Run the code above in your browser using DataLab