I have a 7obs x 26 variables dataframe. The observations (rows) are countries, and the columns are years. However, the years are written as the column names.
What I want to do is create a plot that has the years (column names) as X axis and each of the countries as Y axis. So what I do is, first delete the first column with the names.
map1 <- map1[-1]
And then plot:
ggplot(map1, aes(8)) +
geom_line(aes(y = 1, colour = "var0")) +
geom_line(aes(y = 2, colour = "var1")) +
geom_line(aes(y = 3, colour = "var0")) +
geom_line(aes(y = 4, colour = "var0")) +
geom_line(aes(y = 5, colour = "var0")) +
geom_line(aes(y = 6, colour = "var0")) +
geom_line(aes(y = 7, colour = "var0"))
However this gives me an empty graph