apply()
functions
df <- data.frame(a = 1:2, b = 2:3, c = c("a", "z"), d = c("b", "k"))
df
## a b c d
## 1 1 2 a b
## 2 2 3 z k
## a b c d
## TRUE TRUE FALSE FALSE
vapply(df, is.numeric, logical(1))
## a b c d
## TRUE TRUE FALSE FALSE
try(vapply(df, is.numeric, character(1)))
## Error in vapply(df, is.numeric, character(1)) :
## values must be type 'character',
## but FUN(X[[1]]) result is type 'logical'