How about vec[1:min(which(vec==FALSE))-1]
This will return a character(0) vector if vec[1] is FALSE Nikhil On 9 Nov 2009, at 2:38PM, David Winsemius wrote:
vec= TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE
______________________________________________ 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.