Re: [R] resizing data

2013-01-25 Thread arun
Hi, Inline: - Original Message - From: emorway To: r-help@r-project.org Cc: Sent: Friday, January 25, 2013 5:29 PM Subject: Re: [R] resizing data I played around with your example on the smaller dataset, and it seemed like it was doing what I wanted.  However, applying it to the

Re: [R] resizing data

2013-01-25 Thread arun
3    4  #[2,]    5    6    7    8  #[3,]    9   10   11   12  #[4,]   13   14   15   16 -- A.K. - Original Message - From: emorway To: r-help@r-project.org Cc: Sent: Friday, January 25, 2013 4:12 PM Subject: [R] resizing data Undoubtedly this question has been a

Re: [R] resizing data

2013-01-25 Thread arun
which(x==1,arr.ind=TRUE)    row col #[1,] 1   7  y<-t(matrix(x,nrow=546))  which(y==1,arr.ind=TRUE) # row col #[1,] 341 328 A.K. - Original Message - From: emorway To: r-help@r-project.org Cc: Sent: Friday, January 25, 2013 5:29 PM Subject: Re: [R] resizing data I pla

Re: [R] resizing data

2013-01-25 Thread David Winsemius
On Jan 25, 2013, at 2:29 PM, emorway wrote: > I played around with your example on the smaller dataset, and it seemed like > it was doing what I wanted. However, applying it to the larger problem, I > didn't get a resized 2D dataset that preserved the order I was hoping for. > Hopefully the fol

Re: [R] resizing data

2013-01-25 Thread Brian Diggs
On 1/25/2013 2:29 PM, emorway wrote: I played around with your example on the smaller dataset, and it seemed like it was doing what I wanted. However, applying it to the larger problem, I didn't get a resized 2D dataset that preserved the order I was hoping for. Hopefully the following illustra

Re: [R] resizing data

2013-01-25 Thread emorway
I played around with your example on the smaller dataset, and it seemed like it was doing what I wanted. However, applying it to the larger problem, I didn't get a resized 2D dataset that preserved the order I was hoping for. Hopefully the following illustrates the larger problem: x<-matrix(0,nr

Re: [R] resizing data

2013-01-25 Thread David Winsemius
On Jan 25, 2013, at 1:12 PM, emorway wrote: > Undoubtedly this question has been asked before, I just can't seem to find > the combination of search terms to produce it. I'm trying to resize a > dataset that is pulled into R using read.table. However, I think the same > problem can be produced

[R] resizing data

2013-01-25 Thread emorway
Undoubtedly this question has been asked before, I just can't seem to find the combination of search terms to produce it. I'm trying to resize a dataset that is pulled into R using read.table. However, I think the same problem can be produced using matrix: x<-matrix(1:64,8) x # [,1] [,2] [,3