My data frame looks something like this
USER OBSERVATION COUNT.1 COUNT.2 COUNT.3
A 1 0 1 1
A 2 1 1 2
A 3 3 0 0
With dplyr I want to build a columns that sums the values of the count-variables for each row, selecting the count-variables based on their name.
USER OBSERVATION COUNT.1 COUNT.2 COUNT.3 SUM
A 1 0 1 1 2
A 2 1 1 2 4
A 3 3 0 0 3
How do I do that?