Problem using toc in rmarkdown file in a shiny application

255 views
Skip to first unread message

Familie Gieshoff

unread,
Dec 4, 2016, 1:25:38 AM12/4/16
to Shiny - Web Framework for R
Dear all,

I am struggling with a problem using the toc function in a rmarkdown file used in shiny.

The file is attached....
Knitting the file in RStudio the floating TOC is displayed. Using the same file in a shiny app through

includeMarkdown("./www/changelog2.Rmd")

the table of content is not shown. (Even if you delete toc_float in the YAML header, the table of content is not shown).

Have I missed something?

Thank you very much in advance.

Jürgen



PS:

rmarkdown version: 1.0 / 1.2 (both versions do have the same issue.)

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

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

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

other attached packages:
 [1] corrplot_0.77        reshape2_1.4.1       ggplot2_2.1.0        tidyr_0.6.0          dplyr_0.5.0         
 [6] xlsx_0.5.7           xlsxjars_0.6.1       DT_0.2               rmarkdown_1.2        shinydashboard_0.5.1
[11] shinyBS_0.61         shiny_0.14           RJDBC_0.2-5          rJava_0.9-8          RMySQL_0.10.9       
[16] DBI_0.5             

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.6      knitr_1.14       magrittr_1.5     munsell_0.4.3    colorspace_1.2-6 xtable_1.8-2    
 [7] R6_2.1.2         plyr_1.8.4       stringr_1.0.0    tools_3.3.1      grid_3.3.1       gtable_0.2.0    
[13] htmltools_0.3.5  yaml_2.1.13      assertthat_0.1   digest_0.6.10    rprojroot_1.1    tibble_1.2      
[19] htmlwidgets_0.7  evaluate_0.9     mime_0.5         stringi_1.1.1    scales_0.4.0     backports_1.0.4 
[25] jsonlite_1.0     markdown_0.7.7   httpuv_1.3.3 
changelog2.rmd

Familie Gieshoff

unread,
Dec 5, 2016, 3:35:24 AM12/5/16
to Shiny - Web Framework for R
Dear all,

I have found an alternative way to get to the desired result (and it is so easy...)

In my sidebar (shinydashboard) I added
menuItem ("Help", href = "helpfile.html",newtab = TRUE, icon = icon("question"))


The link opens the html file generated from the knitting process in a new tab. It works really nicely.

Best regards,
Jürgen

 
Reply all
Reply to author
Forward
0 new messages