title: R - function to get a list of database columns
body: <p>I have a database with multiple variables, both numerical and categorical. I would like to have summary descriptive statistics with R studio only for categorical variables (frequency, percentage) and i was thinking about a subset of the database isolated with a column list created with a function and then passing it to sapply -> prop.table. 
  Unfortunately I'm stucked and i can only detect through the columns if they're categorical or not. </p>
  
  <p>Thanks in advance, 
  Angelo </p>