Skip to content

Commit 34e020c

Browse files
committed
Final check on travis.
1 parent f669a5c commit 34e020c

9 files changed

+41
-12
lines changed

DESCRIPTION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ RoxygenNote: 6.0.1
3131
Suggests: knitr,
3232
rmarkdown,
3333
testthat,
34+
devtools,
35+
roxygen2,
3436
inline,
3537
microbenchmark
3638
VignetteBuilder: knitr

cran-comments.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
0 errors | 0 warnings | 0 notes
44

5+
## Test environments
6+
- local OS X install, R 3.3.3
7+
- ubuntu 12.04 (on travis-ci), R 3.3.3
8+
- win-builder (devel and release)
9+
510
## Downstream dependencies
611

712
I have also run R CMD on downstream dependencies of rust.

inst/doc/rust-using-rcpp-vignette.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
## ---- include = FALSE----------------------------------------------------
22
knitr::opts_chunk$set(comment = "#>", collapse = TRUE)
33

4+
## ----setup, include=FALSE------------------------------------------------
5+
devtools::document()
6+
47
## ------------------------------------------------------------------------
58
library(rust)
69
library(Rcpp)

inst/doc/rust-using-rcpp-vignette.Rmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ in order that they can create an external pointer for `new_name` using `create_x
9090

9191
All the examples in the documentation for `ru` are replicated in the documentation for `ru_rcpp`. Here we consider a subset of the examples from the [Introducing rust](rust-vignette.html) vignette, to illustrate how to provide user-supplied C++ functions to `ru_rcpp` and to compare the performances of `ru` and `ru_rcpp`.
9292

93+
```{r setup, include=FALSE}
94+
devtools::document()
95+
```
96+
9397
```{r}
9498
library(rust)
9599
library(Rcpp)

inst/doc/rust-using-rcpp-vignette.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ <h3>Standard normal density</h3>
200200
)
201201
<span class="kw">print</span>(res, <span class="dt">signif =</span> <span class="dv">4</span>)
202202
<span class="co">#&gt; Unit: milliseconds</span>
203-
<span class="co">#&gt; expr min lq mean median uq max neval</span>
204-
<span class="co">#&gt; old 32.520 33.740 36.374008 34.950 39.080 58.950 100</span>
205-
<span class="co">#&gt; new 2.375 2.539 2.798837 2.707 2.841 8.223 100</span></code></pre></div>
203+
<span class="co">#&gt; expr min lq mean median uq max neval</span>
204+
<span class="co">#&gt; old 31.990 33.470 37.498158 34.09 38.110 174.900 100</span>
205+
<span class="co">#&gt; new 2.442 2.576 2.740526 2.70 2.763 7.146 100</span></code></pre></div>
206206
<p>As we would hope, <code>ru_rcpp</code> is faster than <code>ru</code>. If we start from the same random number seed we get the same simulated values from <code>ru</code> and <code>ru_rcpp</code>.</p>
207207
</div>
208208
<div id="mvn" class="section level3">
@@ -241,9 +241,9 @@ <h3>Multivariate normal density</h3>
241241
)
242242
<span class="kw">print</span>(res, <span class="dt">signif =</span> <span class="dv">4</span>)
243243
<span class="co">#&gt; Unit: milliseconds</span>
244-
<span class="co">#&gt; expr min lq mean median uq max neval</span>
245-
<span class="co">#&gt; old 231.400 242.500 249.704727 247.300 251.900 378.2 100</span>
246-
<span class="co">#&gt; new 8.932 9.182 9.800889 9.368 9.609 15.2 100</span></code></pre></div>
244+
<span class="co">#&gt; expr min lq mean median uq max neval</span>
245+
<span class="co">#&gt; old 230.000 245.800 261.369274 253.200 264.50 403.20 100</span>
246+
<span class="co">#&gt; new 8.987 9.395 9.944666 9.615 10.13 15.41 100</span></code></pre></div>
247247
<p>Again, the improvement in speed obtained using Rcpp is clear.</p>
248248
</div>
249249
<div id="log-normal-density-after-box-cox-transformation" class="section level3">
@@ -270,8 +270,8 @@ <h3>Log-normal density after Box-Cox transformation</h3>
270270
<span class="kw">print</span>(res, <span class="dt">signif =</span> <span class="dv">4</span>)
271271
<span class="co">#&gt; Unit: milliseconds</span>
272272
<span class="co">#&gt; expr min lq mean median uq max neval</span>
273-
<span class="co">#&gt; old 47.940 55.650 58.814465 56.830 59.860 201.0 100</span>
274-
<span class="co">#&gt; new 5.016 5.215 6.439541 5.321 5.473 75.5 100</span></code></pre></div>
273+
<span class="co">#&gt; old 48.490 56.360 59.290428 58.060 61.430 72.30 100</span>
274+
<span class="co">#&gt; new 5.048 5.314 6.414968 5.473 5.715 74.53 100</span></code></pre></div>
275275
</div>
276276
<div id="generalized-pareto-posterior-density" class="section level3">
277277
<h3>Generalized Pareto posterior density</h3>
@@ -333,8 +333,8 @@ <h3>Generalized Pareto posterior density</h3>
333333
<span class="kw">print</span>(res, <span class="dt">signif =</span> <span class="dv">4</span>)
334334
<span class="co">#&gt; Unit: milliseconds</span>
335335
<span class="co">#&gt; expr min lq mean median uq max neval</span>
336-
<span class="co">#&gt; old 145.10 152.40 156.74784 154.60 157.70 284.60 100</span>
337-
<span class="co">#&gt; new 18.36 19.38 20.57036 19.55 20.16 27.68 100</span></code></pre></div>
336+
<span class="co">#&gt; old 145.30 152.60 160.47946 155.40 164.00 287.60 100</span>
337+
<span class="co">#&gt; new 18.53 19.38 21.19399 19.83 22.47 29.62 100</span></code></pre></div>
338338
</div>
339339
</div>
340340
<div id="examples-find_lambda_rcpp_one_d-and-find_lambda_rcpp" class="section level2">
@@ -400,10 +400,10 @@ <h3>Generalized Pareto posterior density: example for <code>find_lambda</code></
400400
<span class="co">#&gt; 0.12670792 0.02477219 </span>
401401
<span class="co">#&gt; </span>
402402
<span class="co">#&gt; $phi_to_theta</span>
403-
<span class="co">#&gt; &lt;pointer: 0x0000000011ee4c40&gt;</span>
403+
<span class="co">#&gt; &lt;pointer: 0x0000000011aa1900&gt;</span>
404404
<span class="co">#&gt; </span>
405405
<span class="co">#&gt; $log_j</span>
406-
<span class="co">#&gt; &lt;pointer: 0x0000000011ee4e90&gt;</span>
406+
<span class="co">#&gt; &lt;pointer: 0x0000000011aa1970&gt;</span>
407407
<span class="co">#&gt; </span>
408408
<span class="co">#&gt; $user_args</span>
409409
<span class="co">#&gt; $user_args$xm</span>

