nhs-r-community / health-inequalities-notebook

Health Inequalities book
https://health-inequalities.nhsrcommunity.com
Creative Commons Zero v1.0 Universal
8 stars 4 forks source link

Remove tidyverse loading message #42

Closed Lextuga007 closed 7 months ago

Lextuga007 commented 10 months ago

Possibly best in the _quarto.yml add message: true as well as echo and eval

https://github.com/nhs-r-community/health-inequalities-notebook/blob/e1f5ca7e39b911d107129926e781ef206b5e0a68/content/imd.qmd#L91

Lextuga007 commented 10 months ago

Can't put the execution code in the _quarto.yml and the IMD particularly needs a lot of the echo and eval removed as not necessary. The default is eval: true and echo: true.

If #| warning: false is put in the first chunk with library(tidyverse) this applies to the rest of the .qmd and doesn't need repeating in the later R chunk.

Lextuga007 commented 7 months ago

| include: false needed in the chunk where library(tidyverse) appears

francisbarton commented 7 months ago

Another way round this would be to identify the particular packages required from the tidyverse and library() them individually. Is the whole tidyverse needed? Or can we do

library(dplyr)
library(purrr)

etc?

Lextuga007 commented 7 months ago

Good point! I used {tidyverse} because it is recognisable to very new users. If this were a package I've recently found https://ropensci.org/blog/2019/12/08/precompute-vignettes/ which could help with showing familiar code but without having to depend upon a series of other packages that it's only the vignette that needs.