I have data from an accelerometer device with `x`, `y`, `z` components table. And on a particular column I want to select data segments from that column alone using R code.

How can I achieve this: lets say the column has these numbers 

`1, 2, 3, 0, 0, 0, 3, 4, 5, 1, 0, 0, 0, 2, 3, 0, 4, 5, 0, 0, 0` 

And I want my result to be subsets like this 

`(1, 2, 3), (3, 4, 5, 1), (2, 3, 0, 4, 5)` 

stored in a variables that I can reuse. Essentially I am taking data segments between three consecutive zeros. How can I achieve this in R programming.