lists (PR#88)

Peter Dalgaard
Tue, 16 Feb 1999 15:11:43 +0100

> > 
>> > mode(c(23,42))
>> > is.vector(c(23,42),mode="numeric")
>> > is.vector(c(23,42),mode=c("integer","double","logical"))
>> Not sure I understand the problem:
> What I had in mind was that it would give TRUE if any of the vector
> had any of these modes i.e. some way of checking several modes at the
> same time without calling is.vector several times. I am looking for
> vectors upon which I can do calculations, as in those given. In
> retrospective, the example is poor. More logically, it should either
> use any() or ||.

I believe this is not a bug. You can get the effect you want fairly easily with




any(mode(x) == modes) # or storage.mode to distinguish double/integer

Moving report to "trashcan" (it can be picked up again, don't worry.)
r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: