get_class: Extracting a class of variables

View source: R/utils.R

get_classR Documentation

Extracting a class of variables

Description

The get_class() gets class of variables in data.frame or tbl_df.

Usage

get_class(df)

Arguments

df

a data.frame or objects inheriting from data.frame

Value

a data.frame Variables of data.frame is as follows.

  • variable : variables name

  • class : class of variables

See Also

find_class.

Examples

# data.frame
get_class(iris)

# tbl_df
get_class(ggplot2::diamonds)

library(dplyr)
ggplot2::diamonds %>%
  get_class() %>% 
  filter(class %in% c("integer", "numeric"))

dlookr documentation built on May 29, 2024, 2 a.m.