On May 15, 2013, at 11:24 PM, Pascal Oettli wrote:
> Hi,
>
> You probably should read R documentation and learn how to use "seq"
>
> ?seq
> ?rowMeans
>
> HTH,
> Pascal
>
>
> On 05/16/2013 03:17 PM, Zilefac Elvis wrote:
>> Hello,
>>
>> I need your help on this matrix:
>>
>>
>> 1 1 1 1 1 1
Sent: Thursday, May 16, 2013 2:17 AM
Subject: [R] estimate value from simulations
Hello,
I need your help on this matrix:
1 1 1 1 1 1
2 2 2 2 2 2
3 3 3 3 3 3
5 5 5 5 5 5
2 2 2 2 2 2
3 3 3 3 3 3
6 6 6 6 6 6
2 2 2 2 2 2
3 3 3 3 3 3
1 1 1 1 1 1
2 2 2 2 2 2
3 3 3 3 3 3
First three r
Hello,
Try the following.
mat <- matrix(scan(text = "
1 1 1 1 1 1
2 2 2 2 2 2
3 3 3 3 3 3
5 5 5 5 5 5
2 2 2 2 2 2
3 3 3 3 3 3
6 6 6 6 6 6
2 2 2 2 2 2
3 3 3 3 3 3
1 1 1 1 1 1
2 2 2 2 2 2
3 3 3 3 3 3
"), ncol = 6, byrow = TRUE)
idx <- 1 + (seq_len(nrow(mat)) - 1) %% 3
aggregate(mat, l
Hi,
You probably should read R documentation and learn how to use "seq"
?seq
?rowMeans
HTH,
Pascal
On 05/16/2013 03:17 PM, Zilefac Elvis wrote:
Hello,
I need your help on this matrix:
1 1 1 1 1 1
2 2 2 2 2 2
3 3 3 3 3 3
5 5 5 5 5 5
2 2 2 2 2 2
3 3 3 3 3 3
6 6 6 6 6 6
2 2 2
Hello,
I need your help on this matrix:
1 1 1 1 1 1
2 2 2 2 2 2
3 3 3 3 3 3
5 5 5 5 5 5
2 2 2 2 2 2
3 3 3 3 3 3
6 6 6 6 6 6
2 2 2 2 2 2
3 3 3 3 3 3
1 1 1 1 1 1
2 2 2 2 2 2
3 3 3 3 3 3
First three rows represent first simulation, next three rows = second
simulation etc.
I would
5 matches
Mail list logo