Compute number of columns of a data.frame (work around https://github.com/rstudio/sparklyr/issues/976 ).

replyr_ncol(x)

Arguments

x

tbl or item that can be coerced into such.

Value

number of columns

Examples

d <- data.frame(x=c(1,2)) replyr_ncol(d)
#> [1] 1