Learn R Programming

radiant.data (version 0.8.1)

dtab.pivotr: Make a pivot tabel in DT

Description

Make a pivot tabel in DT

Usage

# S3 method for pivotr
dtab(object, format = "none", perc = FALSE, dec = 3,
  searchCols = NULL, order = NULL, pageLength = NULL, ...)

Arguments

object

Return value from pivotr

format

Show Color bar ("color_bar"), Heat map ("heat"), or None ("none")

perc

Display numbers as percentages (TRUE or FALSE)

dec

Number of decimals to show

searchCols

Column search and filter. Used to save and restore state

order

Column sorting. Used to save and restore state

pageLength

Page length. Used to save and restore state

...

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

summary.pivotr to print a plain text table

Examples

Run this code
# NOT RUN {
pivotr("diamonds", cvars = "cut") %>% dtab
pivotr("diamonds", cvars = c("cut","clarity")) %>% dtab(format = "color_bar")
ret <-  pivotr("diamonds", cvars = c("cut","clarity"), normalize = "total") %>%
   dtab(format = "color_bar", perc = TRUE)

# }

Run the code above in your browser using DataLab