What's the safest way to get rid of/remove the data.table
class from an object, turning it back into a data.frame?
I ask because I'm using script that relies on the following code:
newcol.index <- ncol(my.data) +1
my.data[,newcol.index] <- 3
colnames(my.data)[newcol.index] <- "test"
The data.table
packages apparently does not like this, but it work fines using objects of class data.frame
.