I'm a beginner to R. What I want to do is join numbers together. I made a data
as follows:
data<-data.frame(year=c(2020,2021,2022),month=c(10,11,12))
My expected output is as follows:
data=data.frame(year=c(2020,2021,2022),month=c(10,11,12),year_month=c(202010,202111,202212))
year_month
is the column joining year
and month
together.
How can I do this?