I'm new to R and I was trying to combine the columns (x axis) of a dataframe together in R to get the sum in a single column.
Tourism Weekdays Weekends
Profit 100 20
Visitors 250 75
How would I be able to combine Weekdays
and Weekends
into a single column called Week
so it would look like the one below? As I understand it is possible to do a row addition if I wanted to combine Profit
and Visitors
so my thought was there must be something similar for columns.
Tourism Week
Profit 120
Visitors 325