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
HI,
It's not clear why you wanted to take the transpose and resize it afterwards.
It could be done in one step as David suggested.
Suppose, you wanted to get the result after you transposed the matrix:
x<-matrix(1:64,8)
x1<-t(x)
matrix(unlist(split(x1,row(x1))),ncol=4,byrow=T)
# [,1] [,2] [
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
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
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
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
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
7 matches
Mail list logo