Takes a data.table
and replaces a single column (preferably)
containing character or factor values with the enumeration of these values.
The enumeration is done according to the unique and sorted values of the
original column elements. This function modifies the input table.
column_to_int(table, colname)
A data.table
.
The name of a column in the table. This column should be of class character or factor.
The input table modified, with the given column replaced by integer values as described.