Re: [R] moving a window over a matrix column

2013-09-26 Thread Berend Hasselman
On 26-09-2013, at 15:30, Babak Bastan wrote: > Greeting > > I want to move a window over a column in a Matrix. For example. I have a > 8X1 Matrix and I want to read the data from 1 until 5, for the second time > 2 until 6, third time 3 till 7 and... and do something on this values and > show th

Re: [R] moving a window over a matrix column

2013-09-26 Thread David Winsemius
On Sep 26, 2013, at 8:30 AM, Babak Bastan wrote: Greeting I want to move a window over a column in a Matrix. For example. I have a 8X1 Matrix and I want to read the data from 1 until 5, for the second time 2 until 6, third time 3 till 7 and... and do something on this values and show th

Re: [R] moving a window over a matrix column

2013-09-26 Thread Bert Gunter
Perhaps ?filter -- Bert On Thu, Sep 26, 2013 at 6:30 AM, Babak Bastan wrote: > Greeting > > I want to move a window over a column in a Matrix. For example. I have a > 8X1 Matrix and I want to read the data from 1 until 5, for the second time > 2 until 6, third time 3 till 7 and... and do some

[R] moving a window over a matrix column

2013-09-26 Thread Babak Bastan
Greeting I want to move a window over a column in a Matrix. For example. I have a 8X1 Matrix and I want to read the data from 1 until 5, for the second time 2 until 6, third time 3 till 7 and... and do something on this values and show them in a diagramm: I wrote this code: #here I make an nX1 M