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
This is an example of how to convert from data.table to data frame
library(tidyverse)
library(data.table)
df <- data.frame(a = 1:5, b = 6:10, c = LETTERS[5:9])
class(df)
#[1] "data.frame"
df <- data.table(df)
class(df)
#[1] "data.table" "data.frame"
class(df) <- class(as.data.frame(df))
class(df)
#[1] "data.frame"