If x is a vector (or data frame) that is in a particular order, and I
call split(x, f) to partition x, will the elements of each partition
remain in order?

That is, is the following assertion always TRUE?

for(i in split(x, f)) {
  stopifnot(!is.unsorted(i))
}

I suspect that this is the case, but the help page does not discuss
preservation of order in the result of split().

______________________________________________
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.

Reply via email to