I would like sum several columns in my dataframe. For exemple, using iris r-base
I would like, for example, to sum the columns Sepal.Length, Petal.Length, and Petal.Width
I tried colSums, but it did not work.
df<-iris%>%
select(-Species)%>%
colSums([1:4])
Update: I tried to modify the question closer to my reality.