There’s some explanation on what reshaping data in R means, why we do it, as well as the history, e.g., melt() vs gather() vs pivot_longer() in a previous post: New intuitive ways for reshaping data in R That post shows how to reshape a single variable that had been recorded/entered across multiple different columns. But if multiple different variables are recorded over multiple different columns, then this is what you might want to do:

Continue reading

Author's picture

Riinu Pius (Ots)

if it aint broke, you’re outdated

Senior Data Manager

Edinburgh, UK