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
Try:
df$date <- as.Date(with(df, paste(year, mon, day,sep="-")), "%Y-%m-%d") df$date #[1] "1947-01-01" "1947-04-01" "1947-07-01" "1947-10-01" "1948-01-01" #[6] "1948-04-01"