var_type | R Documentation |
This function returns the type of a variable as character. It
is similar to pillar::type_sum()
, however, the
return value is not truncated, and var_type()
works
on data frames and within pipe-chains.
var_type(x, ..., abbr = FALSE)
x |
A vector or data frame. |
... |
Optional, unquoted names of variables that should be selected for
further processing. Required, if |
abbr |
Logical, if |
The variable type of x
, as character.
data(efc)
var_type(1)
var_type(1L)
var_type("a")
var_type(efc$e42dep)
var_type(to_factor(efc$e42dep))
library(dplyr)
var_type(efc, contains("cop"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.