Given a data frame, how do I programmatically list only columns of a certain type (say, only 'factor', 'numeric', etc.)?
I created a function that receives data frames. I now need to do certain aggregations on the data frame but only for numeric columns and I do not know beforehand which columns are they. So, is there a way to programmatically examine the 'meta' information?
str() gives the structure of the object - but is there a way this information can be used to achieve the above?
For example,
sumNumerics