knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The explore package offers a simplified way to describe data.
describe_tbl()
describes the table (number of rows, columns, ...)describe_all()
returns a description of all variables as data framedescribe()
returns a description of of a specific variable (or a description of all variables if no specific variable is passed to the function)describe_cat()
returns a description of of a specific variable (forcing to handle the variable as categorical)describe_num()
returns a description of of a specific variable (forcing to handle the variable as numerical)We use synthetic data in this example
library(dplyr) library(explore) data <- create_data_buy(obs = 100) glimpse(data)
data %>% describe_tbl()
data %>% describe_all()
data %>% describe_all() %>% filter(unique == 1)
data %>% describe(age)
data %>% describe(buy)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.