O'Reilly logo

Data Manipulation with R by Jaynal Abedin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reshaping the dataset with the reshape package

As we have seen, there are two different paradigms for defining the layout of a dataset. To change the layout of a dataset following the steps of a new paradigm, we need to use the reshape packages, where all the functions are implemented following the new layout. The main idea of the reshape package is melting a dataset and then casting it to a suitable layout. In the section The new layout of a dataset, we have mentioned melting a dataset and what it looks like. Just to recall, in molten data, each row represents a single observation of a single variable in the dataset. Also, it contains only the identifier variables and a value variable to represent what is being measured. In this section, we will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required