Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rleidv() not behaving as advertised #1942

JoshOBrien opened this issue Nov 30, 2016 · 0 comments

rleidv() not behaving as advertised #1942

JoshOBrien opened this issue Nov 30, 2016 · 0 comments


Copy link

JoshOBrien commented Nov 30, 2016

The Examples section of ?rleid begins with this code block:

 DT = data.table(grp=rep(c("A", "B", "C", "A", "B"), c(2,2,3,1,2)), value=1:10)
 rleid(DT$grp) # get run-length ids
 rleidv(DT, "grp") # same as above

Although the third line says "same as above", here's what I get when I run the second and third lines of code:

> rleid(DT$grp) # get run-length ids
 [1] 1 1 2 2 3 3 3 4 5 5
> rleidv(DT, "grp") # same as above
 [1]  1  2  3  4  5  6  7  8  9 10

Not sure whether I'm misunderstanding what rleidv() should do, or whether some breaking change has been introduced since this was last visited.

@mattdowle mattdowle added this to the v1.10.0 milestone Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants