Entering edit mode
Using IRanges_1.4.0 here (checked elsewhere with 1.4.8):
I would expect
rep( Rle(x), times=Rle(x) ) == Rle( rep(x, x) )
but
> x <- rep(1:4,c(1,2,1,2))
> Rle(rep(x,x))
'integer' Rle of length 16 with 4 runs
Lengths: 1 4 3 8
Values : 1 2 3 4
> rep(Rle(x),times=Rle(x))
'integer' Rle of length 18 with 4 runs
Lengths: 1 5 3 9
Values : 1 2 3 4
> rep(Rle(x),times=x)
'integer' Rle of length 18 with 4 runs
Lengths: 1 5 3 9
Values : 1 2 3 4
>
Is this the intended behavior?
If so, why?
Chuck
Charles C. Berry (858) 534-2098
Dept of Family/Preventive
Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego
92093-0901