Right now, I am having 3 separate columns as year, month, and day in a data file in R. How do I merge these three columns into just one column and make R understand that it
Since your year, month and day types are numerical the best function to use is the make_date function from the lubridate package. The tidyverse style solution is therefore
library(tidyverse)
library(lubridate)
data %>%
mutate(date = make_date(year, month, day))