I have a dataframe comprising of 300 variables with four observations each. For instance, one of the variables looks like this.
Afghanistan
34
34
56
45
I'm doing an ANOVA so I need the data to look like:
Afghanistan 34
Afghanistan 34
Afghanistan 56
Afghanistan 45
How do I do this for all 300 variables? My reasoning is so that I can use the aov function to run the anova. In this case the country is considered to be a treatment, and with 4 observations from each treatment. Any guidance will be appreciated!