Chuck Cleland wrote: > newdat <- subset(a, a$V3 == "O") You can even use newdat <- subset(a, V3 == "O") because of the way that subset evaluates the "subset" expression.