summary.univar_category {dlookr}R Documentation

Summarizing univar_category information

Description

print and summary method for "univar_category" class.

Usage

## S3 method for class 'univar_category'
summary(object, na.rm = TRUE, ...)

## S3 method for class 'univar_category'
print(x, ...)

Arguments

object

an object of class "univar_category", usually, a result of a call to univar_category().

na.rm

logical. Specifies whether to include NA when performing a chi-square test. The default is TRUE, where NA is removed and aggregated.

...

further arguments passed to or from other methods.

x

an object of class "univar_category", usually, a result of a call to univar_category().

Details

print.univar_category() displays only the information of variables included in univar_category. The "variables" attribute is not displayed.

Value

An object of the class as individual variables based list. The information to examine the relationship between categorical variables is as follows each components.

See Also

plot.univar_category.

Examples


library(dplyr)

# Calculates the all categorical variables
all_var <- univar_category(heartfailure)

# Print univar_category class object
all_var

# Calculates the only smoking variable
all_var %>% 
  "["(names(all_var) %in% "smoking")

smoking <- univar_category(heartfailure, smoking)

# Print univar_category class object
smoking

# Filtering the case of smoking included NA 
smoking %>%
  "[["(1) %>% 
  filter(!is.na(smoking))

# Summary the all case : Return a invisible copy of an object.
stat <- summary(all_var)

# Summary by returned object
stat



[Package dlookr version 0.6.3 Index]