The goal of ThreadingExample is to demonstrate the use of threaded C++ code in an R package.
You can install the development version of ThreadingExample from GitHub with:
# install.packages("pak")
pak::pak("SchlossLab/CppThreadingExample")
The basic example below will calculate the sum of 'data' using 4 processors.
library(ThreadingExample)
data <- c(1:100)
calculate_sum(data, 4)