Skip to content

Export data.table:::uniqlist for external use #900

@anhqle

Description

@anhqle

uniqlist is useful to detect whether there's a change in value in an R's data frame. (For example, check if a variable change values in time series data.)

See this StackOverflow question, which shows that there's no readable alternative to uniqlist

x = data.frame(cnt=1:10, code=rep('ELEMENT 1',10), val0=rep(5,10),  val1=rep(6,10),val2=rep(3,10))
x[4,]$val0=6

data.table:::uniqlist(x[, 3:5])
# [1] 1 4 5

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions