This function formats the DTM to be used by the ML models In particular, merge together terms corresponding to one country, e.g. costa and rica

transform_DTM(DTM, change.col = TRUE)

Arguments

DTM,

a document term matrix

change.col

logical, default to TRUE, controls the modification of the column names for compatibility with other functions

Value

a DTM