Skip to content

Commit f717713

Browse files
committed
do not roxygenize chunk in vignette
1 parent a781c99 commit f717713

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vignettes/cpp11.Rmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,15 +354,16 @@ This is easy to do in RMarkdown by using `{cpp11}` instead of `{r}` at the begin
354354
It is possible to use `roxygen2` to document your C++ functions. Here is an
355355
example of how to do this:
356356

357-
```{cpp11}
357+
```{cpp11, eval = FALSE}
358358
/* roxygen start
359359
@title Mean of a numeric vector
360360
@param x A numeric vector
361361
@return The mean of the input vector
362362
@examples mean_cpp(1:10)
363363
@export
364364
roxygen end */
365-
[[cpp11::register]] double mean_roxygenised_cpp(doubles x) {
365+
[[cpp11::register]]
366+
double mean_roxygenised_cpp(doubles x) {
366367
int n = x.size();
367368
double total = 0;
368369
for(double value : x) {

0 commit comments

Comments
 (0)