inst/doc/rust-vignette.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ pa <- matrix(pa, ncol = length(d), nrow = 1)
88
colnames(pa) <- d
99
knitr::kable(round(pa,3), caption = "$p_a(d, 1/2)$ as $d$ varies.")
1010

11+
## ----setup, include=FALSE------------------------------------------------
12+
devtools::load_all()
13+
1114
## ------------------------------------------------------------------------
1215
library(rust)
1316
set.seed(46)

inst/doc/rust-vignette.Rmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ For a review of Bayesian extreme value modelling see @Stephenson2016 and for an
105105

106106
We simulate some data from a GP(1, -1/2) distribution. We choose $\xi=-1/2$ because this tends to result in a posterior distribution with strong negative posterior association between $\sigma$ and $\xi$, making the benefit of transformation more apparent. We also calculate some sample properties that feature in the likelihood, so that they can be passed to the log-density `logf` rather than being recalculated, and set an initial estimate at which `logf` is positive.
107107

108+
```{r setup, include=FALSE}
109+
devtools::load_all()
110+
```
111+
108112
```{r}
109113
library(rust)
110114
set.seed(46)

vignettes/rust-using-rcpp-vignette.Rmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ in order that they can create an external pointer for `new_name` using `create_x
9090

9191
All the examples in the documentation for `ru` are replicated in the documentation for `ru_rcpp`. Here we consider a subset of the examples from the [Introducing rust](rust-vignette.html) vignette, to illustrate how to provide user-supplied C++ functions to `ru_rcpp` and to compare the performances of `ru` and `ru_rcpp`.
9292

93+
```{r setup, include=FALSE}
94+
devtools::document()
95+
```
96+
9397
```{r}
9498
library(rust)
9599
library(Rcpp)

vignettes/rust-vignette.Rmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ For a review of Bayesian extreme value modelling see @Stephenson2016 and for an
105105

106106
We simulate some data from a GP(1, -1/2) distribution. We choose $\xi=-1/2$ because this tends to result in a posterior distribution with strong negative posterior association between $\sigma$ and $\xi$, making the benefit of transformation more apparent. We also calculate some sample properties that feature in the likelihood, so that they can be passed to the log-density `logf` rather than being recalculated, and set an initial estimate at which `logf` is positive.
107107

108+
```{r setup, include=FALSE}
109+
devtools::load_all()
110+
```
111+
108112
```{r}
109113
library(rust)
110114
set.seed(46)

0 commit comments

Comments
 (0)