elmacartney / EE_stress_MA

MIT License
0 stars 0 forks source link

Faceted figure of all three funnel plots #18

Closed elmacartney closed 3 years ago

elmacartney commented 3 years ago

@itchyshin can you please provide the code on how to make a faceted plot of all three full-models funnel plots to include in the PB section? (i.e., combine base R with patchwork or cowplot)

itchyshin commented 3 years ago

A few things to talk to @elmacartney for a meeting

I will leave some examples for @elmacartney to work on these in the Rmd file

Some markdown tricks to do in the beginning of Chunk

include = FALSE prevents code and results from appearing in the finished file. R Markdown still runs the code in the chunk, and the results can be used by other chunks. echo = FALSE prevents code, but not the results from appearing in the finished file. This is a useful way to embed figures. message = FALSE prevents messages that are generated by code from appearing in the finished file. warning = FALSE prevents warnings that are generated by code from appearing in the finished. eval = FALSE prevents evaluation of code but the code will be included

See more here or see the cheatsheet

https://rmarkdown.rstudio.com/lesson-3.html

Actually these things are done in some chunks but not all chunks so please do it consistently

itchyshin commented 3 years ago

To stop getting messages and warnings you can do this in the very first chunk, that you tell R not to include

```{r setup, include = FALSE}
#kniter seetting
knitr::opts_chunk$set(
message = FALSE,
warning = FALSE, # no warnings
cache = TRUE,# Cacheing to save time when kniting
tidy = TRUE
#fig.width = 9
)

# clearning up
rm(list=ls())
itchyshin commented 3 years ago

Actually, you have done the first two points (so I ticked) - please make sure to do this throughout the RMD file. I have finished doing this facetting - creating the section called Panel for forest plots

We can go through these together at our meeting.