Combine columns with table()

Viewed 29

i am trying to use table() to display how many people in my data frame have a job, no job, or NA for the variable job, broken down by birth year >1980 and <=1980. So I aim to combine all the columns (one column for one year) into only two columns (one for the years after 1980 and one for the years before and equal to 1980).

table(df$job,useNA = "always", ...)

I would be very grateful for your help :)

0 Answers
Related