search for: phase_mark

Displaying 1 result from an estimated 1 matches for "phase_mark".

2007 Sep 17
1
How can I write routines and scripts in the R environment ?
...s marked in another field, say phase-mark, containing the letter "Z".* *My goal is to write a small routine that does that for each signal file.* *If I had to do that in C language I'd write something like:* ** *num-cycles = 0; for (i=0,i<num-records; i++) {* * if ( my.data.frame$phase_mark[i] =="Z" ) {* * my.data.frame$phase[i] += num-cycles*2PI;* * num-cycles++;* * }* *}* *Questions*: *1. How can I write a small routine like the one above to operate on certain columns of an entire data.frame ?* *2. How can I write a parametric R script (like a shell scr...