How to change data between wide and long formats in R? You can have data in wide format or in long format.
This is quite an important thing, as the useable methods are different, depending on the format.
I know you have to work with melt() and cast() from the reshape package, but there seems some things that I don't get.
Can someone give me a short overview how you do this?
 A: *

*Quick-R has simple example of using reshape package

*See also ?reshape (LINK) for the Base R way of moving between wide and long format.
A: You don't have to use melt and cast.  
Reshaping data can be done lots of ways.  In your particular example on your cite using recast with aggregate was redundant because aggregate does the task fine all on it's own.
aggregate(cbind(LPMVTUZ, LPMVTVC, LPMVTXC) ~ year, dtm, sum)
# or even briefer by first removing the columns you don't want to use
aggregate(. ~ year, dtm[,-2], sum)

I do like how, in your blog post, you explain what melt is doing.  Very few people understand that and once you see it then it gets easier to see how cast works and how you might write your own functions if you want.
A: See the reshape2 wiki. It surely provides more examples as you could expect. 
A: Just noticing there's no reference to the more efficient and extensive reshaping methods in data.table here, so I am posting without further comment the excellent answer by Zach/Arun on StackOverflow for a similar question:
https://stackoverflow.com/questions/6902087/proper-fastest-way-to-reshape-a-data-table/6913151#6913151
And in particular there's the wonderful vignette on the data.table GitHub page:
https://github.com/Rdatatable/data.table/wiki/Getting-started
