This week we learned about changing the structure of and combining information from various datasheets. Michael showed us some of his data from colleagues which was not particularly clean and which needed reformatted in order to make a stacked bar chart.

He used the two R packages “dplyr” and “reshape2” to reorganize the data so that the ggplot R package could create the desired chart.

Here is the same script that Michael used, only using the built in mtcars dataset from base R: dplyrreshape