我发现当我使用includeHTML包含一个从Rmarkdown文件生成的HTML文档,并在同一个R Shiny应用程序中使用DT :: dataTableOutput / renderDataTable时,我收到一个JavaScript错误“Uncaught TypeError:无法读取属性'过滤器'未定义“来自Shiny JS代码。我发现在Shiny版本0.13.0和0.14.1中会出现此错误。
R-3.1.2> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] DT_0.2 shiny_0.13.0
loaded via a namespace (and not attached):
[1] digest_0.6.8 htmltools_0.3.5 htmlwidgets_0.7 httpuv_1.3.3 magrittr_1.5 mime_0.3 R6_2.1.0 Rcpp_0.12.3
[9] tools_3.1.2 xtable_1.7-4 yaml_2.1.13`
我创建了一个R Shiny应用程序,在https://github.com/CliffordWollam/shiny_rmd_error的GitHub中演示了这一点。