[R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
matrix, over 365 days. hope i am clear in my statement. eliza botto > > > > From: eliza_bo...@hotmail.com > > To: ruipbarra...@sapo.pt > > Date: Mon, 4 Jun 2012 22:13:10 + > > CC: r-help@r-project.org > > Subject: Re: [R] Spliting Lists into matrices > &

Re: [R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
gt; To: ruipbarra...@sapo.pt > Date: Mon, 4 Jun 2012 22:13:10 + > CC: r-help@r-project.org > Subject: Re: [R] Spliting Lists into matrices > > > > > > > dear rui, > lots of hugs for you. > thnkyou very much 4 your support. > eliza > > > Da

Re: [R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
dear rui, lots of hugs for you. thnkyou very much 4 your support. eliza > Date: Mon, 4 Jun 2012 22:58:12 +0100 > From: ruipbarra...@sapo.pt > To: eliza_bo...@hotmail.com > CC: r-help@r-project.org > Subject: Re: Spliting Lists into matrices > > Hello, > > Try > > # 'x' is your list > xlen

Re: [R] Spliting Lists into matrices

2012-06-04 Thread Rui Barradas
Hello, Try # 'x' is your list xlen <- sapply(x, length) i1 <- which(xlen == 365) i2 <- which(xlen == 366) mat365 <- matrix(unlist(x[i1]), nrow=365) mat366 <- matrix(unlist(x[i2]), nrow=366) Hope this helps, Rui Barradas Em 04-06-2012 22:46, eliza botto escreveu: i realy appreciate your con

Re: [R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
i realy appreciate your concern.. here is a small piece of my data. if you see the first and last part data, they contain 366 entries but the middle one has 365 entries. i want to put first and last entries is one matrix. list(c(0.86, 0.86, 0.86, 0.86, 0.86, 1.08, 1.08, 1.08, 1.08, 1.08, 1.08,

Re: [R] Spliting Lists into matrices

2012-06-04 Thread Rui Barradas
Hello, I'm glad it helped. To answer to this new question, we need to see what your data looks like. When you say 'list' are you refering to the type of R data structure 'list'? Or to data.frames? For us to see the best way is to use function dput. Example: df1 <- data.frame(A=rnorm(10), B=r

[R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
Dear Rui Barradas, Mackay and all R Users, Thankyou very much for your reply. You helped me a lot. I got what I wanted. I just want one more favor from you, if you could. Suppose I have certain number of lists of data frame, say 50. Each list has yearly data in it. Of-course, some lists have