Applies user function to head of each column. Good for determing things such as column class.

replyr_testCols(x, f, n = 6L)

Arguments

x

tbl or item that can be coerced into such.

f

test function (returning logical, not depending on data length).

n

number of rows to use in calculation.

Value

logical vector of results.

Examples

d <- data.frame(x=c(1,2),y=c('a','b')) replyr_testCols(d,is.numeric)
#> x y #> TRUE FALSE