We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a781c99 commit f717713Copy full SHA for f717713
vignettes/cpp11.Rmd
@@ -354,15 +354,16 @@ This is easy to do in RMarkdown by using `{cpp11}` instead of `{r}` at the begin
354
It is possible to use `roxygen2` to document your C++ functions. Here is an
355
example of how to do this:
356
357
-```{cpp11}
+```{cpp11, eval = FALSE}
358
/* roxygen start
359
@title Mean of a numeric vector
360
@param x A numeric vector
361
@return The mean of the input vector
362
@examples mean_cpp(1:10)
363
@export
364
roxygen end */
365
-[[cpp11::register]] double mean_roxygenised_cpp(doubles x) {
+[[cpp11::register]]
366
+double mean_roxygenised_cpp(doubles x) {
367
int n = x.size();
368
double total = 0;
369
for(double value : x) {
0 commit comments