Found in the man page for max(), min(), pmax(), pmin(), etc...:
(Note that all versions fail for raw and complex vectors since
these have no ordering.)
It seems that raw vectors *do* have an ordering (why wouldn't they?):
> x <- as.raw(0:8)
 00 01 02 03 04 05 06 07 08
> x < x
 TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE
This is the R 3.0 series and current R devel.
If for whatever reason max(), min(), pmax(), pmin(), etc... cannot
be made to work on raw vectors, it would be nice to see the man page
modified to say just something like "raw vectors are not supported".
Also there is no reason why order(), sort(), rank(), etc... couldn't
work on raw vectors.
Another inconsistency of the same kind is that character vectors
also have an ordering but which.min() and which.max() don't work
properly on them:
> y <- sample(letters)
In which.max(y) : NAs introduced by coercion
It seems that some of these inconsistencies could be avoided by having
all these functions and operators share more code internally.
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024