[R] estimate value from simulations

2013-05-16 Thread Zilefac Elvis
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

Re: [R] estimate value from simulations

2013-05-16 Thread Pascal Oettli
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

Re: [R] estimate value from simulations

2013-05-16 Thread Rui Barradas
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,

Re: [R] estimate value from simulations

2013-05-16 Thread arun
: 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 rows

Re: [R] estimate value from simulations

2013-05-16 Thread David Winsemius
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 2 2 2 2 2 2 3 3 3 3