I have a data frame like this
> df Source: local data frame [4 x 4] a x y z 1 name1 1 1 1 2 name2 1 1 1 3 name3 1 1 1 4 name4 1 1 1
W
You can use rich selectors with select() inside the call to rowSums()
select()
rowSums()
df %>% transmute(a, total = rowSums(select(., -a)))