I have temperature dataframe from 37 stations. First column is date and from second to last column are temperature from 1-37 stations. I need to arrange the data in such a way that, the result contains Date column and temperature column from station 1 - 37. Such that the date column is repeated after every station.
I tried
library(dplyr)
tmax_1 %>% select('Date', 'V1')
tmax_2 %>% select('Date', 'V2')
tmax_3 %>% select('Date', V3)
tmax_4 %>% select('Date', V4)
tmax_5 %>% select('Date', V5)
tmax_6 %>% select('Date', V6)
But this takes lot of typing. Can anyone suggest better solution in case i need to do it for more than 1000 stations!!![enter image description here][1]