dt.rm.dup | R Documentation |
Removes duplicated column content from a data.table.
dt.rm.dup(DT, ignore = NULL)
DT |
A |
ignore |
A |
A data.table
.
Yoann Pageaud.
dtbl<-data.table( col1 = rep(x = c("hello", "world"), 8), col2 = rep(x = c("hello", "world"), 8)) #'col2' is a duplicate of 'col1'. dt.rm.dup(DT = dtbl) #Only 'col1' remains. #You can ignore specific columns that will not be remove if duplicated: dt.rm.dup(DT = dtbl,ignore = "col2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.