> list<-seq(2,10,2) > list [1] 2 4 6 8 10 > list[-which(2==list)] [1] 4 6 8 10
using the which() will let you remove things from a list that have a specified value... I usually use the blah<- blah[-which(TRUE==is.na(blah)) ] which will remove all NA values in your list -- View this message in context: http://r.789695.n4.nabble.com/how-to-eliminate-an-element-of-a-list-tp2323329p2324696.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.