From pgilbert@bank-banque-canada.ca  Fri Dec  5 14:50:47 1997
From: pgilbert@bank-banque-canada.ca (Paul Gilbert)
Date: Fri, 5 Dec 1997 09:50:47 -0500
Subject: R-alpha: is.vector of one-dimensional array
References: <199712051408.PAA06749@galadriel.ci.tuwien.ac.at>
Message-ID: <97Dec5.121337est.26929@mailgate.bank-banque-canada.ca>

>is.vector() of an one-dimensional array returns FALSE. this is also the
>behavior of Splus, but totally counter-intuitive for me ... IMO an
>array of dimension 1 is exactly the definition of a vector ...

I assume by "one-dimensional array" you mean a two or higher dimensional array
with all but one of the values from dim(x)  being 1. This is possibly
counter-intuitive, but there are cases where one needs to distinguish these.
Perhaps length(dim(x)) would be better, but dim returns NULL  for a vector. This
is even more counter-intuitive to me. I think it should return length(x) for a
vector. In any case there is lots of code out there that will break if you
change these.

Paul Gilbert

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


R-alpha: is.vector of one-dimensional array
Paul Gilbert