Here is the data frame that I started with.
I tried to change it from wide to long using this code:
#change data frame from wide to long
us_population_v3 <- pivot_longer(us_population_v2, cols = !1, names_to = "year", values_to = "total_population")
View(us_population_v3)
It created a new data frame, but the second half of the data is missing. I'm not sure why or how to fix it. This is part of what it produced. The first half looks correct, but the second half is NA and says "exported on..."
I tried turning the data frame from wide to long. I'm not sure what to try from here.
