Possible Duplicate:
removing specific rows from a dataframe
Let's say I have a data frame consisting of a number of rows, like this:
X <- data.frame(Variable1=c(11,14,12,15),Variable2=c(2,3,1,4))
Variable1 Variable2
11 2
14 3
12 1
15 4
Now, let's say that I want to create a new data frame that is a duplicate of this one, only that I'm removing all rows in which Variable1 has a certain numerical value. Let's say we have these numbers stored in a vector, v.
That is, if v contains the numbers 11 and 12, the new data frame should look like this:
Variable1 Variable2
14 3
15 4
I've been searching the net for quite some time now trying to figure out how to do something like this. Mainly, I would just need some kind of command saying removeRow(dataframe, row)
or something like that.