I am trying this :
class_Of_Objects<-cbind(ls(),data.frame(sapply(ls(), function(x){class(get (x))})))
colnames(class_Of_Objects)<-c("variable","class_type")
But I also want to add extra column in the dataframe (class_Of_Objects) which can give me what's inside each object. I am trying this for that.
for ( obj in ls() ) { print(get(obj)) }
But as it has different number of rows for each object it is not merging with the original dataframe, is there anyway that I can have three colum dataframe like this:
Variable class_type content