I have been looking around but I have been unable to find a way to do this in R.
I have multiple vectors and I want to combine them to create a fixed data structure.
For example I have the following vectors:
year <- c("2019","2020")
month <- c("1","2"....)
country <- c("USA","GER","CAN"...)
I want to be able to create a dataframe that is structured as follows:
year month country
2019 1 USA
2019 1 GER
2019 1 CAN
2019 2 USA
....
I have looked around, but I have not found a way to create the desired result.
Any help is greatly appreciated, Daniel