These functions are the data.table set*() functions. They still change
their input by reference and return exactly what data.table returns; they
only report what they changed.
Usage
setnames(x, ...)
setcolorder(x, ...)
setkey(x, ...)
setkeyv(x, ...)
setorder(x, ...)
setorderv(x, ...)
setindex(x, ...)
setindexv(x, ...)
set(x, ...)
setDT(x, ...)
setDF(x, ...)
setattr(x, ...)Examples
dt <- data.table::data.table(a = 3:1, b = 1:3)
data.table::setnames(dt, "a", "alpha")
data.table::setkey(dt, alpha)
