> My end would be the output of your end(). If there are no args and no local > context, I don't see the need for it to be a function call. It would just > be defined as something like > > end <- structure( function(n) c(rep(FALSE, n-1), TRUE), class="selector")
Oh, I see what you mean. > I'm not sure what the definition of : should be if one of the args is a > selector. Alternatively you could use !first(2), and only use end/last when you want to select the last n observations. Of course !first(2) would be the equivalent to -(1:2) so there's not much savings there. Hadley -- http://had.co.nz/ ______________________________________________ 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.