Re: [R] Subarray specification problem

2010-12-18 Thread Roy Shimizu
On Fri, Dec 17, 2010 at 8:58 AM, Michael Friendly wrote: > Use aperm() to make time the first dimension > Reshape to a matrix (all other dimensions combined) > Do your selection on X[1,] > aperm() to Permute back To Michael, thanks! I copy my implementation of Michael's idea at the end of this p

Re: [R] Subarray specification problem

2010-12-17 Thread Michael Friendly
Use aperm() to make time the first dimension Reshape to a matrix (all other dimensions combined) Do your selection on X[1,] aperm() to Permute back On 12/16/2010 11:00 AM, Roy Shimizu wrote: Hi. I'm new to R, and I'm still learning R's system for addressing subsets of data structures. I'm part

[R] Subarray specification problem

2010-12-16 Thread Roy Shimizu
Hi. I'm new to R, and I'm still learning R's system for addressing subsets of data structures. I'm particularly interested in the problem of selecting subarrays based on complex criteria involving the dimnames (as opposed to the values of the cells) of the array. Here's an example of such a prob

Re: [R] subarray

2008-06-17 Thread jim holtman
If you are trying to subset the matrix, the correct format is: Y <- dat[, 46:63] You probably need to reread the introduction to R to understand how indexing works. On Tue, Jun 17, 2008 at 10:01 PM, Paul Adams <[EMAIL PROTECTED]> wrote: > Hello everyone, > I am trying to subset a matrix with the

[R] subarray

2008-06-17 Thread Paul Adams
Hello everyone, I am trying to subset a matrix with the following code: dat<-read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt",header=T,row.names=1) file.show(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt") Z.matrix<-as.matrix(dat) Y<-ar