Collect all col names and types of all tables automatically

Is there a way to put the names and types of all variable of a dataframe in a vector in one command?

sapply(DF ,class)

where DF is a data frame, returns a named vector where the values are the class of each column and the vector names are the column names of the data frame.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.