I was playing with pivot_longer and pivot_wider but probably am missing something. I have a data.frame like D_Wider and would like to convert it to something like D_longer. any way forward?
library(tidyverse)
D_Wider <- data.frame(A = 15, S = 10, D = 25, Z = 16)
Desired Output
D_Longer <- data.frame(Stations = c("A","S","D","Z"), Value = c(15,10,25,16))