r – Operations with data frame

I need to do like the picture below. How would it be? I've already been able to isolate the lines that are only zeros in all the columns with the help of subset (Base, VALUE1 == 0 & VALOR2 == 0 & VALOR3 == 0 & VALOR4 == 0), but I can not perform processing between the data frame which contains only zeros of the complete data.

insert the description of the image here