reactablefmtr
reactablefmtr copied to clipboard
Sparkline Examples Don't Work for Me
Hello there,
I'm excited by the prospect of this package. But I can't get the example to run properly,
# Load packages
library(reactablefmtr)
library(tidyverse)
library(palmerpenguins)
df <- penguins %>%
filter(!is.na(sex)) %>%
group_by(species, sex) %>%
summarize(flipper_length = list(flipper_length_mm))
reactable(
df,
columns = list(
species = colDef(maxWidth = 90),
sex = colDef(maxWidth = 85),
flipper_length = colDef(
cell = react_sparkline(df)
)
)
)
Gives me the error Error in loadNamespace(x) : there is no package called ‘dataui’
.
My session info is included:
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] palmerpenguins_0.1.0 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.8 purrr_0.3.4 readr_2.1.2
[7] tidyr_1.2.0 tibble_3.1.6 ggplot2_3.3.6 tidyverse_1.3.1 reactablefmtr_2.1.0 reactable_0.3.0
loaded via a namespace (and not attached):
[1] tidyselect_1.1.2 haven_2.5.0 colorspace_2.0-3 vctrs_0.4.1 generics_0.1.2 htmltools_0.5.2 utf8_1.2.2
[8] rlang_1.0.2 pillar_1.7.0 glue_1.6.2 withr_2.5.0 DBI_1.1.3 dbplyr_2.1.1 modelr_0.1.8
[15] readxl_1.4.0 lifecycle_1.0.1 munsell_0.5.0 gtable_0.3.0 cellranger_1.1.0 rvest_1.0.2 htmlwidgets_1.5.4
[22] tzdb_0.3.0 fastmap_1.1.0 crosstalk_1.2.0 fansi_1.0.3 broom_0.8.0 scales_1.2.0 backports_1.4.1
[29] jsonlite_1.8.0 fs_1.5.2 hms_1.1.1 digest_0.6.29 stringi_1.7.6 grid_4.2.0 cli_3.2.0
[36] tools_4.2.0 magrittr_2.0.3 sass_0.4.1 crayon_1.5.1 pkgconfig_2.0.3 ellipsis_0.3.2 xml2_1.3.3
[43] reprex_2.0.1 lubridate_1.8.0 assertthat_0.2.1 httr_1.4.3 rstudioapi_0.13 R6_2.5.1 compiler_4.2.0
Hi,
It looks like the dev version of reactablefmtr is having trouble installing the dataui package. I'll need to look into a this further for a fix.
In the meantime, you can install the dataui package separately with the code below and then you should be able to get the sparkline examples to work:
remotes::install_github("timelyportfolio/dataui") library(dataui)