how does rle work in r?
vector . Missing values are regarded as unequal to the previous value, even if that is also missing. inverse. rle() is the inverse function of rle() , reconstructing x from the runs.