Skip to content

Commit cbfd206

Browse files
authored
Merge pull request #42 from RcppCore/feature/rstudio-template-registration
provide metadata for registration of project template with RStudio
2 parents 303a375 + 0119515 commit cbfd206

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

R/skeleton.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ RcppParallel.package.skeleton <- function(name = "anRpackage",
2323
# remove dummy stuff
2424
unlink("data/dummy.Rda")
2525
unlink("man/dummy.Rd")
26+
unlink("Read-and-delete-me")
2627

2728
message("\nAdding RcppParallel settings")
2829

@@ -94,4 +95,4 @@ RcppParallel.package.skeleton <- function(name = "anRpackage",
9495
}
9596

9697
TRUE
97-
}
98+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Binding: RcppParallel.package.skeleton
2+
Title: R Package using RcppParallel
3+
Subtitle: Create a new R Package using RcppParallel
4+
Caption: Create R Package using RcppParallel
5+
OpenFiles: src/vector-sum.cpp
6+
7+
Parameter: example_code
8+
Widget: CheckboxInput
9+
Label: Include an example C++ file using RcppParallel
10+
Default: On

inst/skeleton/vector-sum.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/**
2+
*
3+
* This file contains example code showcasing how RcppParallel
4+
* can be used. In this file, we define and export a function called
5+
* 'parallelVectorSum()', which computes the sum of a numeric vector
6+
* in parallel.
7+
*
8+
* Please see https://rcppcore.github.io/RcppParallel/ for more
9+
* details on how to use RcppParallel in an R package, and the
10+
* Rcpp gallery at http://gallery.rcpp.org/ for more examples.
11+
*
12+
*/
13+
114
// [[Rcpp::depends(RcppParallel)]]
215
#include <Rcpp.h>
316
#include <RcppParallel.h>

0 commit comments

Comments
 (0)