[R] remove data frame from list of data frames

Matthew Finkbeiner matthew.finkbeiner at mq.edu.au
Sun Nov 7 12:07:55 CET 2010


I have a list of data frames like this:

a<- data.frame(x=runif(10), y = runif(10), Acc = 1)
b<- data.frame(x=runif(10), y = runif(10), Acc = 0)
ls<- list(a,b)

and I want to remove the data frames from ls that have Acc values other than 1.

How do I do that?

Thanks for any help!

Matthew



More information about the R-help mailing list