From jim.lemon@uts.edu.au  Tue Jun 13 04:17:40 2000
From: jim.lemon@uts.edu.au (jim.lemon@uts.edu.au)
Date: Tue, 13 Jun 2000 05:17:40 +0200 (MET DST)
Subject: [Rd] problem with aperm? (PR#568)
Message-ID: <200006130317.FAA19080@pubhealth.ku.dk>

R version 1.0.1
OS RedHat Linux 6.1

In attempting to test for numeric vectors in a data frame, I tried:

apply(dataframe,2,is.numeric)

and found that it returned FALSE for all vectors whether they were
numeric or not.  I tracked this to the fact that as.array() was
converting the data frame to character vectors, and thought I could
solve it by using array(), which preserved the mode of the columns. 
However, I then got an error from aperm():

Error in aperm(X, c(s.call, s.ans)) : aperm: invalid second argument,
must be a vector

even though the second argument tested as a vector.  This happened both
within the apply() function and calling aperm() separately, even if I
explicitly used a numeric vector for the second argument.  I then had a
look at the code for do_aperm(), but as I am unfamiliar with Scheme, had
to give up after trying to work out what CADR and SEXP were.

Jim

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] problem with aperm? (PR#568)
jim.lemon@uts.edu.au