[Solved] Delete nth row if the sum of columns b and c exceeds the nth value of column a


We can create a logical condition by summing the columns ‘b’ and ‘c’, checking the output is less than or equal to ‘a’ and use that logical vector to subset the rows.

df[with(df, (b + c) <=  a),]
#   a  b  c
#2 70 20 30

NOTE: The results are based on the OP’s description. This is downvoted unnecessarily.

data

df <- data.frame(a = c(50, 70), b = c(30, 20), c = c(30, 30))

2

solved Delete nth row if the sum of columns b and c exceeds the nth value of column a