# Get data
library(reshape2)
library(dplyr) # For select function
data("airquality")
dat <- airquality %>%
filter(Wind>15) # This is a wide form data
# Convert it to long
longdat <- melt(dat) # ALl variables arein a columnand their valuein another
longdat <- melt(dat, id = c('Month', 'Day')) # Remain the variable MonthandDay
# Convert back to wide
widedat <- dcast(longdat, Month + Day ~ variable)