Remove specific rows from a data frame [duplicate] Remove specific rows from a data frame [duplicate] r r

Remove specific rows from a data frame [duplicate]


 X <- data.frame(Variable1=c(11,14,12,15),Variable2=c(2,3,1,4))> X  Variable1 Variable21        11         22        14         33        12         14        15         4> X[X$Variable1!=11 & X$Variable1!=12, ]  Variable1 Variable22        14         34        15         4> X[ ! X$Variable1 %in% c(11,12), ]  Variable1 Variable22        14         34        15         4

You can functionalize this however you like.