I am trying to figure out a quick way to pivot this table. My input table is like this
+------+------+------+
| FY | col1 | col2 |
+------+------+------+
| 2019 | 34 | 28 |
+------+------+------+
| 2018 | 22 | 39 |
+------+------+------+
and I want my output table to be
+-----------+-----------+-----------+-----------+
| col1.2018 | col1.2019 | col2.2018 | col2.2018 |
+-----------+-----------+-----------+-----------+
| 22 | 34 | 39 | 28 |
+-----------+-----------+-----------+-----------+
What is the most quick way to do it? I tries using reshape and tidyr but I am not getting the output desired. Any guidance or direction is appreciated
Edit: This is not an exact duplication of other question as pointed out. Although its similar, but not same