[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
> 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
: [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
>
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
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
5 matches
Mail list logo