0

So I have a long dataframe in R as below

Date Name Name 2 Variable Value
2018-06-30 Germany Italy Benchmark 30
2018-06-30 Germany Italy Active 50
2018-06-30 Germany Italy Port 20
2018-07-30 Germany Italy Active 50
2018-07-30 Germany Italy Port 20
2018-07-30 Germany Italy Benchmark 30

But I want to change it to something like this:

Date Name Name 2 Port Bench Active
2018-06-30 Germany Italy 20 30 50
2018-07-30 Germany Italy 20 30 50

How should I do that? Reshaping it against Name & Date does not solve my problem...

AutumnWest
  • 61
  • 5

0 Answers0