Learn R Programming

radiant.data (version 0.6.0)

summary.pivotr: Summary method for pivotr

Description

Summary method for pivotr

Usage

"summary"(object, perc = FALSE, dec = 3, chi2 = FALSE, shiny = FALSE, ...)

Arguments

object
Return value from pivotr
perc
Display numbers as percentages (TRUE or FALSE)
dec
Number of decimals to show
chi2
If TRUE calculate the chi-square statistic for the (pivot) table
shiny
Did the function call originate inside a shiny app
...
further arguments passed to or from other methods

Details

See http://radiant-rstats.github.io/docs/data/pivotr.html for an example in Radiant

See Also

pivotr to create the pivot-table using dplyr

Examples

Run this code
pivotr("diamonds", cvars = "cut") %>% summary(chi2 = TRUE)
pivotr("diamonds", cvars = "cut", tabsort = "-n") %>% summary
pivotr("diamonds", cvars = "cut", tabfilt = "n > 700") %>% summary
pivotr("diamonds", cvars = "cut:clarity", nvar = "price") %>% summary

Run the code above in your browser using DataLab