Add/overwrite a column in a data.frame or data.table, preserving class and modifying in place if data.table.
Useful links