Skip to content

Commit 78799b9

Browse files
nicer vignette layout
1 parent fb13f1f commit 78799b9

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
^cran-comments\.md$
55
^revdep$
66
^\.github$
7+
^doc$
8+
^Meta$

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ doc/*
1313
Meta/*
1414
/doc/
1515
inst/doc
16+
/Meta/

vignettes/BayesVolcano.Rmd

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ knitr::opts_chunk$set(
2020
# Data requirements
2121

2222
BayesVolcano requires as input:
23-
- posteriors of a Bayesian model fit stored in a data frame, where columns are parameters and rows are iterations. A wrapper function to extract the posterior exists for fits generated by [rstan](https://mc-stan.org/rstan) or [brms](https://paulbuerkner.com/brms) with the helper function extract_fit.R
23+
24+
- posteriors of a Bayesian model fit stored in a data frame, where columns are parameters and rows are iterations. A wrapper function to extract the posterior exists for fits generated by [rstan](https://mc-stan.org/rstan) or [brms](https://paulbuerkner.com/brms) with the helper function extract_fit().
25+
The usage of extract_fit() requires installation of rstan or brms.
2426

2527
```{r setup}
2628
library(BayesVolcano)
@@ -96,7 +98,7 @@ the user.
9698

9799
The simplest version is:
98100

99-
```{r}
101+
```{r,fig.width=7,fig.height=6}
100102
plot_volcano(results)
101103
```
102104

@@ -105,15 +107,15 @@ set threshold for pi is displayed as vertical black line and described in the
105107
subtitle.
106108

107109
Titles and x-axis labels can be set with:
108-
```{r}
110+
```{r,fig.width=7,fig.height=6}
109111
plot_volcano(results,
110112
title = "My amazing plot",
111113
xlab = "My informative parameter")
112114
```
113115

114116

115117
To add the set CrI use:
116-
```{r}
118+
```{r,fig.width=7,fig.height=6}
117119
plot_volcano(results,
118120
CrI = TRUE)
119121
```
@@ -124,7 +126,7 @@ to the subtitle.
124126
To color code the points the user can choose a character of numerical column
125127
from the annotation_df
126128

127-
```{r}
129+
```{r,fig.width=7,fig.height=6}
128130
plot_volcano(results,
129131
CrI = FALSE,
130132
color = "group")
@@ -137,13 +139,13 @@ plot_volcano(results,
137139
To add labels the [ggrepel](https://cran.r-project.org/web/packages/ggrepel/vignettes/ggrepel.html)
138140
is employed:
139141

140-
```{r}
142+
```{r,fig.width=7,fig.height=6}
141143
plot_volcano(results, label = "label")
142144
```
143145

144146
To only display labels above thresholds for the parameter value and pi set:
145147

146-
```{r}
148+
```{r,fig.width=7,fig.height=6}
147149
plot_volcano(results,
148150
label = "label",
149151
label.parameter.threshold = 1.5,
@@ -153,7 +155,7 @@ plot_volcano(results,
153155
Grey lines are added to visualize the threshold and a subtitle is added.
154156

155157
Of course color and labels can be combined:
156-
```{r}
158+
```{r,fig.width=7,fig.height=6}
157159
plot_volcano(results,
158160
color = "group",
159161
label = "label",

0 commit comments

Comments
 (0)