Skip to content

Commit 46a3a6b

Browse files
committed
use svg graphics in vignettes and readme to reduce file size, use informative chunk labels
1 parent edb25c3 commit 46a3a6b

File tree

73 files changed

+10148
-137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+10148
-137
lines changed

README.Rmd

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ output: github_document
44

55
<!-- README.md is generated from README.Rmd. Please edit that file -->
66

7-
```{r, echo = FALSE}
7+
```{r knitr, echo = FALSE}
88
knitr::opts_chunk$set(
99
collapse = TRUE,
1010
comment = "#>",
11+
dev = "svglite",
1112
fig.path = "man/figures/README-",
1213
fig.align = 'center'
1314
)
@@ -51,7 +52,7 @@ functions to summarize and visualize results and incomplete data.
5152
## Installation
5253

5354
**JointAI** can be installed from [CRAN](https://cran.r-project.org/):
54-
```{r CRAN-instalation, eval = FALSE}
55+
```{r CRAN-installation, eval = FALSE}
5556
install.packages('JointAI')
5657
```
5758

@@ -104,11 +105,11 @@ data and missing values, export of imputed values and prediction.
104105

105106
## Minimal Example
106107
### Visualize the observed data and missing data pattern
107-
```{r, echo = FALSE}
108+
```{r par, echo = FALSE}
108109
par(mar = c(2.5, 3, 2.5, 1), mgp = c(2, 0.8, 0))
109110
```
110111

111-
```{r, fig.width = 8, fig.height = 4, message = FALSE, collapse=TRUE, dpi = 600}
112+
```{r plotall, fig.width = 8, fig.height = 4, message = FALSE, collapse=TRUE}
112113
library(JointAI)
113114
114115
plot_all(
@@ -121,7 +122,7 @@ plot_all(
121122
```
122123

123124

124-
```{r, fig.height = 5, dpi = 600}
125+
```{r mdpattern, fig.height = 5}
125126
md_pattern(NHANES, color = c('#460E1B', '#D10E3B'))
126127
```
127128

@@ -138,20 +139,20 @@ lm1 <- lm_imp(
138139
```
139140

140141
### Visualize the MCMC sample
141-
```{r fig.width = 8, fig.height = 4, out.width = '100%', dpi = 450}
142+
```{r traceplot, fig.width = 8, fig.height = 4, out.width = '100%'}
142143
traceplot(lm1, col = c('#d4af37', '#460E1B', '#D10E3B'), ncol = 4)
143144
```
144145

145-
```{r fig.width = 8, fig.height = 4, out.width = '100%', dpi = 450}
146+
```{r densplot, fig.width = 8, fig.height = 4, out.width = '100%'}
146147
densplot(lm1, col = c('#d4af37', '#460E1B', '#D10E3B'), ncol = 4, lwd = 2)
147148
```
148149

149150
### Summarize the Result
150-
```{r}
151+
```{r summary}
151152
summary(lm1)
152153
```
153154

154-
```{r}
155+
```{r coef}
155156
coef(lm1)
156157
157158
confint(lm1)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ plot_all(
104104
)
105105
```
106106

107-
<img src="man/figures/README-unnamed-chunk-3-1.png" style="display: block; margin: auto;" />
107+
<img src="man/figures/README-plotall-1.png" alt="" style="display: block; margin: auto;" />
108108

109109
``` r
110110
md_pattern(NHANES, color = c('#460E1B', '#D10E3B'))
111111
```
112112

113-
<img src="man/figures/README-unnamed-chunk-4-1.png" style="display: block; margin: auto;" />
113+
<img src="man/figures/README-mdpattern-1.png" alt="" style="display: block; margin: auto;" />
114114

115115
### Fit a linear regression model with incomplete covariates
116116

@@ -130,13 +130,13 @@ lm1 <- lm_imp(
130130
traceplot(lm1, col = c('#d4af37', '#460E1B', '#D10E3B'), ncol = 4)
131131
```
132132

133-
<img src="man/figures/README-unnamed-chunk-5-1.png" width="100%" style="display: block; margin: auto;" />
133+
<img src="man/figures/README-traceplot-1.png" alt="" width="100%" style="display: block; margin: auto;" />
134134

135135
``` r
136136
densplot(lm1, col = c('#d4af37', '#460E1B', '#D10E3B'), ncol = 4, lwd = 2)
137137
```
138138

139-
<img src="man/figures/README-unnamed-chunk-6-1.png" width="100%" style="display: block; margin: auto;" />
139+
<img src="man/figures/README-densplot-1.png" alt="" width="100%" style="display: block; margin: auto;" />
140140

141141
### Summarize the Result
142142

man/figures/README-densplot-1.svg

Lines changed: 390 additions & 0 deletions
Loading

man/figures/README-mdpattern-1.svg

Lines changed: 242 additions & 0 deletions
Loading

man/figures/README-plotall-1.svg

Lines changed: 498 additions & 0 deletions
Loading

man/figures/README-traceplot-1.svg

Lines changed: 410 additions & 0 deletions
Loading
-413 KB
Binary file not shown.
-394 KB
Binary file not shown.
-2.17 MB
Binary file not shown.
-607 KB
Binary file not shown.

0 commit comments

Comments
 (0)