I'm trying to drop rows based on their position related to another row specified in a compound 'if' statement. For example, if I have the following data:
PHP Code:
| stringvar flagvar |
|---------------------|
1. | aaaa . |
2. | bbbb . |
3. | **** . |
4. | cccc . |
5. | dddd . |
6. | **** 1 |
7. | eeee . |
8. | ffff . |
PHP Code:
drop in _n-1 _n-2 _n-3 if flagvar==1 & stringvar[_n-3]=="****"
PHP Code:
| stringvar flagvar |
|---------------------|
1. | aaaa . |
2. | bbbb . |
3. | **** 1 |
4. | eeee . |
5. | ffff . |
Thanks!
0 Response to Dropping rows based on their position related to another row
Post a Comment