Learn R Programming

replyr (version 0.3.01)

replyr_testCols: Run test on columns.

Description

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

Usage

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

Run this code

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

Run the code above in your browser using DataLab