I have a dataset for country data that has a bunch of information listed in a long list, but I want to rearrange the data so it works well for a time series chart width-wise.
An example of what I have now:
Value   Year    Indicator   Country
500     2015    GDP         Germany
450     2014    GDP         Germany
400     2013    GDP         Germany
350     2012    GDP         Germany
300     2011    GDP         Germany
800     2015    GDP         China
750     2014    GDP         China
735     2013    GDP         China
700     2012    GDP         China
360     2011    GDP         China
900     2015    GDP         Italy
670     2014    GDP         Italy
550     2013    GDP         Italy
430     2012    GDP         Italy
200     2011    GDP         Italy
And how I'd like it to look:
Year    Germany China   Italy
2015    500     800     900
2014    450     750     670
2013    400     735     550
2012    350     700     430
2011    300     360     200
Are there any functions I should be considering to do this? I've looked into melt() and reshape(), but I'm a little unclear with how to proceed with them given the layout of the data.
I really appreciate anyone's help. Thanks in advance.
 
    