Re: [R] applying quantile to a list using values of another object as probs

2010-05-17 Thread Lorenzo Cattarino
[mailto:jorgeivanve...@gmail.com] Sent: Tuesday, 18 May 2010 12:37 PM To: Lorenzo Cattarino Subject: Re: [R] applying quantile to a list using values of another object as probs Hi Lorenzo, How about this? lapply(1:length(mylist), function(i) quantile(mylist[[i]], probs = B[i,])) HTH, Jorge

Re: [R] applying quantile to a list using values of another object as probs

2010-05-17 Thread Dan Davison
> Sent: Monday, 17 May 2010 8:27 PM > To: Lorenzo Cattarino > Cc: r-help@r-project.org > Subject: Re: [R] applying quantile to a list using values of another > object as probs > > On 05/17/2010 06:01 PM, Lorenzo Cattarino wrote: >> Hi r-users, >> >> I have a matrix

Re: [R] applying quantile to a list using values of another object as probs

2010-05-17 Thread Lorenzo Cattarino
: [R] applying quantile to a list using values of another object as probs On 05/17/2010 06:01 PM, Lorenzo Cattarino wrote: > Hi r-users, > > I have a matrix B and a list of 3x3 matrices (mylist). I want to > calculate the quantiles in the list using each of the value of B as >

Re: [R] applying quantile to a list using values of another object as probs

2010-05-17 Thread Jim Lemon
On 05/17/2010 06:01 PM, Lorenzo Cattarino wrote: Hi r-users, I have a matrix B and a list of 3x3 matrices (mylist). I want to calculate the quantiles in the list using each of the value of B as probabilities. The codes I wrote are: B<- matrix (runif(12, 0, 1), 3, 4) mylist<- lapply(mylist

[R] applying quantile to a list using values of another object as probs

2010-05-17 Thread Lorenzo Cattarino
Hi r-users, I have a matrix B and a list of 3x3 matrices (mylist). I want to calculate the quantiles in the list using each of the value of B as probabilities. The codes I wrote are: B <- matrix (runif(12, 0, 1), 3, 4) mylist <- lapply(mylist, function(x) {matrix (rnorm(9), 3, 3)}) fo