View source: R/col_str_reshape.R
reshape_longer | R Documentation |
Reshape data frame to a longer format
reshape_longer(dt, keep_cols, label_cols, value_cols)
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 |
data table in a longer format
data("dt_dates") reshape_longer(dt_dates, keep_cols = "Full_name", label_cols = c("Date_Type"), value_cols = "Exact_date")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.