I have a table called data
:
A 22
B 333
C Not Av.
D Not Av.
How can I get a subset, from which all rows containing "Not Av." are excluded? It is important to mention that I have the index of a column to be checked (in this case colnum
= 2), but I don't have its name.
I tried this, but it does not work:
data<-subset(data,colnum!="Not Available")
You don't really need the
subset
function. Just use[
:In case you still want to use the subset function: