Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 579 Bytes

File metadata and controls

24 lines (16 loc) · 579 Bytes

ThreadingExample

The goal of ThreadingExample is to demonstrate the use of threaded C++ code in an R package.

Installation

You can install the development version of ThreadingExample from GitHub with:

# install.packages("pak")
pak::pak("SchlossLab/CppThreadingExample")

Example

The basic example below will calculate the sum of 'data' using 4 processors.

library(ThreadingExample)
data <- c(1:100)
calculate_sum(data, 4)