Skip to content

Instantly share code, notes, and snippets.

@DATAUNIRIO
Last active July 10, 2021 17:56
Show Gist options
  • Save DATAUNIRIO/fe6a9f3595119bb3b58b7ee787eb82cf to your computer and use it in GitHub Desktop.
Save DATAUNIRIO/fe6a9f3595119bb3b58b7ee787eb82cf to your computer and use it in GitHub Desktop.
funcionamento do reactable e flextable
# -----------------------------------------------------------------------
# reactable
# -----------------------------------------------------------------------
library(reactable)
library(reactablefmtr)
library(dplyr)
library(flextable)
#library(sparkline)
# reactable do data.frame
reactable(mtcars)
# flextable do data.frame
flextable(mtcars)
# reactable do AM
mtcars %>% pull(am) %>% table() %>% prop.table()%>% data.frame() %>% reactable()
# MPG grouped por AM
mtcars %>% select(mpg,am) %>%
reactable(
groupBy = "am",
defaultColDef = colDef(
aggregate = "sum"
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment