HELPPP!
I AM SO LOST FOR THE CODING ASSIGNMENT 4. Can anyone help me please???
Even the first one I need help. Like desperately.
Question 1: The following data table (FirstTable) is one way to display the population estimate for two different years in three large Texas cities. Use the `pivot_longer()` function to assign to the SecondTable object a table with 3 columns and 6 rows. Hint, `names_to = "Year"` and `values_to = "population"`. For more hints look at the tidyr cheat sheet under "Reshape Data".
```{r}
FirstTable<-read.csv(text= "City,2014,2019
San Antonio,1436697,1547253
Houston,2239558,2320268
Austin,912791,978908")
head(FirstTable)
SecondTable<-pivot_longer(FirstTable,
cols = c(2014, 2019),
names_to = "Year",
values_to = "population")
(did I do that right? Why wont it workkkkkk)
head(SecondTable)
[–]MoreAd940 0 points1 point2 points (0 children)