s-news
[Top] [All Lists]

mode of matrix

To: "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu>
Subject: mode of matrix
From: "Dakin, Jonathan" <j.dakin@imperial.ac.uk>
Date: Thu, 17 Apr 2003 16:45:56 +0100
I'm using sapply to generate summary data from two lists:

test  <- sapply(as.list(1:length(pre.op)), function(x, y, z){
        return(list(mean(y[[x]]$BFwater), mean(z[[x]]$BFwater)))},
                        y=pre.op,
                        z=post.op.red)

What comes back is appears to be a matrix (in the object explorer), but has
mode list.  If I enter: test, I get the matrix, but the output is "2 rows, 0
colums" although 7 are displayed.

It refuses to open with the grid editor, and refuses to be coerced into a
matrix.  All I can do is unlist it, and attempt to reconstruct.

Has anyone else found a bug here, or is there something obvious I'm missing.
I've recently upgraded to Splus 6.1, running under W2K.

Jonathan Dakin
Imperial College

<Prev in Thread] Current Thread [Next in Thread>
  • mode of matrix, Dakin, Jonathan <=