Skip to content

[R-Forge #2491] rblindlist could add a column containing the names #591

@arunsrinivasan

Description

@arunsrinivasan

Submitted by: Matt Dowle; Assigned to: Nobody; R-Forge link

With a named list L of data.table

rbindlist(L, namesname="Names")

would do apx :

rbind(L)
DT[,Names:=rep(names(L),sapply(L,nrow))]
movecol(DT,"Names",1)

with check that length(unique(names(L))) == length(L) [ i.e. !any(duplicated(names(L))) ]

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions