R code for CAMP rotary screw trap platform