reshape_data {iNZightTools} | R Documentation |
Reshaping dataset from wide to long or from long to wide
reshape_data(.data, col1, col2, cols, key, value, check)
.data |
dataset |
col1 |
column to spread out (for long to wide) |
col2 |
values to be put in the spread out column (for long to wide) |
cols |
columns(s) to gather together (for wide to long) |
key |
name for new column containing old column names (for wide to long) |
value |
name for new column containing old column values (for wide to long) |
check |
check whether to use long to wide or wide to long |
reshaped dataset
Yiwen He