Pregunta

In the link below you'll see the current example for cars with a certain drop-down styling. When I produce this same example I get a different style where the drop down boxes extend the width of the content area. Is there something I need to add to my Rmd to use the style on the website instead?

http://rawgit.com/jimhester/knitrBootstrap/master/vignettes/two-D.html

¿Fue útil?

Solución

You need to use the github version of the knitrBootstrap package in order to use buttons rather than panels. The CRAN version of the package only has panels. The easiest way to install the package from github is with devtools.

install.packages(devtools) library(devtools) install.packages('jimhester/knitrBootstrap') library(knitrBootstrap)

Also note the github version of knitrBootstrap uses the new rmarkdown package, so you generate the report using the rmarkdown::render function.

The default is collapse type in the new version is buttons, but you can specify using panels to toggle with the chunk option bootstrap.panel.\

See https://github.com/jimhester/knitrBootstrap for more details on using the new package and all the options available.

I unfortunately cannot release the current code to CRAN until the rmarkdown package is also released to CRAN, so in the meantime this is the only way to get the new features.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top