refcol = 3;
dt = RandomInteger[10, {10, 5}];
dt//TableForm
Select[dt, Max[# - #[[refcol]]] <= 0 &]
(* {{2, 7, 8, 5, 4}, {7, 1, 8, 4, 0}, {4, 10, 10, 3, 6}} *)
Alternatively,
DeleteCases[dt, _?(Max[# - #[[refcol]]] > 0 &)]
Cases[dt, _?(Max[# - #[[refcol]]] <= 0 &)]
Pick[dt, (Max[# - #[[refcol]]] <= 0) & /@ dt]
all give the same output.
Showing the deleted rows in red:
If[Max[# - #[[refcol]]] > 0, Style[#, Bold, Red, 20] & /@ #,
Style[#, Directive[Bold, 20]] & /@ #] & /@ dt // TableForm
Update: The four functions above work for the case of a single reference
column.For the case where a row is deleted if any entry exceeds any
of the multiple reference column entries, one needs the following
straightforward modifications:
f1 = Function[{dt, cols}, With[{rest = Complement[Range@Length@dt[[1]], cols]},
Pick[dt, (Max[#[[rest]] - Min[#[[cols]]]] <= 0) & /@ dt]]];
f2 = Function[{dt, cols}, With[{rest = Complement[Range@Length@dt[[1]], cols]},
Select[dt, Max[#[[rest]] - Min[#[[cols]]]] <= 0 &]]];
f3 = Function[{dt, cols}, With[{rest = Complement[Range@Length@dt[[1]], cols]},
Cases[dt, _?(Max[#[[rest]] - Min[#[[cols]]]] <= 0 &)]]];
f4 = Function[{dt, cols}, With[{rest = Complement[Range@Length@dt[[1]], cols]},
DeleteCases[dt, _?(Max[#[[rest]] - Min[#[[cols]]]] > 0 &)]]];
f1[dt, {2, 3}] == f2[dt, {2, 3}] == f3[dt, {2, 3}] == f4[dt, {2, 3}]
(* True *)
f1[dt, {2, 3}]
(* {{2, 7, 8, 5, 4}, {4, 10, 8, 0, 4}, {4, 10, 10, 3, 6}} *)