I have a table like this:
Anno Mese `No quotations`
<int> <chr> <int>
1 2018 Feb 169
2 2018 Jan 147
3 2019 Feb 102
4 2019 Jan 222
I'd like to transform data like this
Feb-2018 Jan-2018
No quotation 169 147
and so on. Basically I need time on columns.
I tried melt
and reshape
with no success.
I can use dcast
dcast(report1, . ~ Anno+Mese)
and that's the output
. 2018_febbraio 2018_gennaio 2019_febbraio 2019_gennaio
1 . 169 147 102 222
while I'd prefer to have
2018_febbraio 2018_gennaio 2019_febbraio 2019_gennaio
No_quotation 169 147 102 222
And also I could have more than one numeri values ( besides No quotations column)
software R. Thanks