Hey guys I am trying to build a pivot table in R which I just started using. I know this topic has been discussed a few times here but I can't find an example that would help me out. I have data table which looks like following
What I am trying to do is build a triangle with Years as columns. Country & City as rows. So it looks like this
I have tried using group_by but can't figure it out. Would really appreciate any advice I can get!
Thanks in advance