I have a bookdown rmd similar to ...
Further introductory materials are offered when the package is loaded:
```{r dt-startup, echo=-1, message=TRUE, verbose=TRUE, hide=FALSE}
if ("data.table" %in% .packages()) detach("package:data.table")
library(data.table)
```
My intention was to show the reader about the launch of the package. However, they are not printed. Is there another chunk option to use here?
As you can see, I just threw several possible options for a piece on it so that it would not turn out a good result. I am not very familiar with output stream management, so as far as I knew, get away. I also tried calling directly using data.table:::.onAttach()
, but not cubes.
I'm not sure what else to have here, but ...
- Currently the package does not load before this fragment. I just added the first line for reliability in case I reformat the document.
- My before_chapter_script
knitr::opts_chunk$set(comment="#")
. bookdown::render_book
, - bookdown::html_book
.