Hi,
As I am dealing with my data, I have the following issue.
An simple example of my data looks like this:
A B
-more-
1 0
1 0
1 0
. 1
. 1
3 0
4 0
-more-
B is created by B = 0 if A ==.
And now I want to make the data that are surrounding missing data all become missing data.
By surrounding, I mean for example the 10 rounds before and after the missing data.
I've success by replace A =. if B[_n-10] + B[_n-9] + ... + B[_n+10] > 0
However, the command line is really long, and what I really want to do is 100 rounds instead of 10 rounds, and it will be a problem to write such a long command.
Is there a simple way to write such summation? Or is there any way to do what I want to do here?
Thank you!
James
As I am dealing with my data, I have the following issue.
An simple example of my data looks like this:
A B
-more-
1 0
1 0
1 0
. 1
. 1
3 0
4 0
-more-
B is created by B = 0 if A ==.
And now I want to make the data that are surrounding missing data all become missing data.
By surrounding, I mean for example the 10 rounds before and after the missing data.
I've success by replace A =. if B[_n-10] + B[_n-9] + ... + B[_n+10] > 0
However, the command line is really long, and what I really want to do is 100 rounds instead of 10 rounds, and it will be a problem to write such a long command.
Is there a simple way to write such summation? Or is there any way to do what I want to do here?
Thank you!
James
Comment