Skip to content
Back to formatted view

Raw Message

Message-ID: <CAJmOi+PZKcmr88eAVT0b+iAKkfwtbhjUzuk3SNeJMZ6TJMHX5g@mail.gmail.com>
Date: 2021-02-08T13:25:35Z
From: Hugh Parsonage
Subject: Does type raw really have no ordering?

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.