@stat.math.ethz.ch
Subject: Re: [R] help with table partition
Hi, thank you all for the help.
The split function works very well.
I have an additional question. If I have a matrix of prices (row = 30,
col = 2) in matrix P
P:
30 40
31.5 42
32 43
What is the quickest way to get a new matrix
Sent: Thursday, June 15, 2006 10:35 AM
To: Wong, Kim
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] help with table partition
Hi
maybe ?split and ?t is what you want
mat<-matrix(rnorm(1000), 100,10)
mat.s<-split(data.frame(mat), rep(1:5, each=20))
#splits mat to list with 5 eqal submatrices
lap
at 9:38, Wong, Kim wrote:
Date sent: Thu, 15 Jun 2006 09:38:29 -0400
From: "Wong, Kim" <[EMAIL PROTECTED]>
To:
Subject: [R] help with table partition
> Hi,
>
>
>
> I have a test_table where the d
do.call(cbind, split(as.data.frame(test_table), rep(1:170,each=366)))
---
Jacques VESLOT
CNRS UMR 8090
I.B.L (2ème étage)
1 rue du Professeur Calmette
B.P. 245
59019 Lille Cedex
Tel : 33 (0)3.20.87.10.44
Fax : 33 (0)3.20.87.10.31
ht
Hi,
I have a test_table where the dim is 62220 by 73 (row by col)
I would like to partition the rows into 170 equal parts (170 tables
where each is of dim 366 by 73), and rearrange them horizontally. The
source codes I have:
for (i in 1:170) {
c = cbind(c,test_table[(367*i+