hafen / trelliscopejs

TrelliscopeJS R Package
https://hafen.github.io/trelliscopejs
Other
262 stars 36 forks source link

Can't embed trelliscope to a rmarkdown #108

Open Valanis21 opened 3 years ago

Valanis21 commented 3 years ago

I can't embed a trelliscope to a markdown, it appears only a space in blank (I am using the pokemon example for practice) The code is the following:

title: "Pokemon" author: "Victor Alanis" date: "22/1/2021" output: html_document: self_contained: no

knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(message = FALSE, warning = FALSE) #suppress ggplot2 warnings
library(trelliscopejs)
library(dplyr)
library(ggplot2)
library(tidyr)
library(rbokeh)

pok <-
  read.csv("https://raw.githubusercontent.com/hafen/pokRdex/master/pokRdex_mod.csv") %>%
  mutate_at(vars(matches("_id$")), as.character)

pok %>%
  mutate(panel = img_panel(url_image)) %>%
  trelliscope("pokemon", nrow = 3, ncol = 6,
              state = list(labels = c("pokemon", "pokedex","id"),sort=list(pokemon="asc")),path="Pokemon",self_contained=TRUE)

And the output is the following

image

This is my session info : R version 4.0.3 (2020-10-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale: [1] LC_COLLATE=Spanish_Mexico.1252 LC_CTYPE=Spanish_Mexico.1252 LC_MONETARY=Spanish_Mexico.1252 [4] LC_NUMERIC=C LC_TIME=Spanish_Mexico.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] Rcpp_1.0.5 pillar_1.4.7 compiler_4.0.3 pryr_0.1.4 tools_4.0.3 digest_0.6.27
[7] jsonlite_1.7.1 evaluate_0.14 lifecycle_0.2.0 tibble_3.0.4 lattice_0.20-41 pkgconfig_2.0.3
[13] rlang_0.4.9 rbokeh_0.5.1 rstudioapi_0.13 yaml_2.2.1 crul_1.0.0 curl_4.3
[19] hexbin_1.28.1 xfun_0.19 dplyr_1.0.2 httr_1.4.2 stringr_1.4.0 knitr_1.30
[25] generics_0.1.0 vctrs_0.3.5 htmlwidgets_1.5.2 maps_3.3.0 grid_4.0.3 tidyselect_1.1.0 [31] glue_1.4.2 httpcode_0.3.0 R6_2.5.0 rmarkdown_2.5 purrr_0.3.4 gistr_0.9.0
[37] magrittr_2.0.1 scales_1.1.1 codetools_0.2-16 ellipsis_0.3.1 htmltools_0.5.0 rsconnect_0.8.16 [43] assertthat_0.2.1 colorspace_2.0-0 stringi_1.5.3 munsell_0.5.0 lazyeval_0.2.2 crayon_1.3.4