From hugh@p@r@on@ge @end|ng |rom gm@||@com  Mon Feb  8 14:25:35 2021
From: hugh@p@r@on@ge @end|ng |rom gm@||@com (Hugh Parsonage)
Date: Tue, 9 Feb 2021 00:25:35 +1100
Subject: [Rd] Does type raw really have no ordering?
Message-ID: <CAJmOi+PZKcmr88eAVT0b+iAKkfwtbhjUzuk3SNeJMZ6TJMHX5g@mail.gmail.com>

In the help for Extremes  ?min

> Note that all versions fail for raw and complex vectors since these have no ordering.

This makes sense for complex vectors, yet `raw` vectors seem to have a
natural order. Indeed:

which.min(as.raw(c(5L, 2L, 1L, 99L)))

works and would identify the minimum.  Similarly comparison operators
work on raw vectors (and fail, expectedly, on complex ones).

Is there something peculiar to min() and friends that make raw vectors
invalid input?


Hugh.



[Rd] Does type raw really have no ordering?
Hugh Parsonage