diff --git a/.Rbuildignore b/.Rbuildignore index b1c4abb..0801880 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -16,3 +16,6 @@ ^CRAN-RELEASE$ ^test_ANOVA\.R$ ^compare_anova_script\.csv$ +^revdep$ +^lastMiKTeXException$ +^CRAN-SUBMISSION$ diff --git a/DESCRIPTION b/DESCRIPTION index e65b69a..76362d2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,14 +18,12 @@ Authors@R: comment = c(ORCID = "0000-0001-7248-0662")) ) Maintainer: Meike Steinhilber -Description: - It is a toolbox for Sequential Probability Ratio Tests (SPRT), Wald (1945) . +Description: It is a toolbox for Sequential Probability Ratio Tests (SPRT), Wald (1945) . SPRTs are applied to the data during the sampling process, ideally after each observation. At any stage, the test will return a decision to either continue sampling or terminate and accept one of the specified hypotheses. - The seq_ttest() function performs sequential t tests developed by Rushton (1950) , Rushton (1952) and Hajnal (1961) , based on the SPRT. - Specifically, seq_ttest() performs one-sample, two-sample, and paired t tests for testing one- and two-sided hypotheses. - For more information on the SPRT t test, see Schnuerch & Erdfelder (2019) . - The seq_anova() function allows to perform a sequential one-way fixed effects ANOVA (see Steinhilber et al. (2023) <> ). + The seq_ttest() function performs one-sample, two-sample, and paired t-tests for testing one- and two-sided hypotheses (Schnuerch & Erdfelder (2019) ). + The seq_anova() function allows to perform a sequential one-way fixed effects ANOVA (Steinhilber et al. (2023) ). + Learn more about the package by using vignettes "browseVignettes(package = "sprtt")" or go to the website . License: AGPL (>= 3) URL: https://meikesteinhilber.github.io/sprtt/ BugReports: https://github.com/MeikeSteinhilber/sprtt/issues diff --git a/R/calc_plot_sprt.R b/R/calc_plot_sprt.R index bcd8fc1..2e54920 100644 --- a/R/calc_plot_sprt.R +++ b/R/calc_plot_sprt.R @@ -19,11 +19,17 @@ calc_plot_anova <- function(seq_anova_arguments, seq_steps) { stop("wrong input for seq_steps argument.") } - lr_log <- double(length(seq_steps)) sample_size <- double(length(seq_steps)) i = 1 + k_groups_start <- table(seq_anova_arguments@data[1:seq_steps[1], 2]) + + if (any(k_groups_start < 2)) { + stop("The first 2*k_groups data points are not balanced. Every group needs two data points. + Solution: Use the argument 'plot' to define a customized vector with the sample size steps in the seq_anova() function") + } + for (position in seq_steps) { temp_arguments@data <- seq_anova_arguments@data[1:position, ] temp_arguments@total_sample_size <- position diff --git a/R/draw_sample_mixture.R b/R/draw_sample_mixture.R index 93a74ef..1ff28b6 100644 --- a/R/draw_sample_mixture.R +++ b/R/draw_sample_mixture.R @@ -17,7 +17,8 @@ rnorm_mix <- function(n, mu1, sig1, mu2, sig2, gamma) { #' @param f Cohen's f. The simulated effect size. #' @param max_n sample size for the groups (total sample size = max_n*k_groups) #' @param counter_n number of times the function tries to find a possible parameter combination for the distribution. Default value is set to 100. -#' @param verbose `TRUE` or `FALSE.` Print out more information about the internal process of sampling the parameters. +#' @param verbose `TRUE` or `FALSE.` Print out more information about the internal process of sampling the parameters +#' (the internal counter that was reached, some additional hints and the drawn parameters for the Gaussian Mixture distributions.) #' #' @return returns a data.frame with the columns y (observations) and x (factor_A). #' diff --git a/R/plot_sprt.R b/R/plot_sprt.R index de3a7b8..9b7aa80 100644 --- a/R/plot_sprt.R +++ b/R/plot_sprt.R @@ -11,9 +11,10 @@ # #' @param B_boundary_log Log of the B boundary. #' @param anova_results result object of the seq_anova() function (argument must be of class `seq_anova_results`). #' @param labels show labels in the plot. -#' @param position_labels_x position of the boundary labels on the x-axis. -#' @param position_labels_y position of the boundary labels on the y-axis. -#' @param position_lr_x scales the position of the LR label on the x-axis. +#' @param position_labels_x position of the boundary labels on the x-axis. 0 positions the center on the 0 of the x-axis. +#' @param position_labels_y position of the boundary labels on the y-axis. 0 positions the labels on the dotted lines. +#' @param position_lr_x scales the position of the LR label on the x-axis. 0 positions the label directly under the last calculated LR. +#' @param position_lr_y scales the position of the LR label on the x-axis. 0 positions the label on the 0 of the y-axis #' @param font_size font size of the plot. #' @param line_size line size of the plot. #' @param highlight_color highlighting color, default is "#CD2626" (red). @@ -30,6 +31,7 @@ plot_anova <- function(anova_results, position_labels_x = 0.15, position_labels_y = 0.075, position_lr_x = 0.05, + position_lr_y = NULL, font_size = 25, line_size = 1.5, highlight_color = "#CD2626" @@ -42,6 +44,10 @@ plot_anova <- function(anova_results, stop("anova_results argument must be of class seq_anova_results.") } + if (is.null(anova_results@plot)) { + stop("The anova_results@plot is NULL. Solution: The function argument `plot` must be set to TRUE in the seq_anova() function.") + } + A_boundary_log <- anova_results@plot$A_boundary_log B_boundary_log <- anova_results@plot$B_boundary_log @@ -106,11 +112,13 @@ plot_anova <- function(anova_results, if (labels == TRUE) { LR <- round(exp(results$lr_log[N_steps]), 2) nLR <- results$sample_size[N_steps] - if (results$lr_log[N_steps]>0) {y_ = -0.5} else{y_ = 0.5} + if (is.null(position_lr_y)) { + if (results$lr_log[N_steps]>0) {position_lr_y = -0.5} else{position_lr_y = 0.5} + } plot <- plot + annotate(geom = "text", x = results$sample_size[N_steps] + results$sample_size[N_steps]*position_lr_x, - y = y_, + y = position_lr_y, label = glue("LR[{nLR}] ==~ {LR}"), parse = TRUE, size = font_size/.pt, color = highlight_color) diff --git a/R/seq_anova.R b/R/seq_anova.R index 18cfa9c..4f843a7 100644 --- a/R/seq_anova.R +++ b/R/seq_anova.R @@ -11,7 +11,7 @@ #' `r lifecycle::badge("experimental")` #' #' Performs a sequential one-way fixed effects ANOVA, see Steinhilber et al. (2023) -#' for more information. +#' for more information. The repeated measurement ANOVA is not implemented yet in this function. For more information check out the vignette `vignette("one_way_anova", package = "sprtt")` #' #' @param formula A formula specifying the model. #' @param data A data frame in which the variables specified in the formula will be found. @@ -30,6 +30,7 @@ #' If the data do not fit to this, you have to specify the sequential steps yourself in this argument. #' `balanced` specifies that the step size is equal to the number of groups. #' Attention: the calculation starts at the number of groups times two. +#' If the data do not fit to this, you have to specify the sequential steps yourself in this argument. #' #'@return An object of the S4 class [`seq_anova_results-class`]. Click on the #' class link to see the full description of the slots. diff --git a/README.Rmd b/README.Rmd index 45611da..c7de024 100644 --- a/README.Rmd +++ b/README.Rmd @@ -5,7 +5,7 @@ editor_options: mode: gfm --- - + ```{r setup, include=FALSE} knitr::opts_chunk$set( @@ -25,7 +25,7 @@ options(tibble.print_min = 5, tibble.print_max = 5) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/sprtt?color=green)](https://cran.r-project.org/package=sprtt) [![total](https://cranlogs.r-pkg.org/badges/grand-total/sprtt)](https://cran.r-project.org/package=sprtt) [![monthly](https://cranlogs.r-pkg.org/badges/sprtt)](https://cran.r-project.org/package=sprtt) -[![codecov](https://codecov.io/gh/MeikeSteinhilber/sprtt/branch/main/graph/badge.svg?token=IQHTDTRBAW)](https://codecov.io/gh/MeikeSteinhilber/sprtt) [![pkgdown](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/pkgdown-pak.yaml/badge.svg)](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/pkgdown-pak.yaml) [![R-CMD-check](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/R-CMD-check-windows-macOs.yaml/badge.svg)](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/R-CMD-check-windows-macOs.yaml) +[![codecov](https://codecov.io/gh/MeikeSteinhilber/sprtt/branch/main/graph/badge.svg?token=IQHTDTRBAW)](https://app.codecov.io/gh/MeikeSteinhilber/sprtt) [![pkgdown](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/pkgdown-pak.yaml/badge.svg)](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/pkgdown-pak.yaml) [![R-CMD-check](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/R-CMD-check-windows-macOs.yaml/badge.svg)](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/R-CMD-check-windows-macOs.yaml) @@ -84,6 +84,13 @@ Short examples can be found in the following paragraph. > > `#> results of function()`: is console output -```{r, code=xfun::read_utf8('inst/examples/seq_ttest.R')} + +```{r, code=xfun::read_utf8('inst/examples/sprtt_examples.R')} ``` diff --git a/README.md b/README.md index 6203f55..ceea948 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ - + # sprtt @@ -8,7 +8,7 @@ [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/sprtt?color=green)](https://cran.r-project.org/package=sprtt) [![total](https://cranlogs.r-pkg.org/badges/grand-total/sprtt)](https://cran.r-project.org/package=sprtt) [![monthly](https://cranlogs.r-pkg.org/badges/sprtt)](https://cran.r-project.org/package=sprtt) -[![codecov](https://codecov.io/gh/MeikeSteinhilber/sprtt/branch/main/graph/badge.svg?token=IQHTDTRBAW)](https://codecov.io/gh/MeikeSteinhilber/sprtt) +[![codecov](https://codecov.io/gh/MeikeSteinhilber/sprtt/branch/main/graph/badge.svg?token=IQHTDTRBAW)](https://app.codecov.io/gh/MeikeSteinhilber/sprtt) [![pkgdown](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/pkgdown-pak.yaml/badge.svg)](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/pkgdown-pak.yaml) [![R-CMD-check](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/R-CMD-check-windows-macOs.yaml/badge.svg)](https://github.com/MeikeSteinhilber/sprtt/actions/workflows/R-CMD-check-windows-macOs.yaml) @@ -79,6 +79,12 @@ Short examples can be found in the following paragraph. > > `#> results of function()`: is console output + + ``` r # set seed -------------------------------------------------------------------- set.seed(333) @@ -86,6 +92,7 @@ set.seed(333) # load library ---------------------------------------------------------------- library(sprtt) +# t-TEST ---------------------------------------------------------------------- # one sample: numeric input --------------------------------------------------- treatment_group <- rnorm(20, mean = 0, sd = 1) results <- seq_ttest(treatment_group, mu = 1, d = 0.8) @@ -99,93 +106,42 @@ results@likelihood_ratio results["likelihood_ratio"] #> [1] 965.0728 -# two sample: numeric input---------------------------------------------------- -treatment_group <- stats::rnorm(20, mean = 0, sd = 1) -control_group <- stats::rnorm(20, mean = 1, sd = 1) -seq_ttest(treatment_group, control_group, d = 0.8) -#> -#> ***** Sequential Two Sample t-test ***** -#> -#> formula: treatment_group and control_group -#> test statistic: -#> log-likelihood ratio = 5.347, decision = accept H1 -#> SPRT thresholds: -#> lower log(B) = -2.944, upper log(A) = 2.944 -#> Log-Likelihood of the: -#> alternative hypothesis = -4.211 -#> null hypothesis = -9.558 -#> alternative hypothesis: true difference in means is not equal to 0. -#> specified effect size: Cohen's d = 0.8 -#> degrees of freedom: df = 38 -#> sample estimates: -#> mean of x mean of y -#> -0.05204 1.18768 -#> *Note: to get access to the object of the results use the @ or [] instead of the $ operator. - -# two sample: formula input --------------------------------------------------- -stress_level <- stats::rnorm(20, mean = 0, sd = 1) -sex <- as.factor(c(rep(1, 10), rep(2, 10))) -seq_ttest(stress_level ~ sex, d = 0.8) -#> -#> ***** Sequential Two Sample t-test ***** -#> -#> formula: stress_level ~ sex -#> test statistic: -#> log-likelihood ratio = -1.455, decision = continue sampling -#> SPRT thresholds: -#> lower log(B) = -2.944, upper log(A) = 2.944 -#> Log-Likelihood of the: -#> alternative hypothesis = -1.233 -#> null hypothesis = 0.222 -#> alternative hypothesis: true difference in means is not equal to 0. -#> specified effect size: Cohen's d = 0.8 -#> degrees of freedom: df = 18 -#> sample estimates: -#> mean of x mean of y -#> -0.23286 -0.08217 -#> *Note: to get access to the object of the results use the @ or [] instead of the $ operator. - -# NA in the data -------------------------------------------------------------- -stress_level <- c(NA, stats::rnorm(20, mean = 0, sd = 2), NA) -sex <- as.factor(c(rep(1, 11), rep(2, 11))) -seq_ttest(stress_level ~ sex, d = 0.8, na.rm = TRUE) +# ANOVA ----------------------------------------------------------------------- +# simulate data --------------------------------------------------------------- +set.seed(333) +data <- sprtt::draw_sample_normal(k_groups = 3, + f = 0.25, + sd = c(1, 1, 1), + max_n = 25) + +# calculate sequential ANOVA -------------------------------------------------- +results <- sprtt::seq_anova(y ~ x, f = 0.25, data = data, plot = TRUE) +# test decision +results@decision +#> [1] "continue sampling" +# test results +results #> -#> ***** Sequential Two Sample t-test ***** +#> ***** Sequential ANOVA ***** #> -#> formula: stress_level ~ sex +#> formula: y ~ x #> test statistic: -#> log-likelihood ratio = -0.359, decision = continue sampling +#> log-likelihood ratio = 2.892, decision = continue sampling #> SPRT thresholds: #> lower log(B) = -2.944, upper log(A) = 2.944 #> Log-Likelihood of the: -#> alternative hypothesis = -1.923 -#> null hypothesis = -1.564 +#> alternative hypothesis = -2.715 +#> null hypothesis = -5.607 #> alternative hypothesis: true difference in means is not equal to 0. -#> specified effect size: Cohen's d = 0.8 -#> degrees of freedom: df = 18 -#> sample estimates: -#> mean of x mean of y -#> -0.40818 0.42068 +#> specified effect size: Cohen's f = 0.25 +#> empirical Cohen's f = 0.4045074, 95% CI[0.129478, 0.6171581] +#> Cohen's f adjusted = 0.355 +#> degrees of freedom: df1 = 2, df2 = 72 +#> SS effect = 10.74731, SS residual = 65.68208, SS total = 76.42939 #> *Note: to get access to the object of the results use the @ or [] instead of the $ operator. -# work with dataset (data are in the package included) ------------------------ -seq_ttest(monthly_income ~ sex, data = df_income, d = 0.8) -#> -#> ***** Sequential Two Sample t-test ***** -#> -#> formula: monthly_income ~ sex -#> test statistic: -#> log-likelihood ratio = -9.514, decision = accept H0 -#> SPRT thresholds: -#> lower log(B) = -2.944, upper log(A) = 2.944 -#> Log-Likelihood of the: -#> alternative hypothesis = -8.093 -#> null hypothesis = 1.421 -#> alternative hypothesis: true difference in means is not equal to 0. -#> specified effect size: Cohen's d = 0.8 -#> degrees of freedom: df = 118 -#> sample estimates: -#> mean of x mean of y -#> 3072.086 3080.715 -#> *Note: to get access to the object of the results use the @ or [] instead of the $ operator. +# plot results ----------------------------------------------------------------- +sprtt::plot_anova(results) ``` + + diff --git a/cran-comments.md b/cran-comments.md index afd8ed6..4c9c0ec 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,54 +1,26 @@ ## Test environments -* local R installation (on windows), R 4.1.0 -* ubuntu-16.04 (on GitHub Actions), R 4.0.0 -* ubuntu-20.04 (on GitHub Actions) -* macOS-latest (on GitHub Actions) -* windows-latest (on GitHub Actions) -* R-hub -- Windows Server 2008 R2 SP1, R-devel, 32/64 bit -- Ubuntu Linux 20.04.1 LTS, R-release, GCC -- Fedora Linux, R-devel, clang, gfortran -* win builder -- using R version 4.1.0 (2021-05-18), using platform: x86_64-w64-mingw32 (64-bit) -- using R Under development (unstable) (2021-07-25 r80663), using platform: x86_64-w64-mingw32 (64-bit) +* GitHub Action +macos-latest (release) +windows-latest (release) +ubuntu-latest (devel) +ubuntu-latest (release) +ubuntu-latest (oldrel-1) +* macOS builder +Build system: r-release-macosx-arm64|4.3.0|macosx|macOS 13.3.1 (22E261)|Mac mini|Apple M1||en_US.UTF-8|macOS 11.3|clang-1403.0.22.14.1|GNU Fortran (GCC) 12.2.0 +* win-builder ## R CMD check results -New submission -==> This is my first submission +── R CMD check results ────────────────── sprtt 0.2.0 ──── +Duration: 2m 28.5s -Possibly mis-spelled words in DESCRIPTION: - Erdfelder (31:34) - Hajnal (25:5) - Rushton (24:49) - SPRT (22:54, 25:33, 31:5) - Schnuerch (31:22) -==> spelling is correct +0 errors ✔ | 0 warnings ✔ | 0 notes ✔ -Found the following (possibly) invalid DOIs: - DOI: 10.2307/2332385 - From: DESCRIPTION - Status: Forbidden - Message: 403 - DOI: 10.2307/2333131 - From: DESCRIPTION - Status: Forbidden - Message: 403 - DOI: 10.2307/2334026 - From: DESCRIPTION - Status: Forbidden - Message: 403 +R CMD check succeeded -==> DOIs are correct! +## Reverse Dependencies +0 reverse dependencies -0 errors √ | 0 warnings √ | 1 note x - -## last CRAN feedback -Please add () behind all function names in the description texts (DESCRIPTION file). e.g: 'seq_ttest' --> seq_ttest() -==> DONE - -Please write references in the description of the DESCRIPTION file in the form authors (year) -==> DONE - -Please add \value to .Rd files regarding exported methods and explain the functions results in the documentation. -==> DONE +## Change of licence from GPL to AGPL +all authors of the package accepted the change +(see open issue: https://github.com/MeikeSteinhilber/sprtt/issues/33) diff --git a/inst/examples/draw_sample_mixture.R b/inst/examples/draw_sample_mixture.R index 1028047..2575403 100644 --- a/inst/examples/draw_sample_mixture.R +++ b/inst/examples/draw_sample_mixture.R @@ -10,7 +10,7 @@ data data <- sprtt::draw_sample_mixture( k_groups = 4, f = 1.2, # very large effect size - max_n = 2, + max_n = 4, counter_n = 1000, # increase of counter is necessary verbose = TRUE # prints more information to the console ) diff --git a/inst/examples/plot_anova.R b/inst/examples/plot_anova.R index f65107f..a85964a 100644 --- a/inst/examples/plot_anova.R +++ b/inst/examples/plot_anova.R @@ -21,3 +21,7 @@ sprtt::plot_anova(anova_results, sprtt::plot_anova(anova_results, labels = FALSE ) + +# further information ---------------------------------------------------------- +# run this code: +vignette("one_way_anova", package = "sprtt") diff --git a/inst/examples/sprtt_examples.R b/inst/examples/sprtt_examples.R new file mode 100644 index 0000000..5eaea32 --- /dev/null +++ b/inst/examples/sprtt_examples.R @@ -0,0 +1,35 @@ +# set seed -------------------------------------------------------------------- +set.seed(333) + +# load library ---------------------------------------------------------------- +library(sprtt) + +# t-TEST ---------------------------------------------------------------------- +# one sample: numeric input --------------------------------------------------- +treatment_group <- rnorm(20, mean = 0, sd = 1) +results <- seq_ttest(treatment_group, mu = 1, d = 0.8) + +# get access to the slots ----------------------------------------------------- +# @ Operator +results@likelihood_ratio + +# [] Operator +results["likelihood_ratio"] + +# ANOVA ----------------------------------------------------------------------- +# simulate data --------------------------------------------------------------- +set.seed(333) +data <- sprtt::draw_sample_normal(k_groups = 3, + f = 0.25, + sd = c(1, 1, 1), + max_n = 25) + +# calculate sequential ANOVA -------------------------------------------------- +results <- sprtt::seq_anova(y ~ x, f = 0.25, data = data, plot = TRUE) +# test decision +results@decision +# test results +results + +# plot results ----------------------------------------------------------------- +sprtt::plot_anova(results) diff --git a/man/draw_sample_mixture.Rd b/man/draw_sample_mixture.Rd index fb802cb..d883086 100644 --- a/man/draw_sample_mixture.Rd +++ b/man/draw_sample_mixture.Rd @@ -15,7 +15,8 @@ draw_sample_mixture(k_groups, f, max_n, counter_n = 100, verbose = FALSE) \item{counter_n}{number of times the function tries to find a possible parameter combination for the distribution. Default value is set to 100.} -\item{verbose}{\code{TRUE} or \code{FALSE.} Print out more information about the internal process of sampling the parameters.} +\item{verbose}{\code{TRUE} or \code{FALSE.} Print out more information about the internal process of sampling the parameters +(the internal counter that was reached, some additional hints and the drawn parameters for the Gaussian Mixture distributions.)} } \value{ returns a data.frame with the columns y (observations) and x (factor_A). @@ -38,7 +39,7 @@ data data <- sprtt::draw_sample_mixture( k_groups = 4, f = 1.2, # very large effect size - max_n = 2, + max_n = 4, counter_n = 1000, # increase of counter is necessary verbose = TRUE # prints more information to the console ) diff --git a/man/figures/figure-gfm/unnamed-chunk-3-1.png b/man/figures/figure-gfm/unnamed-chunk-3-1.png new file mode 100644 index 0000000..bde0989 Binary files /dev/null and b/man/figures/figure-gfm/unnamed-chunk-3-1.png differ diff --git a/man/plot_anova.Rd b/man/plot_anova.Rd index c1901ef..6af11ea 100644 --- a/man/plot_anova.Rd +++ b/man/plot_anova.Rd @@ -10,6 +10,7 @@ plot_anova( position_labels_x = 0.15, position_labels_y = 0.075, position_lr_x = 0.05, + position_lr_y = NULL, font_size = 25, line_size = 1.5, highlight_color = "#CD2626" @@ -20,11 +21,13 @@ plot_anova( \item{labels}{show labels in the plot.} -\item{position_labels_x}{position of the boundary labels on the x-axis.} +\item{position_labels_x}{position of the boundary labels on the x-axis. 0 positions the center on the 0 of the x-axis.} -\item{position_labels_y}{position of the boundary labels on the y-axis.} +\item{position_labels_y}{position of the boundary labels on the y-axis. 0 positions the labels on the dotted lines.} -\item{position_lr_x}{scales the position of the LR label on the x-axis.} +\item{position_lr_x}{scales the position of the LR label on the x-axis. 0 positions the label directly under the last calculated LR.} + +\item{position_lr_y}{scales the position of the LR label on the x-axis. 0 positions the label on the 0 of the y-axis} \item{font_size}{font size of the plot.} @@ -64,4 +67,8 @@ sprtt::plot_anova(anova_results, sprtt::plot_anova(anova_results, labels = FALSE ) + +# further information ---------------------------------------------------------- +# run this code: +vignette("one_way_anova", package = "sprtt") } diff --git a/man/seq_anova.Rd b/man/seq_anova.Rd index cc2b176..ae80e24 100644 --- a/man/seq_anova.Rd +++ b/man/seq_anova.Rd @@ -39,7 +39,8 @@ A vector of numbers specifies the sample sizes at which the anova is calculated. Attention: the calculation starts at the number of groups times two. If the data do not fit to this, you have to specify the sequential steps yourself in this argument. \code{balanced} specifies that the step size is equal to the number of groups. -Attention: the calculation starts at the number of groups times two.} +Attention: the calculation starts at the number of groups times two. +If the data do not fit to this, you have to specify the sequential steps yourself in this argument.} } \value{ An object of the S4 class \code{\linkS4class{seq_anova_results}}. Click on the @@ -52,7 +53,7 @@ See the examples below. \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} Performs a sequential one-way fixed effects ANOVA, see Steinhilber et al. (2023) \url{doi:10.31234/osf.io/m64ne} -for more information. +for more information. The repeated measurement ANOVA is not implemented yet in this function. For more information check out the vignette \code{vignette("one_way_anova", package = "sprtt")} } \examples{ # simulate data ---------------------------------------------------------------- diff --git a/man/sprtt-package.Rd b/man/sprtt-package.Rd index daa4264..04b134d 100644 --- a/man/sprtt-package.Rd +++ b/man/sprtt-package.Rd @@ -8,7 +8,7 @@ \description{ \if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} -It is a toolbox for Sequential Probability Ratio Tests (SPRT), Wald (1945) \doi{10.2134/agronj1947.00021962003900070011x}. SPRTs are applied to the data during the sampling process, ideally after each observation. At any stage, the test will return a decision to either continue sampling or terminate and accept one of the specified hypotheses. The seq_ttest() function performs sequential t tests developed by Rushton (1950) \doi{10.2307/2332385}, Rushton (1952) \doi{10.2307/2334026} and Hajnal (1961) \doi{10.2307/2333131}, based on the SPRT. Specifically, seq_ttest() performs one-sample, two-sample, and paired t tests for testing one- and two-sided hypotheses. For more information on the SPRT t test, see Schnuerch & Erdfelder (2019) \doi{10.1037/met0000234}. The seq_anova() function allows to perform a sequential one-way fixed effects ANOVA (see Steinhilber et al. (2023) <> ). +It is a toolbox for Sequential Probability Ratio Tests (SPRT), Wald (1945) \doi{10.2134/agronj1947.00021962003900070011x}. SPRTs are applied to the data during the sampling process, ideally after each observation. At any stage, the test will return a decision to either continue sampling or terminate and accept one of the specified hypotheses. The seq_ttest() function performs one-sample, two-sample, and paired t-tests for testing one- and two-sided hypotheses (Schnuerch & Erdfelder (2019) \doi{10.1037/met0000234}). The seq_anova() function allows to perform a sequential one-way fixed effects ANOVA (Steinhilber et al. (2023) \doi{10.31234/osf.io/m64ne}). Learn more about the package by using vignettes "browseVignettes(package = "sprtt")" or go to the website \url{https://meikesteinhilber.github.io/sprtt/}. } \seealso{ Useful links: diff --git a/revdep/README.md b/revdep/README.md new file mode 100644 index 0000000..67acf9f --- /dev/null +++ b/revdep/README.md @@ -0,0 +1,32 @@ +# Platform + +|field |value | +|:--------|:------------------------------------------------------------------------------------| +|version |R version 4.3.0 (2023-04-21 ucrt) | +|os |Windows 10 x64 (build 19045) | +|system |x86_64, mingw32 | +|ui |RStudio | +|language |en | +|collate |German_Germany.utf8 | +|ctype |German_Germany.utf8 | +|tz |Europe/Berlin | +|date |2023-07-06 | +|rstudio |2023.06.0+421 Mountain Hydrangea (desktop) | +|pandoc |3.1.1 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown) | + +# Dependencies + +|package |old |new |Δ | +|:-----------|:---|:-------|:--| +|digest |NA |0.6.32 |* | +|jsonlite |NA |1.8.5 |* | +|lme4 |NA |1.1-33 |* | +|mvtnorm |NA |1.2-2 |* | +|processx |NA |3.8.1 |* | +|Rcpp |NA |1.0.10 |* | +|StanHeaders |NA |2.26.27 |* | +|testthat |NA |3.1.9 |* | +|vctrs |NA |0.6.3 |* | + +# Revdeps + diff --git a/revdep/checks/libraries.csv b/revdep/checks/libraries.csv new file mode 100644 index 0000000..4a8120a --- /dev/null +++ b/revdep/checks/libraries.csv @@ -0,0 +1,10 @@ +package,old,new,delta +digest,NA,0.6.32,* +jsonlite,NA,1.8.5,* +lme4,NA,1.1-33,* +mvtnorm,NA,1.2-2,* +processx,NA,3.8.1,* +Rcpp,NA,1.0.10,* +StanHeaders,NA,2.26.27,* +testthat,NA,3.1.9,* +vctrs,NA,0.6.3,* diff --git a/revdep/cran.md b/revdep/cran.md new file mode 100644 index 0000000..33114b6 --- /dev/null +++ b/revdep/cran.md @@ -0,0 +1,7 @@ +## revdepcheck results + +We checked 0 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. + + * We saw 0 new problems + * We failed to check 0 packages + diff --git a/revdep/data.sqlite b/revdep/data.sqlite new file mode 100644 index 0000000..46183f6 Binary files /dev/null and b/revdep/data.sqlite differ diff --git a/revdep/failures.md b/revdep/failures.md new file mode 100644 index 0000000..9a20736 --- /dev/null +++ b/revdep/failures.md @@ -0,0 +1 @@ +*Wow, no problems at all. :)* \ No newline at end of file diff --git a/revdep/library/sprtt/new/Rcpp/CITATION b/revdep/library/sprtt/new/Rcpp/CITATION new file mode 100644 index 0000000..8b040cb --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/CITATION @@ -0,0 +1,50 @@ +citHeader("To cite Rcpp in publications use:") + +citEntry(entry = "Article", + title = "{Rcpp}: Seamless {R} and {C++} Integration", + author = personList(as.person("Dirk Eddelbuettel"), + as.person("Romain Fran\\c{c}ois")), + journal = "Journal of Statistical Software", + year = "2011", + volume = "40", + number = "8", + pages = "1--18", + doi = "10.18637/jss.v040.i08", + + textVersion = paste("Dirk Eddelbuettel and Romain Francois (2011).", + "Rcpp: Seamless R and C++ Integration.", + "Journal of Statistical Software, 40(8), 1-18, ", + ".") +) + +citEntry(entry = "Book", + title = "Seamless {R} and {C++} Integration with {Rcpp}", + author = personList(as.person("Dirk Eddelbuettel")), + publisher = "Springer", + address = "New York", + year = 2013, + note = "ISBN 978-1-4614-6867-7", + doi = "10.1007/978-1-4614-6868-4", + + textVersion = paste("Eddelbuettel, Dirk (2013)", + "Seamless R and C++ Integration with Rcpp,", + "Springer, New York, ISBN 978-1-4614-6867-7,", + ".") +) + +citEntry(entry = "Article", + title = "{Extending \textit{R} with \textit{C++}: A Brief Introduction to \textit{Rcpp}}", + author = personList(as.person("Dirk Eddelbuettel"), + as.person("James Joseph Balamuta")), + journal = "The American Statistician", + year = "2018", + volume = "72", + number = "1", + pages = "28-36", + doi = "10.1080/00031305.2017.1375990", + + textVersion = paste("Dirk Eddelbuettel and James Joseph Balamuta (2018).", + "Extending R with C++: A Brief Introduction to Rcpp.", + "The American Statistician. 72(1),", + ".") +) diff --git a/revdep/library/sprtt/new/Rcpp/DESCRIPTION b/revdep/library/sprtt/new/Rcpp/DESCRIPTION new file mode 100644 index 0000000..2ce7cf7 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/DESCRIPTION @@ -0,0 +1,31 @@ +Package: Rcpp +Title: Seamless R and C++ Integration +Version: 1.0.10 +Date: 2023-01-12 +Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou, + Nathan Russell, Inaki Ucar, Douglas Bates and John Chambers +Maintainer: Dirk Eddelbuettel +Description: The 'Rcpp' package provides R functions as well as C++ classes which + offer a seamless integration of R and C++. Many R data types and objects can be + mapped back and forth to C++ equivalents which facilitates both writing of new + code as well as easier integration of third-party libraries. Documentation + about 'Rcpp' is provided by several vignettes included in this package, via the + 'Rcpp Gallery' site at , the paper by Eddelbuettel and + Francois (2011, ), the book by Eddelbuettel (2013, + ) and the paper by Eddelbuettel and Balamuta (2018, + ); see 'citation("Rcpp")' for details. +Imports: methods, utils +Suggests: tinytest, inline, rbenchmark, pkgKitten (>= 0.1.2) +URL: https://www.rcpp.org, + https://dirk.eddelbuettel.com/code/rcpp.html, + https://github.com/RcppCore/Rcpp +License: GPL (>= 2) +BugReports: https://github.com/RcppCore/Rcpp/issues +MailingList: rcpp-devel@lists.r-forge.r-project.org +RoxygenNote: 6.1.1 +NeedsCompilation: yes +Packaged: 2023-01-12 14:11:18 UTC; edd +Repository: CRAN +Date/Publication: 2023-01-22 16:30:02 UTC +Built: R 4.3.1; x86_64-w64-mingw32; 2023-06-25 00:39:30 UTC; windows +Archs: x64 diff --git a/revdep/library/sprtt/new/Rcpp/INDEX b/revdep/library/sprtt/new/Rcpp/INDEX new file mode 100644 index 0000000..ebc987a --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/INDEX @@ -0,0 +1,38 @@ +.DollarNames-methods completion +C++Class-class Reflection information for an internal c++ + class +C++Constructor-class Class "C++Constructor" +C++Field-class Class "C++Field" +C++Function-class Class "C++Function" +C++Object-class c++ internal objects +C++OverloadedMethods-class + Class "C++OverloadedMethods" +LdFlags Deprecated Rcpp Linker Flags +Module Retrieves an Rcpp module +Module-class Rcpp modules +Rcpp-deprecated Deprecated Functions in the Rcpp Package +Rcpp-package R / C++ interface +Rcpp.package.skeleton Create a skeleton for a new package depending + on Rcpp +Rcpp.plugin.maker Facilitating making package plugins +RcppUnitTests Rcpp : unit tests results +compileAttributes Compile Rcpp Attributes for a Package +compilerCheck Check for Minimal (g++) Compiler Version +cppFunction Define an R Function with a C++ Implementation +demangle c++ type information +dependsAttribute Rcpp::depends Attribute +evalCpp Evaluate a C++ Expression +exportAttribute Rcpp::export Attribute +exposeClass Create an Rcpp Module to Expose a C++ Class in + R +formals<--methods Set the formal arguments of a C++ function +getRcppVersion Export the Rcpp (API) Package Version +interfacesAttribute Rcpp::interfaces Attribute +loadModule Load an Rcpp Module into a Package +loadRcppModules Loads Rcpp modules on package startup +pluginsAttribute Rcpp::plugins Attribute +populate Populates a namespace or an environment with + the content of a module +registerPlugin Register an inline plugin +setRcppClass Create a Class Extending a C++ Class +sourceCpp Source C++ Code from a File or String diff --git a/revdep/library/sprtt/new/Rcpp/MD5 b/revdep/library/sprtt/new/Rcpp/MD5 new file mode 100644 index 0000000..ecadd8f --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/MD5 @@ -0,0 +1,655 @@ +4dfa3723ed669b83c2160648bb4e874a *CITATION +8962d34d4b1c85cd92fac86fa372aa93 *DESCRIPTION +52f315c96cb329173cc129688e517054 *INDEX +38b54ae959bc623e09c99801a92017dd *Meta/Rd.rds +f191f333b866ab8dcb201f48270fe190 *Meta/features.rds +552f37802664d51c5a85ab2eed682dfa *Meta/hsearch.rds +f00322efce554ac8c1dbc360daf64099 *Meta/links.rds +9a18b141b40806ab78c544102704be8f *Meta/nsInfo.rds +b5c2cd8cb43bbce3cc07cf97c121cdb2 *Meta/package.rds +630d718293a15f1b0ce2c06ea4fbc7cb *Meta/vignette.rds +f53ecd48407d7485920c4f3caaf187e0 *NAMESPACE +598d5ba7654252b8aca313368d26adb1 *NEWS.Rd +d6c68f1fe41ced6e98a766a3757313da *R/Rcpp +5e3552bb2b8e841431b5bfcd2c557ddc *R/Rcpp.rdb +648ae5fa370d85c74df1c4c603ae56cf *R/Rcpp.rdx +7a9967333ad85931cc6d2051f4dff76e *announce/ANNOUNCE-0.10.0.txt +734d037a2ac31af4659fb3b2e1a778ad *announce/ANNOUNCE-0.11.0.txt +7d85af8d096e473821a3f001d3128b01 *announce/ANNOUNCE-0.6.0.txt +f61c7e9e1460eac25702b24c1af30442 *announce/ANNOUNCE-0.7.0.txt +a198e05a9b004dfc1f8ea67629f2f6c7 *announce/ANNOUNCE-0.8.0.txt +3e8a171f22548f5da208b58e66b48e6c *announce/ANNOUNCE-0.9.0.txt +edae75b16ae2c0f5ba9624aaa3522a2f *bib/Rcpp.bib +6f1e3b1f4f75e04af65bb9daf94e9630 *discovery/cxx0x.R +2baf167ce452976b0fcb43e44f566af7 *doc/Rcpp-FAQ.Rnw +2b65259365c4ce69a3401f02afa158b7 *doc/Rcpp-FAQ.pdf +887250b7e0675b4a70d6eb1a4689080c *doc/Rcpp-attributes.Rnw +d6377784e1743bad9ff0942071d8cbfa *doc/Rcpp-attributes.pdf +37f50a136d1350e8e864c9265cc88ad8 *doc/Rcpp-extending.Rnw +d3862102e4b99c636ddef6b11674601d *doc/Rcpp-extending.pdf +90eade7bfffa82f250510759bc9a7f36 *doc/Rcpp-introduction.Rnw +3653c00c8dade43f0302f6b951b2f94a *doc/Rcpp-introduction.pdf +e6cf1d12ce4e3a2fed6eddf6290d393f *doc/Rcpp-jss-2011.Rnw +4da52fad52285d53c35e6c7898d1c3d0 *doc/Rcpp-jss-2011.pdf +4524c2761e07e170f681181c2e62eb05 *doc/Rcpp-libraries.Rnw +37f48f85a462b75f63b81ab0f12bc8ff *doc/Rcpp-libraries.pdf +a96bcf4153b795bff19ddc36a17ca435 *doc/Rcpp-modules.Rnw +11706abaf0b566b326efe39234ba2751 *doc/Rcpp-modules.pdf +835d0e2dd365e4621663bd03ae219758 *doc/Rcpp-package.Rnw +137c60a33b37104b2d8b02f8ce4672dc *doc/Rcpp-package.pdf +d76adfdc4e68c69c5ff632e234db6a85 *doc/Rcpp-quickref.Rnw +badec80760b9f9d238d8e5eb2231ddad *doc/Rcpp-quickref.pdf +929a1aad762b7354b6875a35093ec477 *doc/Rcpp-sugar.Rnw +7214e1f64b9d6f00fe52e3a7b7b0b0d0 *doc/Rcpp-sugar.pdf +4ea8fec743d0583013c965e9dd05ff66 *doc/index.html +35fa971232b8c9fb0bbb9dfc2ad3de7a *examples/Attributes/Depends.cpp +a9aa3aceea0b49525155a2c43296318b *examples/Attributes/Export.cpp +c6c9969e0067a1321827369cba1cc566 *examples/Attributes/cppFunction.R +ae6383cbe35d7fd9f03a47b16fe084e4 *examples/Attributes/sourceCpp.R +d8ad7f81287bfb38184962408e21dc4b *examples/ConvolveBenchmarks/GNUmakefile +4e5da9b0fe573983765dacbdd4888f71 *examples/ConvolveBenchmarks/buildAndRun.sh +3b726172d475beb1a950a60c963abdd6 *examples/ConvolveBenchmarks/convolve10_cpp.cpp +7b5f52647bb1401e5ca51ae24a99d9ab *examples/ConvolveBenchmarks/convolve10_cpp.h +198737bb5588686872b7bf92c575b44d *examples/ConvolveBenchmarks/convolve11_cpp.cpp +c2326ac51bb20278c7d200c0217af192 *examples/ConvolveBenchmarks/convolve12_cpp.cpp +ec15a3f27dda294c1ba0e85bc7975001 *examples/ConvolveBenchmarks/convolve13_cpp.cpp +c2934f803727f1f9145f2eaacf7fb783 *examples/ConvolveBenchmarks/convolve14_cpp.cpp +02ae1ae1c668a0037f228a316a9b9717 *examples/ConvolveBenchmarks/convolve2_c.c +41c3477fb3c135e372f7dcee7a00b1fe *examples/ConvolveBenchmarks/convolve3_cpp.cpp +6094f474b9bada3d489b5e9e1eed40db *examples/ConvolveBenchmarks/convolve4_cpp.cpp +570d28eceab6c8e21061abaa932a57b7 *examples/ConvolveBenchmarks/convolve5_cpp.cpp +160f9ca0f7a5e8ce599d5a731e33a302 *examples/ConvolveBenchmarks/convolve7_c.c +feac91b32652ac87f9fca99cb65babef *examples/ConvolveBenchmarks/convolve8_cpp.cpp +b653d0cab1e9c200527c631486b21b22 *examples/ConvolveBenchmarks/convolve9_cpp.cpp +e211fa941ea87850f28aafd93dbaea01 *examples/ConvolveBenchmarks/exampleRCode.r +83e612c4f034144d20769da6a98ab430 *examples/ConvolveBenchmarks/loopmacro.h +a39297262c26fcf0016a007c8729f7ed *examples/ConvolveBenchmarks/overhead.r +695db9645074a40edf199a3f6e7b99d9 *examples/ConvolveBenchmarks/overhead.sh +41a7585097bb0330a19163f63b9eb582 *examples/ConvolveBenchmarks/overhead_1.cpp +70bc5f4cab64d21baa5efd44371d6c06 *examples/ConvolveBenchmarks/overhead_2.c +f98ba450080bf7ededba779a9eb9ef08 *examples/FastLM/benchmark.r +187ff739229daa658a997db7361cf79a *examples/FastLM/benchmarkLongley.r +57e3f462b6e57f6d4781d93ad0b5a0f0 *examples/FastLM/fastLMviaArmadillo.r +96177e5073669fce0ada1a133a4b528a *examples/FastLM/fastLMviaGSL.r +bed809fc1187686e9c3f031da7ecc03a *examples/FastLM/lmArmadillo.R +e90e71260dd32a062301a565b0ceb78a *examples/FastLM/lmGSL.R +dee16ee1aaf90787c0d3fe441b57e572 *examples/Misc/fibonacci.r +51b7f11bdc147d595d3d7de4a7b88129 *examples/Misc/ifelseLooped.r +80df7f84cd6c98c9d3b45ceaa62b6325 *examples/Misc/newFib.r +3028009739751d645a3f3c1e65c335b1 *examples/Misc/piBySimulation.r +b6d55aea50fdd5a95b36f006bfa9bbdf *examples/Misc/piSugar.cpp +b28eef52d9c70bdc3bc1c7c4af74a705 *examples/OpenMP/GNUmakefile +6ac8a4754e7a6c968f910b775837981b *examples/OpenMP/OpenMPandInline.r +1fb803a50758e7abccccbacf6df79bb9 *examples/OpenMP/check.R +33d174735e08ffcbfe8b14f77be6467e *examples/OpenMP/piWithInterrupts.cpp +ee8c42a72f8ed650b8ac32443890c01b *examples/RcppGibbs/RcppGibbs.R +cefdedf5f9c0d671bcf465e948198a29 *examples/RcppGibbs/RcppGibbs_Updated.R +a57feb54c968ab827c78c5c18c1d1408 *examples/RcppGibbs/timeRNGs.R +e8a89fe0eebf8ec758806abc84e42d8d *examples/RcppInline/RObject.r +07260e8bebfc924ed834ac9adc10ed3e *examples/RcppInline/RcppInlineExample.r +0e55533b689b5cc21d6e48ed89e39f50 *examples/RcppInline/RcppInlineWithLibsExamples.r +8d8b770eaeee86bcb2a7b0939a3c75f3 *examples/RcppInline/RcppSimpleExample.r +af8de22ca53be6cde070ad079bcc0560 *examples/RcppInline/UncaughtExceptions.r +04094741972fda044af2c1982433f37a *examples/RcppInline/external_pointer.r +924087b70f9e658de341442f27c787ee *examples/SugarPerformance/Timer.h +ddfeedc53f53f33a3da83660c9bc022e *examples/SugarPerformance/Timertest.cpp +8be8229bd89b2ea3a760d1112f7a7054 *examples/SugarPerformance/sugarBenchmarks.R +4b5eef1853e02850de35d4799c7392ef *examples/functionCallback/README +f55a0d78225fef3970fc5f54fddb5801 *examples/functionCallback/newApiExample.r +2b3ff26140686d910b4fe51505b817a3 *examples/performance/extractors.R +33c7adefe3137cae65b189490c958c6a *examples/performance/performance.R +bfb1013511641e19525df52e61532b31 *help/AnIndex +278a2aef680e9b4540ded1345f6b186d *help/Rcpp.rdb +7db241f1c4adf23c7b02ef5428c69c48 *help/Rcpp.rdx +6f470e2bfbc13a04c1e51605c8f6ef5e *help/aliases.rds +5669027f3e688ec3b727f210357ff8c6 *help/paths.rds +623b573d5aeff157b2cab5ecfba58660 *html/00Index.html +8b9362669af13540a86a3ac6cf22f99d *html/R.css +46bdb787a2fde9b6cd8ff24039e84aa0 *include/Rcpp.h +7acf90ededacb240b082c50653a1fe05 *include/Rcpp/Benchmark/Timer.h +55e8ffbfaecd5bd65ec560b5a748b249 *include/Rcpp/DataFrame.h +e4195b2fee650b67d709d7bd529f3de6 *include/Rcpp/Dimension.h +bed24a03d2f346377d351327e6ead507 *include/Rcpp/DottedPair.h +8ae8df6f92f7d17625b543348c9c035c *include/Rcpp/DottedPairImpl.h +c59231f7b6bfaddb9e14b5d26ca25509 *include/Rcpp/Environment.h +719d99509ff3398d24d31a4964dc6beb *include/Rcpp/Extractor.h +0e673291cac4bf839157946880772c1d *include/Rcpp/Fast.h +1836fe44282438109267ce447debae1a *include/Rcpp/Formula.h +02c97e92bb9d86bf42fd11bb1f0b610e *include/Rcpp/Function.h +6ad1b0148d43fd84f39d8e030e39a871 *include/Rcpp/InputParameter.h +33e8288bc78be5183dd4879475dde613 *include/Rcpp/InternalFunction.h +ad94932d526af097cfe9e8f269c09796 *include/Rcpp/InternalFunctionWithStdFunction.h +4f649deb041fc8b0ff2680d1a75a49db *include/Rcpp/Interrupt.h +0198fa76eadb139dfc300e7b583379d0 *include/Rcpp/Language.h +4df6c1501ce42ce8669ed6e6473653d5 *include/Rcpp/Light +7423a0c0e22f136a8cde2ee861349d13 *include/Rcpp/Lighter +831f454f66395440e5c4b805917f2b9d *include/Rcpp/Lightest +2e01e759b99ac628ba34b2704d6c9aa6 *include/Rcpp/Module.h +e54ff3fb24c5fb5c00e35804b4043177 *include/Rcpp/Na_Proxy.h +30a357c1b1bf0a4b7b3c06aec6ac6891 *include/Rcpp/Named.h +09c3d2e030266a2716c465005fddb8ad *include/Rcpp/Nullable.h +ec0cd8dd199ad35da6ef847625789331 *include/Rcpp/Pairlist.h +c299955262d228fc372294633ecb10a9 *include/Rcpp/Promise.h +c7c202116cb2d8f9993f2d2879a48339 *include/Rcpp/RNGScope.h +19d73d0c48066eab27b7e21f016aca39 *include/Rcpp/RObject.h +7eaef3d46101154d1492c710f3cad3bf *include/Rcpp/Rcpp +0708f78d2a5868bd0036bdffc92557eb *include/Rcpp/Reference.h +577707408edc19445de29e2fd4182292 *include/Rcpp/Rmath.h +4a8bc08de01a68edf476065293076bc9 *include/Rcpp/S4.h +b479ccd53c1917ce1140ee0a17bb3d21 *include/Rcpp/StretchyList.h +bb14d4e4092adf456e6ee1186b6950c2 *include/Rcpp/String.h +70f564c35b318a49d4bafdcdfe861c7e *include/Rcpp/StringTransformer.h +016374544bddc85df03012bf1e70377c *include/Rcpp/Symbol.h +6370b5966cc98d3e684862425576275b *include/Rcpp/Vector.h +eed9bf9af10a68be9cd55e5a5cdaa36a *include/Rcpp/WeakReference.h +c84d37569cc5094df6e4c8600530d110 *include/Rcpp/XPtr.h +2eff8a753ede96fbcf538eab9eb22889 *include/Rcpp/algo.h +8945b9daf79dc522161d4738be104e8e *include/Rcpp/algorithm.h +3fa2caaea31d12b63d0a049c1da3c878 *include/Rcpp/api/bones/Date.h +560684b180bc9eb1aaaf6f427ea97063 *include/Rcpp/api/bones/Datetime.h +4d936b49167638e86368f4b8e26c13cc *include/Rcpp/api/bones/bones.h +49f3c640f64681d80bfd2395309a4ddb *include/Rcpp/api/bones/wrap_extra_steps.h +738de61f646f72b06810142fcb09af6f *include/Rcpp/api/meat/DataFrame.h +80788c003d6b95f633d53db11b4c42e0 *include/Rcpp/api/meat/Date.h +64e00680fbc6a82bbd1dd0e100e10673 *include/Rcpp/api/meat/Datetime.h +13355fb54111f51930877bcddb41d50c *include/Rcpp/api/meat/Dimension.h +26477794f8170b533113dcf620d64d1c *include/Rcpp/api/meat/DottedPairImpl.h +006fb9ab61399d07b7f7bbd8ae6cf92f *include/Rcpp/api/meat/Environment.h +e3132a348dd7c8cb342e4df0dd480737 *include/Rcpp/api/meat/Rcpp_eval.h +a8b20b3c2b1e123172ab3a1eb78e04b0 *include/Rcpp/api/meat/S4.h +9fd69c4ef0c1780784322f902305d1c7 *include/Rcpp/api/meat/StretchyList.h +eded8a0a95dd5ecdcae8aa70aceb795c *include/Rcpp/api/meat/Vector.h +a3e8a42322f0e644f1d6b6d4f55425e7 *include/Rcpp/api/meat/as.h +f1b2b53b2851bbd3afb878ef3829f58f *include/Rcpp/api/meat/export.h +cc1991e18d0c1d1e3470285fec935c36 *include/Rcpp/api/meat/is.h +3ecf92371682f347f71c6da62730a05e *include/Rcpp/api/meat/meat.h +b8b08db5250d9cd27130853ed04041bc *include/Rcpp/api/meat/message.h +71c33d73cde9cdf7368627a9b00a8e7d *include/Rcpp/api/meat/module/Module.h +d3e14b929d0b6cd092f52d1ced57b573 *include/Rcpp/api/meat/protection.h +c9af45da88ea151bb2f8cd27900257e8 *include/Rcpp/api/meat/proxy.h +12c775ee39ec274c4825219d25e04f43 *include/Rcpp/api/meat/wrap.h +47fc05bb3d86217c07793ea37d833302 *include/Rcpp/as.h +90c153091bc3fb1e123fef9dc40394e6 *include/Rcpp/barrier.h +fa7b26bbe19f908b9c00ead2fe2717ac *include/Rcpp/clone.h +1b3b2bee1fc9bd3f231c2a33ca572281 *include/Rcpp/complex.h +e8031e721779d357548ff14b4777343e *include/Rcpp/config.h +b90e19134c5d4a4c0652f956c022d1e4 *include/Rcpp/date_datetime/Date.h +e75130fc77dac6243e5c88639c940dea *include/Rcpp/date_datetime/Datetime.h +0d754f1a9266c3e1bbc6946ba1304ab5 *include/Rcpp/date_datetime/date_datetime.h +e2616c39c51c09af33f595b28d1f5fe5 *include/Rcpp/date_datetime/newDateVector.h +1c84cd464c857eadab9323be5772ef2b *include/Rcpp/date_datetime/newDatetimeVector.h +eeaacae019fe68c8acbd3e9fbea29a3d *include/Rcpp/date_datetime/oldDateVector.h +a2bcdcb2cc9e096bfb46106875462a13 *include/Rcpp/date_datetime/oldDatetimeVector.h +7668f358d29578e82800d6bd98f60a12 *include/Rcpp/exceptions.h +fabe6bb18d2e4714327930f192754072 *include/Rcpp/exceptions/cpp11/exceptions.h +4f3d1575c7468c08aff9caf2029b5262 *include/Rcpp/exceptions/cpp98/exceptions.h +3642669268fd6c58182bb23da0101660 *include/Rcpp/exceptions_impl.h +7dc521891bf0b250105c08f84806dedf *include/Rcpp/generated/DataFrame_generated.h +b0b0b9732bb0201a5dbecefd41ed1a6f *include/Rcpp/generated/DottedPair__ctors.h +1a89560f0b3c22732c724c82f77bc711 *include/Rcpp/generated/Function__operator.h +89c6d03ae9bce1e1e7c694408cd71f4d *include/Rcpp/generated/InternalFunctionWithStdFunction_call.h +b8c60809df30845e119f0b477716bb65 *include/Rcpp/generated/InternalFunction__ctors.h +89cb37088328001298a4ba18a4acd1d5 *include/Rcpp/generated/Language__ctors.h +af099521f7cbf6024d6a6ce428861634 *include/Rcpp/generated/Pairlist__ctors.h +42e058cc4ef74a4b09e9d3b102cd417a *include/Rcpp/generated/Vector__create.h +97ed751b981c523527ce243786ac969d *include/Rcpp/generated/grow__pairlist.h +292084b02ea848293ea5461a0401ebde *include/Rcpp/grow.h +5fa886fea6bfe95d86c97fc32794711e *include/Rcpp/hash/IndexHash.h +118185092dfabe6230c4e6c2a8e50257 *include/Rcpp/hash/SelfHash.h +ce761de72f7730fe942b91e35e6b9ba6 *include/Rcpp/hash/hash.h +3c1b55773be7d386bca01a99c8fa94af *include/Rcpp/internal/Exporter.h +87298c0d130f4d0c2c9e3bcbf8f52712 *include/Rcpp/internal/GreedyVector.h +ac0b994918191501b757516ce5ee263b *include/Rcpp/internal/ListInitialization.h +589b5e7ef7ec36ea7c72c0989856322e *include/Rcpp/internal/NAComparator.h +ddeb259fb4dc45ce8f48af5e7c67327a *include/Rcpp/internal/NAEquals.h +9ebaf1b5d82a7300ea9829a015b119e9 *include/Rcpp/internal/Proxy_Iterator.h +3b9b1995e34864e5b0594127ded878a3 *include/Rcpp/internal/SEXP_Iterator.h +ef7589197950d24c37c68868a2fd4ec5 *include/Rcpp/internal/caster.h +1cc9fbe420c4d94a392fa41db6607f81 *include/Rcpp/internal/converter.h +b261424a4674e913fc059a5b98afee86 *include/Rcpp/internal/export.h +d75740f6c80130661e85ef0e8af6ef17 *include/Rcpp/internal/na.h +2d6716a93c54ae524caab179db28206f *include/Rcpp/internal/r_coerce.h +440c2f839bd5756d630f66f41ee7c9a7 *include/Rcpp/internal/r_vector.h +be267828e3e200668df1d37c3b90edd0 *include/Rcpp/internal/wrap.h +14b302e7f5cca681f122cccde5418cbd *include/Rcpp/internal/wrap_end.h +e32f85c09b96c4c250a58d2961f92896 *include/Rcpp/iostream/Rstreambuf.h +c852659f0876b4dd0a3d3d99e972d1cb *include/Rcpp/is.h +24e8a8c1f4a580954091edb9dae2cfd9 *include/Rcpp/lang.h +d93f0f5c828018c1ae632ce1fb929293 *include/Rcpp/longlong.h +4e9effca3c5f2dabaa4e6aa478b67528 *include/Rcpp/macros/cat.hpp +623f4ca3111e4a28afe10133897a8f89 *include/Rcpp/macros/config.hpp +ec19b90809bb03c920fa9d6df8af2732 *include/Rcpp/macros/debug.h +593ee227e0cc7a90b2e48791889ead98 *include/Rcpp/macros/dispatch.h +32681ffdaa790b76bf3e20d3a6c17771 *include/Rcpp/macros/interface.h +bf6d92385b7958959cb10a6b3bfd2a44 *include/Rcpp/macros/macros.h +3347bc9bf5c92bf9b929c61275c1714b *include/Rcpp/macros/module.h +0c4f36da838e8571b7bc602b4b483295 *include/Rcpp/macros/traits.h +acdd29c8bc3af4e20bbb733ab4bd7e74 *include/Rcpp/macros/unroll.h +1762f3b08abffc14b677c9d4c0ee24d2 *include/Rcpp/macros/xp.h +90f826d6b2719cd8b19266f7eed1d71b *include/Rcpp/module/CppFunction.h +8d492c19d0746d6f0531a42ce62e4169 *include/Rcpp/module/Module.h +1f282a0f0e1498bbe9f228dad9fdebfd *include/Rcpp/module/Module_Add_Property.h +fd6ad1311c4cc5e0cffcc29722ca0f20 *include/Rcpp/module/Module_Field.h +923ca9c389ce3dd672edcaa3f1e0fe6b *include/Rcpp/module/Module_Property.h +f27974e30a5cdda0162a99a5d0026fe0 *include/Rcpp/module/Module_generated_Constructor.h +ab1e4d893d83ea1aad20d1f830370e8c *include/Rcpp/module/Module_generated_CppFunction.h +8e976ff3819acb86a25a76b242ba6aa2 *include/Rcpp/module/Module_generated_CppMethod.h +1cac718fae492c5f7ae939a253906e22 *include/Rcpp/module/Module_generated_Factory.h +b11be5d7819c7a763395ca8c0089423d *include/Rcpp/module/Module_generated_Pointer_CppMethod.h +9ae1c39a7c07fb1de2fed0169c4822f0 *include/Rcpp/module/Module_generated_Pointer_method.h +7606a43b443a7a4b0749d1994f7746dd *include/Rcpp/module/Module_generated_class_constructor.h +fbe65f4f50289e30d64d8b8723dcc5d0 *include/Rcpp/module/Module_generated_class_factory.h +f98a219d68a1c072d515e3dfd445b741 *include/Rcpp/module/Module_generated_class_signature.h +282a86024a78450a3f3d2bb1bb0cbda9 *include/Rcpp/module/Module_generated_ctor_signature.h +54bcedd25514753ee10ed273511f8bbd *include/Rcpp/module/Module_generated_function.h +f34764fa42d6f6fc0904264099253778 *include/Rcpp/module/Module_generated_get_signature.h +2af8acdcd6b282fcad59eb353de02ca0 *include/Rcpp/module/Module_generated_method.h +d9cb32851ba55296536d06c3d61ae711 *include/Rcpp/module/class.h +b021df8570d99c4821e25c137aa45a01 *include/Rcpp/module/class_Base.h +99322cf8421a1cc8964659b05d79a906 *include/Rcpp/module/get_return_type.h +52cb1005938ee160ac29547e92d18584 *include/Rcpp/platform/compiler.h +8f9d3b2218818dfe5f703e6900d603e9 *include/Rcpp/platform/solaris.h +31dca740cef939bf19499eeb1a50a3ea *include/Rcpp/print.h +abd6c01295a88b73432a77f6a79aca3a *include/Rcpp/protection/Armor.h +fa63d47f044e1012a5431319108f01f9 *include/Rcpp/protection/Shelter.h +6357a773233c2c9f5415c6445fe103f9 *include/Rcpp/protection/Shield.h +2fb2464623e39ad6040f4457b6ef382c *include/Rcpp/protection/protection.h +9b71f44a9870eaee5c63de664e5db4f1 *include/Rcpp/proxy/AttributeProxy.h +d1800f7df6f83a017e0501af64551239 *include/Rcpp/proxy/Binding.h +2767ffc2e7c0e7832e7223cd8da38be1 *include/Rcpp/proxy/DottedPairProxy.h +59d09bb7d953413d5452a45616fca92f *include/Rcpp/proxy/FieldProxy.h +bb4b32da96533b2cae35b524cf796d04 *include/Rcpp/proxy/GenericProxy.h +e34b2baf18b2684fe26743c96f78b3c6 *include/Rcpp/proxy/NamesProxy.h +e6ffa94de4d38f34d9b363785fbdf1ff *include/Rcpp/proxy/ProtectedProxy.h +0a75a348caecd8836340ca11be0435d7 *include/Rcpp/proxy/RObjectMethods.h +9e412a44a35eb570fe422b00c15dc84e *include/Rcpp/proxy/SlotProxy.h +16583a2ce9f3f158d32a59bc69dc6045 *include/Rcpp/proxy/TagProxy.h +5b3488834c9e483325dc45493deaf0d4 *include/Rcpp/proxy/proxy.h +c8b9ceaf9be732c7a21bcea062ba2681 *include/Rcpp/r/headers.h +3623ef6f3fa8a62ec1f67dbe2f86e51b *include/Rcpp/r_cast.h +0975231e8a827815b7cf027a56bd7fec *include/Rcpp/routines.h +5c5eddabb61b11f1e2aa1dfd3b7dfcc6 *include/Rcpp/sprintf.h +652b362ffc5b25dc354e2f94ccf775df *include/Rcpp/stats/beta.h +830d809435ad6d90f513ceb19ed229ff *include/Rcpp/stats/binom.h +de8f527ad087fd135d60496e83600129 *include/Rcpp/stats/cauchy.h +28c835cdee1aa30eff6d7f6481a7c7b7 *include/Rcpp/stats/chisq.h +2fcae848fbd39f938335de220dfceb56 *include/Rcpp/stats/dpq/dpq.h +50246afd70a6c354111d21fef9a61454 *include/Rcpp/stats/dpq/macros.h +2a0a10252c313fa1101c426a71f419b3 *include/Rcpp/stats/exp.h +16b8c2b35aa2dd1acd61aea749bea591 *include/Rcpp/stats/f.h +3531db9168652e50f1a2f7e48995e652 *include/Rcpp/stats/gamma.h +259484f02f4b70c75f061eb3acebc68b *include/Rcpp/stats/geom.h +cddc6f8806bbff126f43aad6d9f64225 *include/Rcpp/stats/hyper.h +afbc488e006d43bbb44f00b39bdc9279 *include/Rcpp/stats/lnorm.h +0148fa77627fc2649b4cc8fda21ff2cf *include/Rcpp/stats/logis.h +2f20232d49ad4e0d5aa4affe29a83677 *include/Rcpp/stats/nbeta.h +255732d79d848b5ef2dc23a0bb020c78 *include/Rcpp/stats/nbinom.h +b648f374ad9b409f3a693cb13d2dacf2 *include/Rcpp/stats/nbinom_mu.h +792ff5b69094be8d30a61da005e8b8a2 *include/Rcpp/stats/nchisq.h +4285fba50176e606b3183e550ca57008 *include/Rcpp/stats/nf.h +62bcbc788f700bb418899f2d5d71674e *include/Rcpp/stats/norm.h +b9bb0937015e9915c9eed07d7d5e675e *include/Rcpp/stats/nt.h +ee8d82efa40767e1ee30b1b39f0d2b9b *include/Rcpp/stats/pois.h +bd6f29269c4cb5e0714c7eb14497dd24 *include/Rcpp/stats/random/random.h +6be67d92344ae4ffe85a2d4a966c5712 *include/Rcpp/stats/random/rbeta.h +cdc109dfaa7c849fe8f5108a8157286e *include/Rcpp/stats/random/rbinom.h +2fe775c698a801f71c81d958ff2153bf *include/Rcpp/stats/random/rcauchy.h +09e49a79928fba558003e949f7e42625 *include/Rcpp/stats/random/rchisq.h +eb7d8d8957f95e55c7b4c883d07bde3e *include/Rcpp/stats/random/rexp.h +796f003192b271cfd01be89f08fc5857 *include/Rcpp/stats/random/rf.h +d3f7b0de54bbff91a52b5f3e97b6f0f9 *include/Rcpp/stats/random/rgamma.h +f30537d903fd0e2fe0b8fbde1ad0f448 *include/Rcpp/stats/random/rgeom.h +ef335473c41b8bf22c2ed8ead3d02802 *include/Rcpp/stats/random/rhyper.h +812d6f54e228aa74586d4494462dc308 *include/Rcpp/stats/random/rlnorm.h +e19c5aac4d1e6f05fb215da8ab9abd63 *include/Rcpp/stats/random/rlogis.h +8401528e0344ac91e8a59d3c75ea3811 *include/Rcpp/stats/random/rnbinom.h +da102c578dc03d90e134bc716ce86061 *include/Rcpp/stats/random/rnbinom_mu.h +281fe24171a0dc1a2f5d32b792b29840 *include/Rcpp/stats/random/rnchisq.h +d11f94b30bfe73bec96e494c19010112 *include/Rcpp/stats/random/rnorm.h +68c0bc9a9bf8adf587cfafec41f2e0c3 *include/Rcpp/stats/random/rpois.h +22c48598462a7a67f7c46f827a7ca37b *include/Rcpp/stats/random/rsignrank.h +6d053ab00aee5507bdcd37b260edb2ca *include/Rcpp/stats/random/rt.h +e4157ac1a6474db7d023ed619f8a3911 *include/Rcpp/stats/random/runif.h +0de983b302b5686c55cf1348856736f2 *include/Rcpp/stats/random/rweibull.h +9d96c7c693ee9ee2be41a02aca2c907c *include/Rcpp/stats/random/rwilcox.h +d5e57758623ecb887417b652e9dbe431 *include/Rcpp/stats/stats.h +51dea0f553fe2661ebbf069bba1c6fab *include/Rcpp/stats/t.h +72600819bbbb51028983e81c6623f47f *include/Rcpp/stats/unif.h +edcd15051fead7e65a02fe4848ec5969 *include/Rcpp/stats/weibull.h +b19248e3d1ba5159604ee91bc499fbe0 *include/Rcpp/storage/NoProtectStorage.h +0f0750ca5166fbea1a202f3a74e94579 *include/Rcpp/storage/PreserveStorage.h +4bfc6bf68fd92addd39ad5eabe987ccd *include/Rcpp/storage/storage.h +6d4b5fd0017b129f89731c3af6f63545 *include/Rcpp/sugar/Range.h +be07b75cd41bf643098bf8dc9f6fd6bd *include/Rcpp/sugar/block/SugarBlock_1.h +93914f21ce2678a075f440256bff7256 *include/Rcpp/sugar/block/SugarBlock_2.h +b38058d7f4161d552c59199d971759d2 *include/Rcpp/sugar/block/SugarBlock_3.h +77631c6ccb9bf7900cc3e9870308f15e *include/Rcpp/sugar/block/SugarMath.h +0b04c68170924e36a049448bb9dffbcf *include/Rcpp/sugar/block/Vectorized_Math.h +b303e234459f72118cdb77b5fc6c40d2 *include/Rcpp/sugar/block/block.h +8989b1fc88898a94d028256afd535218 *include/Rcpp/sugar/functions/Lazy.h +332e143da726e96aa5342a2d379ad888 *include/Rcpp/sugar/functions/all.h +be21eae934bd2eb08c36aa98a95f8437 *include/Rcpp/sugar/functions/any.h +2034cef020d507b44a56287085f01b03 *include/Rcpp/sugar/functions/cbind.h +356ce7a62fd40bfb5c99f5d90ceab9c8 *include/Rcpp/sugar/functions/clamp.h +006ff253f5119766397ae8786b6f3273 *include/Rcpp/sugar/functions/complex.h +8c48d64608f50fd65a1060eb0ba0a94f *include/Rcpp/sugar/functions/cummax.h +676a6d35542c22993a733ac9ca7f4557 *include/Rcpp/sugar/functions/cummin.h +d48484d2c5885e5132dae2c5360cc003 *include/Rcpp/sugar/functions/cumprod.h +b5875c167cebe51528173279a35e1c80 *include/Rcpp/sugar/functions/cumsum.h +d9339ceea3657d0eebffff3c4fc19ade *include/Rcpp/sugar/functions/diff.h +e89b6f5086b49094e87a58183226c37e *include/Rcpp/sugar/functions/duplicated.h +ee8361b3d041e25bf9dd142b2b6809db *include/Rcpp/sugar/functions/functions.h +8a1d27971f10c32f1c2dbc2441c47797 *include/Rcpp/sugar/functions/head.h +71a232c26d62819d7752cbd198ccd471 *include/Rcpp/sugar/functions/ifelse.h +e6be4a52d004d3d7cdf4577c03bc0ad6 *include/Rcpp/sugar/functions/is_finite.h +29a018bc6da09bea93392ac25e4c5ff6 *include/Rcpp/sugar/functions/is_infinite.h +e04f27b0d6d0902fd507b0c8a6c1ab6f *include/Rcpp/sugar/functions/is_na.h +905bd30e93c3bfea935a665f6e8eeecf *include/Rcpp/sugar/functions/is_nan.h +8a13e5b92b45d6fdb429164b897920b0 *include/Rcpp/sugar/functions/lapply.h +e17dd7603ed04900df60d381e1f8a117 *include/Rcpp/sugar/functions/mapply.h +1e29ed111579f3cf0c3215d476edae32 *include/Rcpp/sugar/functions/mapply/mapply_2.h +9c2025d02a6867fe1d31f12df3c41b5a *include/Rcpp/sugar/functions/mapply/mapply_3.h +ab7b9d24e77fe2dc072077714933d59d *include/Rcpp/sugar/functions/match.h +747824a9e7823288ba51af113ed9af50 *include/Rcpp/sugar/functions/math.h +e1d5c777461b843bc04bec8b3c4f6787 *include/Rcpp/sugar/functions/max.h +bf3fb31ed2cfec71483f5cf92a6b3ff8 *include/Rcpp/sugar/functions/mean.h +e7ddf543af82118e4774aab3f2e63271 *include/Rcpp/sugar/functions/median.h +17f81f3f0fb3cc04341371ab641ff46a *include/Rcpp/sugar/functions/min.h +55ea8f9269403a501d18d47198f997ef *include/Rcpp/sugar/functions/na_omit.h +fe272f9c21bb17980bdb2efffd7a7f1c *include/Rcpp/sugar/functions/pmax.h +7bd993f789e126017b34ff9858bd915a *include/Rcpp/sugar/functions/pmin.h +ae74c9114eec986e67ecab7ea08d401c *include/Rcpp/sugar/functions/pow.h +a1f5d8e23763f3e16039b32589131aaa *include/Rcpp/sugar/functions/range.h +1646622d8ec6731c53b7d74292906c43 *include/Rcpp/sugar/functions/rep.h +73bfa7e84c00ac5badd0306336c93330 *include/Rcpp/sugar/functions/rep_each.h +cb49753448b25c3cd6498bfbbae3c8de *include/Rcpp/sugar/functions/rep_len.h +5524927f94bb2c48f81cf050d5548e3d *include/Rcpp/sugar/functions/rev.h +e780762055db29b8108b020f605729a2 *include/Rcpp/sugar/functions/rowSums.h +e81e6ae804c78e169d9689df7843f20e *include/Rcpp/sugar/functions/sample.h +7fc5bd5bc3d543addb28c7d843824237 *include/Rcpp/sugar/functions/sapply.h +f964dafa72508e308f9ff057c577c49e *include/Rcpp/sugar/functions/sd.h +d85576fa8d0647c9241feb4ad3971bfa *include/Rcpp/sugar/functions/self_match.h +4723c52a2e6ffcb5a99bbf5f120f0e1f *include/Rcpp/sugar/functions/seq_along.h +29212159360b47adf9ee370544765db8 *include/Rcpp/sugar/functions/setdiff.h +d5a5b9a9b75d93f355534de01dc6ca07 *include/Rcpp/sugar/functions/sign.h +148a1f4a4a0017f7c5520a4a44441fe8 *include/Rcpp/sugar/functions/strings/collapse.h +6a4ca421d9353d551e3454c3c7ba6b00 *include/Rcpp/sugar/functions/strings/strings.h +5f405963ec4bd5cbcc470285814ee796 *include/Rcpp/sugar/functions/strings/trimws.h +fa6996110472311d86217245a4817e28 *include/Rcpp/sugar/functions/sum.h +d098d6ad59c945dfe335b022eb19bd6c *include/Rcpp/sugar/functions/table.h +6aece98287f5b416b1b9dde8258b7ba3 *include/Rcpp/sugar/functions/tail.h +3714352196527f3eb1911d7dfeda0925 *include/Rcpp/sugar/functions/unique.h +6af0ed03b22ab5376164eeca35d27830 *include/Rcpp/sugar/functions/var.h +a21e2d861c3e1641d451e8542ac90da7 *include/Rcpp/sugar/functions/which_max.h +cb63e9ae52933534b47e4b03b3345d10 *include/Rcpp/sugar/functions/which_min.h +1f232e3aea101e0a7a967b292f5fee3e *include/Rcpp/sugar/logical/SingleLogicalResult.h +633aaf9fd410363a0816ee14ea0756fe *include/Rcpp/sugar/logical/and.h +fa170788a69bc85fcb1ead3c8e3d8d61 *include/Rcpp/sugar/logical/can_have_na.h +ea316f6c93309fb814bcba060b4243c5 *include/Rcpp/sugar/logical/is.h +349f08cf81f52ed760ecd4dedd472443 *include/Rcpp/sugar/logical/logical.h +c848c2c54466ce13e842fff36b33cbfe *include/Rcpp/sugar/logical/not.h +ceda7f41514004d0f41a0a25df616480 *include/Rcpp/sugar/logical/or.h +16fbabf279bea866b7a9241084d582dc *include/Rcpp/sugar/matrix/as_vector.h +22dce70c24a72d954c9c0ddb637a87af *include/Rcpp/sugar/matrix/col.h +1efcfad1b72aac3ab68857be3a0578da *include/Rcpp/sugar/matrix/diag.h +2ce9df0e2282b1780d168cdaec70e501 *include/Rcpp/sugar/matrix/lower_tri.h +ac84cad78d201a054f8d7df13a6b1353 *include/Rcpp/sugar/matrix/matrix_functions.h +9d87e6df5f7cb6845b6073ae4c486f89 *include/Rcpp/sugar/matrix/outer.h +5d698479a84a2e019271ca70556478eb *include/Rcpp/sugar/matrix/row.h +115b6149b7f328f12440fd1e5a5a0300 *include/Rcpp/sugar/matrix/tools.h +23f94c2d6cbd068312a949798b403467 *include/Rcpp/sugar/matrix/upper_tri.h +30973622e9d3acef832c7e2578e0ddd0 *include/Rcpp/sugar/nona/nona.h +278c96c59d33653b53db01862911a17d *include/Rcpp/sugar/operators/Comparator.h +6c43390b2d47dd6b7d2bb7824d37061b *include/Rcpp/sugar/operators/Comparator_With_One_Value.h +c62f193c49b200ee28687469fb2e61c5 *include/Rcpp/sugar/operators/divides.h +dbc2f27e6693976f7e1d745db791b712 *include/Rcpp/sugar/operators/logical_operators__Vector__Vector.h +631ba1c3a5983fa36aba958fbe0fac01 *include/Rcpp/sugar/operators/logical_operators__Vector__primitive.h +57b8e523981ced17043df0a35db0503c *include/Rcpp/sugar/operators/minus.h +ce6f7cfa18cfcafb15ebd8eb8c45f802 *include/Rcpp/sugar/operators/not.h +da8a2c17103b00aeb0d205f76aaebf7d *include/Rcpp/sugar/operators/operators.h +2e6171e8d4ed6c21710aa0758e7f0536 *include/Rcpp/sugar/operators/plus.h +d129eac323c93bb69d99b023eb05812d *include/Rcpp/sugar/operators/r_binary_op.h +73722dc109290c63d68934f52637d27b *include/Rcpp/sugar/operators/times.h +5f9acbfddd1c397b017cfd5691293bb4 *include/Rcpp/sugar/operators/unary_minus.h +c5e2abc0a4e70db676f6f85b207c6fed *include/Rcpp/sugar/sets.h +813ff968a963e3058a58c469e070ef82 *include/Rcpp/sugar/sugar.h +89a193bed15037ce566fefe07f049d4b *include/Rcpp/sugar/sugar_forward.h +b4c3ecdf94025da94e6dde6eeafe8a44 *include/Rcpp/sugar/tools/iterator.h +f01c3fd8fe059517e03062b7d8422407 *include/Rcpp/sugar/undoRmath.h +894245a3f8d5c212ab9c808662c22160 *include/Rcpp/traits/char_type.h +d39c02a1033bce9b1193f12eee141171 *include/Rcpp/traits/enable_if.h +4a72487b73047f686e868b4c4cb44382 *include/Rcpp/traits/expands_to_logical.h +129c2e9c6e0a73fce5cebd72c14c2254 *include/Rcpp/traits/get_na.h +e20649d25657d2a949492331c7758b7c *include/Rcpp/traits/has_iterator.h +235a43df43936d00128253ef7005915c *include/Rcpp/traits/has_na.h +3cd036e8adc3672b90bf08504e9f7a76 *include/Rcpp/traits/if_.h +f6618d0224159bfc48c1df1d83828d68 *include/Rcpp/traits/init_type.h +569027e71fdb2bda19c8184a12d08762 *include/Rcpp/traits/integral_constant.h +77534bb63952ddf18c96abc66b5cb2d7 *include/Rcpp/traits/is_arithmetic.h +29571f5642930d175ef873140c776975 *include/Rcpp/traits/is_bool.h +4fa497cea2410fb4e662b866663bc0ac *include/Rcpp/traits/is_const.h +abcb7e2b556b94d82a09a8849a1c1096 *include/Rcpp/traits/is_convertible.h +cd901317f51083b5a6d3f2414fe82607 *include/Rcpp/traits/is_eigen_base.h +7bfb288fca1e46ed6b931500ad42a43d *include/Rcpp/traits/is_finite.h +b7587e1b4122a84038f7a5800b535e8e *include/Rcpp/traits/is_infinite.h +abd4686b93894a8a221f6da4f3bf74f0 *include/Rcpp/traits/is_module_object.h +d97fd982b65ea3d8efc6455b3b1e8102 *include/Rcpp/traits/is_na.h +60122e02e5bb562e557db0c38e17f790 *include/Rcpp/traits/is_nan.h +b4d4b4ecdcc75f7004378d9a4c52c490 *include/Rcpp/traits/is_pointer.h +74d6de2afc81c98a4e34fb368aea6a53 *include/Rcpp/traits/is_primitive.h +2a7ce1cf1b5479b6453c7c28d346bcfa *include/Rcpp/traits/is_reference.h +5e2acd97071b71e05d9b11a3f96387e5 *include/Rcpp/traits/is_sugar_expression.h +28916414af7cdb5b5bf9673bffe3fed8 *include/Rcpp/traits/is_trivial.h +2aa827ff4a611723f8fda7e58c9225d7 *include/Rcpp/traits/is_wide_string.h +d5851783d57175a54f0ce813d3accc01 *include/Rcpp/traits/longlong.h +d2d2d22f014dbda73370de85977494be *include/Rcpp/traits/matrix_interface.h +4165bd63dd3b616e807d730a1909b1d6 *include/Rcpp/traits/module_wrap_traits.h +df92a5456b88f77415691532c9cc8e1f *include/Rcpp/traits/named_object.h +e9717cf30ad078a3722702d54d744b11 *include/Rcpp/traits/num2type.h +fda43f65172234cb8e672b725ff21dc3 *include/Rcpp/traits/one_type.h +3ab68cc3b397346dde5c071d6b1dc2ca *include/Rcpp/traits/r_sexptype_traits.h +5bc497b1de2c051a3fb5e68e2d9d429b *include/Rcpp/traits/r_type_traits.h +2c55008e8515714263346d6c3cdeb35c *include/Rcpp/traits/remove_const.h +0830e491fc6a03ab6c735a215fa70ee0 *include/Rcpp/traits/remove_const_and_reference.h +49e7441fad045085e944a89c2b6d2f14 *include/Rcpp/traits/remove_reference.h +f97d07869949020279d1cef6ccb03abd *include/Rcpp/traits/result_of.h +10df0fad7bfeca54513814e89fd28d60 *include/Rcpp/traits/same_type.h +9091fcb005196d81ed41c6a89550e89a *include/Rcpp/traits/storage_type.h +6ffcd9b3ae200cb9f82bf43df519f3a4 *include/Rcpp/traits/traits.h +3d6fc7e388a23053d99a353535ae1275 *include/Rcpp/traits/un_pointer.h +05cbea355adce5b3921828e263fbf87d *include/Rcpp/traits/wrap_type_traits.h +2b15f8d9556718b58864deb05cba5afe *include/Rcpp/unwindProtect.h +4f9f79e3346010125c9659ebd7ad34db *include/Rcpp/utils/tinyformat.h +dedbf46dfae724476eedb59622b6c0be *include/Rcpp/utils/tinyformat/tinyformat.h +89a07678f678cfb48de4bd3d4420ea64 *include/Rcpp/vector/00_forward_Vector.h +4fe970f8b2608fb97026142528d21518 *include/Rcpp/vector/00_forward_proxy.h +411c3c52a0011d4fdd9392637172a97d *include/Rcpp/vector/ChildVector.h +d4c4878eede03e50c776afcf7836fc7a *include/Rcpp/vector/DimNameProxy.h +47f675c64171ec8e4072036d972aad4f *include/Rcpp/vector/LazyVector.h +020c11693ef729783f6ce9c70e0b3a86 *include/Rcpp/vector/ListOf.h +bd73507d75d9178924fc00b70b1f6f55 *include/Rcpp/vector/Matrix.h +a6c5cdec475185adc2b61152bc9379de *include/Rcpp/vector/MatrixBase.h +3a7e583f12436fd76a2329bbdc604507 *include/Rcpp/vector/MatrixColumn.h +2001eb2ae77a9601cb236e760b20ff4c *include/Rcpp/vector/MatrixRow.h +dabec153dcf826b040e592e1c60fc37f *include/Rcpp/vector/RangeIndexer.h +c71d7fdd2ecbadeff8068998d3501c5c *include/Rcpp/vector/SubMatrix.h +d82ab8c34035edc7ac37af4d619406cc *include/Rcpp/vector/Subsetter.h +25b4cdae0a3c88788551fac10d73c797 *include/Rcpp/vector/Vector.h +99dc1e7a939e6f11ec33588c382517cd *include/Rcpp/vector/VectorBase.h +0c3ff20020b3ff5248826ff796752946 *include/Rcpp/vector/const_generic_proxy.h +c76a4bfbaf1c61171799f258f6393ea4 *include/Rcpp/vector/const_string_proxy.h +82421a927c857b34a028774399518289 *include/Rcpp/vector/converter.h +fe60090372703d0fd887c32e45f944a3 *include/Rcpp/vector/generic_proxy.h +026adf34a827731798dbf3b6c3159421 *include/Rcpp/vector/instantiation.h +8bfaa9746b1126a74324cab8b5170439 *include/Rcpp/vector/no_init.h +84dbe92383dc935b5576814fd6937418 *include/Rcpp/vector/proxy.h +86af06f9720947eaa083c4fa9bc11289 *include/Rcpp/vector/string_proxy.h +07c9204ef548fd66d5e42ff84cf1da09 *include/Rcpp/vector/swap.h +671bf25ba62a315729da938f1c0184bc *include/Rcpp/vector/traits.h +b53a80ae2aa1de12e8bd0fbff69c904b *include/Rcpp/vector/vector_from_string.h +59452eca17fff2736ddd8c05fe1fc500 *include/RcppCommon.h +83051c918c676565c50377280f3d80a9 *include/doxygen/Examples.h +b57340e2fb6cfc8411f7dba6f8235f5e *libs/x64/Rcpp.dll +74922732c7edf1ebed75058264169e9a *libs/x64/symbols.rds +fc570e7927219c2ed9bdb13ca05134d9 *prompt/module.Rd +e78047bdda3db5af33456370e65a98d0 *skeleton/Num.cpp +ceccb01282e3e574aa78fec0102df6da *skeleton/Rcpp_modules_examples.Rd +519be498e2f048a2750863a147964737 *skeleton/manual-page-stub.Rd +411d02aaf3c409722bf6a39a4a4ffa90 *skeleton/rcpp_hello_world.R +736db59264020d28cb1870868cfa916b *skeleton/rcpp_hello_world.Rd +329380236bdae3a32e349531c0ee2d54 *skeleton/rcpp_hello_world.cpp +2c1227dd8097d9fca8040f3d29f59633 *skeleton/rcpp_hello_world.h +0da63b615f705aa9dfa2e91b15a0ec3a *skeleton/rcpp_hello_world_attributes.cpp +9cbc66836028cfab4df53c8e1c4ccbf5 *skeleton/rcpp_module.cpp +87e64fbfae8826697bdfd1020d2b2641 *skeleton/stdVector.cpp +32a99eb2d472350734277940a2e2a1bb *skeleton/zzz.R +7fb9967c5d48052f8dc6167b1ee619d3 *tinytest/bin/amd64/r-cran-testrcpppackage_0.1.0-1_amd64.deb +56b8f712e86e0113715ead494065346e *tinytest/bin/i386/r-cran-testrcpppackage_0.1.0-1_i386.deb +08aa53008c9d0b88446c534cbf91a165 *tinytest/cpp/DataFrame.cpp +caded512e0425b790380edddc00967f4 *tinytest/cpp/Environment.cpp +378c5ca02f76666d28abc7f0f0bbb82a *tinytest/cpp/Exceptions_nocall.cpp +b81bf018da788eadaf8f101144e1841b *tinytest/cpp/Function.cpp +8469685bd02cea093f7fa44128b1af31 *tinytest/cpp/InternalFunction.cpp +a9b57d92bffc646ac6f074c98c81db6e *tinytest/cpp/InternalFunctionCPP11.cpp +62bd3687f6fae5f022287932343b34b0 *tinytest/cpp/ListOf.cpp +4592f91b2ff1a6cea2125115ce8f75e4 *tinytest/cpp/Matrix.cpp +c171e3f43d4293bcfb4341cdc1c2bd29 *tinytest/cpp/Module.cpp +ae344d14e4a2711ff2462d02ac0baa78 *tinytest/cpp/RObject.cpp +83bb109ce6845fbdb08a732527556ff1 *tinytest/cpp/Reference.cpp +431733375a744f92c308b95f9d402f42 *tinytest/cpp/S4.cpp +239bf07c23051fc0318de2f80e95385c *tinytest/cpp/String.cpp +bf2f556311ef8884928d6db63fccf112 *tinytest/cpp/Subset.cpp +83aac83aff61967c16d00935b96700f2 *tinytest/cpp/Vector.cpp +2834dfe1270c0e1cc24aba14721c09da *tinytest/cpp/VectorOld.cpp +aa3497bfcf9b9d14f35e9558a19fc1b4 *tinytest/cpp/XPtr.cpp +d19479e6aab83b12124389782f4bf739 *tinytest/cpp/algorithm.cpp +219e1d71106fb3bb1253ce60affbb398 *tinytest/cpp/as.cpp +12c4f9c7f7323095f118fc9c11ace5da *tinytest/cpp/attributes.cpp +7dd5700e27b702cba4cede554cdb65ba *tinytest/cpp/attributes.hpp +fdf3557dcb7e7fbaa37afcbfaba4b088 *tinytest/cpp/coerce.cpp +b126529d2903ea6eb82caa799e1162c3 *tinytest/cpp/dates.cpp +9c81ac1fb25a970b84e543aef34d6cde *tinytest/cpp/dispatch.cpp +385abbb997641176de511ef784b87b45 *tinytest/cpp/embeddedR.cpp +3142234408f0d17bb7edd2238f6beb78 *tinytest/cpp/embeddedR2.cpp +4e6b3693278fd9c33e5fc7724e268fa8 *tinytest/cpp/exceptions.cpp +39b2883e8175beaaa6a6430a71378398 *tinytest/cpp/language.cpp +cdd742bd240621d7e33ecf4818691e66 *tinytest/cpp/misc.cpp +31eb0032506e988316357913ffc28dee *tinytest/cpp/modref.cpp +705309cd5376196a486d14c73f76ba29 *tinytest/cpp/na.cpp +05a686ca3070780f8dcb1a1de321797e *tinytest/cpp/rcppversion.cpp +511f2da216d7480c3bd4b50d48983799 *tinytest/cpp/rmath.cpp +c7bb688561ccc8a9039413782640be7e *tinytest/cpp/stack.cpp +37f1770bce35bf5f2c6a523d42e1ea75 *tinytest/cpp/stats.cpp +be7f344d4bd516f6d69d7107dfb88659 *tinytest/cpp/sugar.cpp +956e39fb6eb566987b3130a85b4da3c6 *tinytest/cpp/support.cpp +c8a357d67dd56b672cd7616e7bbbf520 *tinytest/cpp/table.cpp +ba3dad0e41bbd4c0b1a74f550e8247f2 *tinytest/cpp/wrap.cpp +2db3a044a68e8cf5d76a9a1473dee526 *tinytest/cpp/wstring.cpp +54073056db0ba60cf0b1707c4b6db85c *tinytest/src/r-cran-testrcpppackage_0.1.0-1.diff.gz +1d2156181f8816c31306d77f4760697c *tinytest/src/r-cran-testrcpppackage_0.1.0-1.dsc +18c540b0b12feac586f57f2411ed378e *tinytest/src/r-cran-testrcpppackage_0.1.0-1_amd64.changes +7fb9967c5d48052f8dc6167b1ee619d3 *tinytest/src/r-cran-testrcpppackage_0.1.0-1_amd64.deb +84ddc3de28ce0c458d6f19f91bc1710d *tinytest/src/r-cran-testrcpppackage_0.1.0-1_i386.changes +56b8f712e86e0113715ead494065346e *tinytest/src/r-cran-testrcpppackage_0.1.0-1_i386.deb +7263661801b44d075a3345ff4a1faffa *tinytest/testRcppAttributePackage/DESCRIPTION +f06e063ca806e7fca22eb7482b2af2d1 *tinytest/testRcppAttributePackage/NAMESPACE +c694664176af9bd21deb0248fdddbe7e *tinytest/testRcppAttributePackage/src/rcpp_test.cpp +1a5f53d4b6ba9e3b98fe1eec48a5eb9b *tinytest/testRcppClass/DESCRIPTION +f926317ac3486e08433a0fbdf3153efe *tinytest/testRcppClass/NAMESPACE +03f336c9faea79524a608b9dd1d22a92 *tinytest/testRcppClass/R/load.R +ec8250809d340e191fbf0b04c344fe00 *tinytest/testRcppClass/R/rcpp_hello_world.R +60b39ca81dc918e7fe8a0c4737079396 *tinytest/testRcppClass/man/Rcpp_class_examples.Rd +736db59264020d28cb1870868cfa916b *tinytest/testRcppClass/man/rcpp_hello_world.Rd +fe2b352c0aa449acae8ae667b82aebb9 *tinytest/testRcppClass/man/testRcppClass-package.Rd +5b71e6b5e64bc8418e6b9adf26c09cc8 *tinytest/testRcppClass/src/Num.cpp +2d584977e96934c0bdae19cef07e3e74 *tinytest/testRcppClass/src/init.c +5e17501af84c7deb94e69c8c48abc6dc *tinytest/testRcppClass/src/rcpp_hello_world.cpp +5c03d3d1426cf6886a0f6f6c412bb456 *tinytest/testRcppClass/src/rcpp_hello_world.h +0abb0d55f1edc5ddb19ca87ed5c370f1 *tinytest/testRcppClass/src/rcpp_module.cpp +3326bf4e52a561d08f9aa1370333222b *tinytest/testRcppClass/src/stdVector.cpp +f369e8eabd84792764737850dc9cf599 *tinytest/testRcppClass/tests/classes.R +55a2cc182d8bdab7df8367bb2c9ae4f1 *tinytest/testRcppInterfaceExporter/DESCRIPTION +caccac1441b38bc3b9d91f9e189b1d68 *tinytest/testRcppInterfaceExporter/NAMESPACE +cf3fc9dfc4a7d7e88dd0bcc32220fee3 *tinytest/testRcppInterfaceExporter/R/RcppExports.R +f9c87d177bece784bca40b2294329568 *tinytest/testRcppInterfaceExporter/R/exporter.R +cdb9489e21b94623f0f1e7d4af8ec157 *tinytest/testRcppInterfaceExporter/inst/include/testRcppInterfaceExporter.h +1cbd306e27aed3fcb7b5fbc34d42b39d *tinytest/testRcppInterfaceExporter/inst/include/testRcppInterfaceExporter_RcppExports.h +5f0d00b4fa5ddc900e41058abf3f92ef *tinytest/testRcppInterfaceExporter/src/RcppExports.cpp +0805a3830147dedf4a37a91f9ad66a4d *tinytest/testRcppInterfaceExporter/src/exporter.cpp +53dfff77ccb443103f44fb52eea3187b *tinytest/testRcppInterfaceExporter/src/unwound.h +d4ceb27b690d25e3bf791340e1082ede *tinytest/testRcppInterfaceUser/DESCRIPTION +98aef5f5fafb61bfb9c2e3687ea7cd74 *tinytest/testRcppInterfaceUser/NAMESPACE +a7632eb2a8e768dc6305ac25e4d1c666 *tinytest/testRcppInterfaceUser/R/user.R +d41d8cd98f00b204e9800998ecf8427e *tinytest/testRcppInterfaceUser/src/config.h +a195376bccd32edf2ec234585cdd19f1 *tinytest/testRcppInterfaceUser/src/unwound.h +44a229bee1d2fd44365e82d64aff2e23 *tinytest/testRcppInterfaceUser/src/user.cpp +c0e76426243757398223031c7c4c46b0 *tinytest/testRcppInterfaceUser/tests/tests.R +fb4466d7edc9f03ab23dc0d557e49145 *tinytest/testRcppModule/DESCRIPTION +add4aaed2d306765ce493922461f3a55 *tinytest/testRcppModule/NAMESPACE +bd40b50ea592b9c3c0cfe79de3f6eb1d *tinytest/testRcppModule/R/rcpp_hello_world.R +81dadeb632a55b8ce2ad71cf37d2c1ce *tinytest/testRcppModule/R/zzz.R +0371f14c3812cd1a564488ca96b11ca2 *tinytest/testRcppModule/man/Rcpp_modules_examples.Rd +2deeefcb97dc4727ba42f47594ad3be8 *tinytest/testRcppModule/man/rcpp_hello_world.Rd +079d3f03a16107fd9ef8fe40b6175a9e *tinytest/testRcppModule/man/testRcppModule-package.Rd +1999f8a3ad18e75c899c980902146d80 *tinytest/testRcppModule/src/Num.cpp +d1c8b83cdba82518ad248f4612e22802 *tinytest/testRcppModule/src/init.c +5e17501af84c7deb94e69c8c48abc6dc *tinytest/testRcppModule/src/rcpp_hello_world.cpp +5c03d3d1426cf6886a0f6f6c412bb456 *tinytest/testRcppModule/src/rcpp_hello_world.h +30f4072a33ca51c385cba14d8c41e7fc *tinytest/testRcppModule/src/rcpp_module.cpp +974ce7cbf35e70ee51ee2f338d1a47ed *tinytest/testRcppModule/src/stdVector.cpp +af70d56c91a91ed55fc4da6c1f8b7ca5 *tinytest/testRcppModule/tests/modules.R +c83d5e7e43bdf9d149e62f8717facf73 *tinytest/testRcppPackage/DESCRIPTION +f46e0bbc90d649eaed05e1a1f953645d *tinytest/testRcppPackage/NAMESPACE +86700d82a2395c2d7c34f21ffb7dcaa4 *tinytest/testRcppPackage/R/rcpp_hello_world.R +8a4012c68853de0e7ddd4ec8dd3ef9da *tinytest/testRcppPackage/man/testRcppPackage-package.Rd +c980624db12b714ac2ec6bb7740c3030 *tinytest/testRcppPackage/src/rcpp_hello_world.cpp +3fc7d87c655d7c58790b18dadbf17462 *tinytest/testRcppPackage/src/rcpp_hello_world.h +d4d4b13e8e48f3d2dff079fa0cae4db2 *tinytest/test_algorithm.R +d43f4463ec22a001f10f70e5968b741e *tinytest/test_as.R +300fea4f491bc883fc8cf14cbf415e19 *tinytest/test_attribute_package.R +6fafd86f9d6036ddeec256f6520940fb *tinytest/test_attributes.R +645c61b59b44cf4a7d0a8935c94f30b8 *tinytest/test_binary_package.R +5c61d77db502333de43ef63ab5542947 *tinytest/test_client_package.R +6972e7398a0316ee9378d0235a98193e *tinytest/test_coerce.R +f848412bd201674571166f59141ead32 *tinytest/test_dataframe.R +f45441d68b2e1de3f59da4f83e222e6e *tinytest/test_date.R +f7020772ec2f52bca37aa52f328e8a4a *tinytest/test_dispatch.R +37c878dba3a8c6ee4a512d8ae49d0510 *tinytest/test_embedded_r.R +0bfe887104fa049afec792eb9e1d38ee *tinytest/test_environments.R +8d0384378c1530ae2651ed30077c3849 *tinytest/test_exceptions.R +d6b632cbcf1d0d2a809789a850393f04 *tinytest/test_exceptions_nocall.R +fb2c4e13c8c9b275e0dedd8b115032fb *tinytest/test_expose_class.R +2659ca40245f5942186d612cc050290e *tinytest/test_function.R +a979bf54492367431865c051efc150ca *tinytest/test_global_rostream.R +f98648470bc21b3fdbb3176e90f45129 *tinytest/test_interface.R +9fcdc77199f2adc16ddaab74ede5c15f *tinytest/test_internal_function.R +b1ec64c8809b5017cc83db4e63bb23e7 *tinytest/test_internal_function_cpp11.R +9be9c45f22b52977dfe322b18090e25a *tinytest/test_language.R +f3df4a9477700c9773503b0d72cb9f38 *tinytest/test_listof.R +642a072d490f3adf9ad7ccdc0b583c8c *tinytest/test_matrix.R +d820e9d99c8361bb9bcdff1df8748415 *tinytest/test_misc.R +3b74e9c0f70c24ec455b8325bd575ad1 *tinytest/test_modref.R +9f5d7a561daeacc250b8247c613031f4 *tinytest/test_module.R +4f1cb95ff3231714571275b5f60c21cc *tinytest/test_module_client_package.R +8fa4cb9335b9239ffce495337cbbe4b4 *tinytest/test_na.R +9f24ff45b6de5029cec235af1f643655 *tinytest/test_packageversion.R +50ac8801171cadb6ce7535680e3d7b4b *tinytest/test_quickanddirty.R +3e6d62cfbaa5aa087b4abde938e30ce4 *tinytest/test_rcpp_package_skeleton.R +12824f997493028fb75fb416fb4899bd *tinytest/test_reference.R +bf9528a41d909d19eda20947fe73d042 *tinytest/test_rmath.R +23cccaef77d1c7188a384e5e6400505e *tinytest/test_robject.R +ec2b5b9cab31cafb4b2cbdef00cd89e3 *tinytest/test_s4.R +0bd9a05a2ebcfc708aed3911d21a6dc7 *tinytest/test_stack.R +f0418bc8a48a4cd9b7819af6bad997ff *tinytest/test_stats.R +d164383dd85501e99acb936ee66210a7 *tinytest/test_string.R +3d9e890abd6a080315b84b99d6ed3843 *tinytest/test_subset.R +c562070a11cc7aadeb7efe23487e0b30 *tinytest/test_sugar.R +eea3406aec4fe65cae71db5baa9a0b51 *tinytest/test_sugar_var.R +46dcee8e76f26d5103efa5ad09441892 *tinytest/test_support.R +9a97f20a6edeb3f2d7184ed909f70958 *tinytest/test_system.R +44d3b675e624e692463ae9e9fe2776d0 *tinytest/test_table.R +25e2edab5fe1be72bd44e24d30fc59a1 *tinytest/test_vector.R +6a724a81b5a9281e7777b16ada40ac39 *tinytest/test_vector_old.R +6867abc5b68b7caa2b5920f67b4b6990 *tinytest/test_wrap.R +daae893ce0886eccb852f34104884837 *tinytest/test_wstring.R +141b15c12251e16fbd4901fd75e0659b *tinytest/test_xptr.R diff --git a/revdep/library/sprtt/new/Rcpp/NAMESPACE b/revdep/library/sprtt/new/Rcpp/NAMESPACE new file mode 100644 index 0000000..45a07c5 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/NAMESPACE @@ -0,0 +1,42 @@ +useDynLib(Rcpp, .registration = TRUE) + +import(methods) +importFrom(utils, capture.output, assignInNamespace, .DollarNames, prompt, + packageDescription, package.skeleton, glob2rx) + +exportClasses(Module, "C++Field", + "C++OverloadedMethods", + "C++Constructor", + "C++Class", "C++Object", "C++Function") + +S3method(.DollarNames, "C++Object") +S3method(.DollarNames, "Module") +exportMethods(prompt, show, .DollarNames, initialize, "formals<-") + +export(Module, + Rcpp.package.skeleton, + populate, + loadRcppModules, # deprecated since Rcpp 0.12.5 released May 2016 + setRcppClass, + loadRcppClass, + loadModule, + cppFunction, + exposeClass, + evalCpp, + sourceCpp, + compileAttributes, + registerPlugin, + RcppLdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018 + LdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018 + demangle, + sizeof, + cpp_object_initializer, + cpp_object_dummy, + Rcpp.plugin.maker, + getRcppVersion + ) +S3method(print, bytes) +S3method(format, Rcpp_stack_trace) +S3method(str, Rcpp_stack_trace) +S3method(print, Rcpp_stack_trace) +exportClass(RcppClass) diff --git a/revdep/library/sprtt/new/Rcpp/NEWS.Rd b/revdep/library/sprtt/new/Rcpp/NEWS.Rd new file mode 100644 index 0000000..22f0b7a --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/NEWS.Rd @@ -0,0 +1,2934 @@ +\name{NEWS} +\title{News for Package \pkg{Rcpp}} +\newcommand{\ghpr}{\href{https://github.com/RcppCore/Rcpp/pull/#1}{##1}} +\newcommand{\ghit}{\href{https://github.com/RcppCore/Rcpp/issues/#1}{##1}} + +\section{Changes in Rcpp release version 1.0.10 (2023-01-12)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Unwind protection is enabled by default (Iñaki in \ghpr{1225}). + It can be disabled by defining \code{RCPP_NO_UNWIND_PROTECT} before + including \code{Rcpp.h}. \code{RCPP_USE_UNWIND_PROTECT} is not checked + anymore and has no effect. The associated plugin \code{unwindProtect} + is therefore deprecated and will be removed in a future release. + \item The 'finalize' method for Rcpp Modules is now eagerly materialized, + fixing an issue where errors can occur when Module finalizers are run + (Kevin in \ghpr{1231} closing \ghit{1230}). + \item Zero-row \code{data.frame} objects can receive \code{push_back} + or \code{push_front} (Dirk in \ghpr{1233} fixing \ghit{1232}). + \item One remaining \code{sprintf} has been replaced by + \code{snprintf} (Dirk and Kevin in \ghpr{1236} and \ghpr{1237}). + \item Several conversion warnings found by \code{clang++} have been + addressed (Dirk in \ghpr{1240} and \ghpr{1241}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item The C++20, C++2b (experimental) and C++23 standards now have + plugin support like the other C++ standards (Dirk in \ghpr{1228}). + \item The source path for attributes received one more protection + from spaces (Dirk in \ghpr{1235} addressing \ghit{1234}). + } + \item Changes in Rcpp Deployment: + \itemize{ + \item Several GitHub Actions have been updated. + } + } +} + +\section{Changes in Rcpp hotfix release version 1.0.9 (2022-07-02)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Accomodate C++98 compilation by adjusting attributes.cpp (Dirk in + \ghpr{1193} fixing \ghit{1192}) + \item Accomodate newest compilers replacing deprecated + \code{std::unary_function} and \code{std::binary_function} with + \code{std::function} (Dirk in \ghpr{1202} fixing \ghit{1201} and + CRAN request) + \item Upon removal from precious list, the tag is set to null + (Iñaki in \ghpr{1205} fixing \ghit{1203}) + \item Move constructor and assignment for strings have been added + (Dean Scarff in \ghpr{1219}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item Adjust one overflowing column (Bill Denney in \ghpr{1196} fixing + \ghit{1195}) + \item Correct a typo in the FAQ (Marco Colombo in \ghpr{1217}) + } + \item Changes in Rcpp Deployment: + \itemize{ + \item Accomodate four digit version numbers in unit test (Dirk) + \item Do not run complete test suite to limit test time to CRAN + preference (Dirk in \ghpr{1206}) + \item Small updates to the CI test containers have been made + \item Some of changes also applied to an interim release + 1.0.8.3 made for CRAN on 2022-03-14. + } + } +} + +\section{Changes in Rcpp release version 1.0.8 (2022-01-11)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item \code{STRICT_R_HEADERS} is now enabled by default, see + extensive discussion in \ghit{1158} closing \ghit{898}. + \item A new \code{#define} allows default setting of finalizer + calls for external pointers (Iñaki in \ghpr{1180} closing \ghit{1108}). + \item \code{Rcpp:::CxxFlags()} now quotes the include path generated, + (Kevin in \ghpr{1189} closing \ghit{1188}). + \item New header files \code{Rcpp/Light}, \code{Rcpp/Lighter}, + \code{Rcpp/Lightest} and default \code{Rcpp/Rcpp} for fine-grained + access to features (and compilation time) (Dirk \ghpr{1191} + addressing \ghpr{1168}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item A new option \code{signature} allows customization of + function signatures (Travers Ching in \ghpr{1184} and \ghpr{1187} fixing + \ghit{1182}) + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The Rcpp FAQ has a new entry on how \emph{not} to grow a vector + (Dirk in \ghpr{1167}). + \item Some long-spurious calls to \code{RNGSope} have been removed + from examples (Dirk in \ghpr{1173} closing \ghit{1172}). + \item DOI reference in the bibtex files have been updated per JSS + request (Dirk in \ghpr{1186}). + } + \item Changes in Rcpp Deployment: + \itemize{ + \item Some continuous integration components have been updated + (Dirk in \ghpr{1174}, \ghpr{1181}, and \ghpr{1190}). + } + } +} + +\section{Changes in Rcpp release version 1.0.7 (2021-07-06)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Refactored \code{Rcpp_PreserveObject} and \code{Rcpp_ReleaseObject} + which are now O(1) (Dirk and Iñaki in \ghpr{1133} and \ghpr{1135} + fixing \ghit{382} and \ghit{1081}). + \item A spuriously assigned variable was removed (Dirk in + \ghpr{1138} fixing \ghit{1137}). + \item Global \code{Rcout} and \code{Rcerr} objects are supported + via a compiler directive (Iñaki in \ghpr{1139} fixing \ghit{928}) + \item Add support for \code{Rcpp::message} (Dirk in \ghpr{1146} + fixing \ghit{1145}). + \item The \code{uint32_t} type is used throughout instead of + \code{unsigned int} (Dirk in \ghpr{1153} fixing \ghit{1152}). + \item The \code{cfloat} header for floating point limits is now + included (Dirk in \ghpr{1162} fixing \ghit{1161}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Packages with dots in their name can now have per-package + include files (Dirk in \ghpr{1132} fixing \ghit{1129}). + \item New argument \code{echo} to quieten optional evaluation in + \code{sourceCpp} (Dirk in \ghpr{1138} fixing \ghit{1126}). + } + \item Forthcoming Changes in Rcpp API: + \itemize{ + \item Starting with Rcpp 1.0.8 anticipated in January 2022, + \code{STRICT_R_HEADERS} will be enabled by default, see \ghit{1126}. + } + } +} + +\section{Changes in Rcpp release version 1.0.6 (2021-01-14)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Replace remaining few uses of \code{EXTPTR_PTR} with + \code{R_ExternalPtrAddr} (Kevin in \ghpr{1098} fixing + \ghit{1097}). + \item Add \code{push_back} and \code{push_front} for + \code{DataFrame} (Walter Somerville in \ghpr{1099} fixing + \ghit{1094}). + \item Remove a misleading-to-wrong comment (Mattias Ellert in + \ghpr{1109} cleaning up after \ghpr{1049}). + \item Address a sanitizer report by initializing two private + \code{bool} variables (Benjamin Christoffersen in \ghpr{1113}). + \item External pointer finalizer toggle default values were + corrected to true (Dirk in \ghpr{1115}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item Several URLs were updated to https and/or new addresses (Dirk). + } + \item Changes in Rcpp Deployment: + \itemize{ + \item Added GitHub Actions CI using the same container-based setup + used previously, and also carried code coverage over (Dirk in + \ghpr{1128}). + } + \item Changes in Rcpp support functions: + \itemize{ + \item \code{Rcpp.package.skeleton()} avoids warning from R. (Dirk) + } + } +} + +\section{Changes in Rcpp release version 1.0.5 (2020-07-01)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The exception handler code in \ghpr{1043} was updated to ensure + proper include behavior (Kevin in \ghpr{1047} fixing \ghit{1046}). + \item A missing \code{Rcpp_list6} definition was added to support + R 3.3.* builds (Davis Vaughan in \ghpr{1049} fixing \ghit{1048}). + \item Missing \code{Rcpp_list{2,3,4,5}} definition were added to + the Rcpp namespace (Dirk in \ghpr{1054} fixing \ghit{1053}). + \item A further updated corrected the header include and provided + a missing else branch (Mattias Ellert in \ghpr{1055}). + \item Two more assignments are protected with \code{Rcpp::Shield} + (Dirk in \ghpr{1059}). + \item One call to \code{abs} is now properly namespaced with + \code{std::} (Uwe Korn in \ghpr{1069}). + \item String object memory preservation was corrected/simplified + (Kevin in \ghpr{1082}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Empty strings are not passed to \code{R CMD SHLIB} which was + seen with R 4.0.0 on Windows (Kevin in \ghpr{1062} fixing + \ghpr{1061}). + \item The \code{short_file_name()} helper function is safer with + respect to temporaries (Kevin in \ghpr{1067} fixing \ghit{1066}, + and \ghpr{1071} fixing \ghpr{1070}). + } + \item Changes in Rcpp Sugar: + \itemize{ + \item Two \code{sample()} objects are now standard vectors and not + \code{R_alloc} created (Dirk in \ghpr{1075} fixing \ghpr{1074}). + } + \item Changes in Rcpp support functions: + \itemize{ + \item \code{Rcpp.package.skeleton()} adjusts for a (documented) + change in R 4.0.0 (Dirk in \ghpr{1088} fixing \ghpr{1087}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The pdf file of the earlier introduction is again typeset + with bibliographic information (Dirk). + \item A new vignette describing how to package C++ libraries has + been added (Dirk in \ghpr{1078} fixing \ghit{1077}). + } + \item Changes in Rcpp Deployment: + \itemize{ + \item Travis CI unit tests now run a matrix over the versions of R + also tested at CRAN (rel/dev/oldrel/oldoldrel), and coverage runs + in parallel for a net speed-up (Dirk in \ghpr{1056} and + \ghpr{1057}). + \item The exceptions test is now partially skipped on Solaris as + it already is on Windows (Dirk in \ghpr{1065}). + \item The default CI runner was upgraded to R 4.0.0 (Dirk). + \item The CI matrix spans R 3.5, 3.6, r-release and r-devel (Dirk). + } + } +} + +\section{Changes in Rcpp version 1.0.4 (2020-03-13)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Safer \code{Rcpp_list*}, \code{Rcpp_lang*} and + \code{Function.operator()} (Romain in \ghpr{1014}, \ghit{1015}). + \item A number of \code{#nocov} markers were added (Dirk in + \ghpr{1036}, \ghpr{1042} and \ghpr{1044}). + \item Finalizer calls clear external pointer first (Kirill Müller and + Dirk in \ghpr{1038}). + \item Scalar operations with a rhs matrix no longer change the + matrix value (Qiang in \ghpr{1040} fixing (again) \ghit{365}). + \item \code{Rcpp::exception} and \code{Rcpp::stop} are now more + thread-safe (Joshua Pritikin in \ghpr{1043}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item The \code{cppFunction} helper now deals correctly with mulitple + \code{depends} arguments (TJ McKinley in \ghpr{1016} fixing + \ghit{1017}). + \item Invisible return objects are now supported via new option (Kun Ren + in \ghpr{1025} fixing \ghit{1024}). + \item Unavailable packages referred to in \code{LinkingTo} are now + reported (Dirk in \ghpr{1027} fixing \ghit{1026}). + \item The \code{sourceCpp} function can now create a debug DLL on + Windows (Dirk in \ghpr{1037} fixing \ghit{1035}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The \code{.github/} directory now has more explicit guidance on + contributing, issues, and pull requests (Dirk). + \item The Rcpp Attributes vignette describe the new invisible return + object option (Kun Ren in \ghpr{1025}). + \item Vignettes are now included as pre-made pdf files (Dirk in \ghpr{1029}) + \item The Rcpp FAQ has a new entry on the recommended + \code{importFrom} directive (Dirk in \ghpr{1031} fixing \ghit{1030}). + \item The bib file for the vignette was once again updated to + current package versions (Dirk). + } + \item Changes in Rcpp Deployment: + \itemize{ + \item Added unit test to check if C++ version remains remains aligned + with the package number (Dirk in \ghpr{1022} fixing \ghit{1021}). + \item The unit test system was switched to tinytest (Dirk in + \ghpr{1028}, \ghpr{1032}, \ghpr{1033}). + } + } +} + +\section{Changes in Rcpp version 1.0.3 (2019-11-08)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Compilation can be sped up by skipping Modules headers via a + toggle \code{RCPP_NO_MODULES} (Kevin in \ghpr{995} for \ghit{993}). + \item Compilation can be sped up by toggling \code{RCPP_NO_RTTI} which + implies \code{RCPP_NO_MODULES} (Dirk in \ghpr{998} fixing \ghit{997}). + \item \code{XPtr} tags are now preserved in \code{as<>} (Stephen Wade + in \ghpr{1003} fixing \ghit{986}, plus Dirk in \ghpr{1012}). + \item A few more temporary allocations are now protected from garbage + collection (Romain Francois in \ghpr{1010}, and Dirk in \ghpr{1011}). + } + \item Changes in Rcpp Modules: + \itemize{ + \item Improved initialization via explicit \code{Rcpp::} prefix + (Riccardo Porreca in \ghpr{980}). + } + \item Changes in Rcpp Deployment: + \itemize{ + \item A unit test for Rcpp Class exposure was updated to not fail under + r-devel (Dirk in \ghpr{1008} fixing \ghit{1006}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The \code{Rcpp-modules} vignette received a major review and + edit (Riccardo Porreca in \ghpr{982}). + \item Minor whitespace alignments and edits were made in three + vignettes following the new \pkg{pinp} release (Dirk). + \item New badges for DOI and CRAN and BioConductor reverse dependencies + have been added to README.md (Dirk). + \item Vignettes are now included pre-made (Dirk in \ghpr{1005} + addressing \ghit{1004})). + \item The Rcpp FAQ has two new entries on 'no modules / no rtti' and + exceptions across shared libraries (Dirk in \ghpr{1009}). + } + } +} + +\section{Changes in Rcpp version 1.0.2 (2019-07-20)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Files in \code{src/} are now consistentely lowercase (Dirk + in \ghpr{956}). + \item The Rcpp 'API Version' is now accessible via + \code{getRcppVersion()} (Dirk in \ghpr{963}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item The second END wrapper macro also gets \code{UNPROTECT} and + a variable reference suppressing compiler warnings (Dirk in + \ghpr{953} fixing \ghit{951}). + \item Default function arguments are parsed correctly (Pierrick + Roger in \ghpr{977} fixing \ghit{975}) + } + \item Changes in Rcpp Sugar: + \itemize{ + \item Added decreasing parameter to \code{sort_unique()} + (James Balamuta in \ghpr{958} addressing \ghit{950}). + } + \item Changes in Rcpp Deployment: + \itemize{ + \item Travis CI unit tests are now always running irrespective of + the package version (Dirk in \ghpr{954}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The \code{Rcpp-modules} vignette now covers the + \code{RCPP_EXPOSED_*} macros, and the \code{Rcpp-extending} vignette + references it (Ralf Stubner in \ghpr{959} fixing \ghit{952}). + } + } +} + +\section{Changes in Rcpp version 1.0.1 (2019-03-17)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Subsetting is no longer limited by an integer range (William + Nolan in \ghpr{920} fixing \ghit{919}). + \item Error messages from subsetting are now more informative + (Qiang and Dirk). + \item \code{Shelter} increases count only on non-null objects + (Dirk in \ghpr{940} as suggested by Stepan Sindelar in \ghit{935}). + \item \code{AttributeProxy::set()} and a few related setters get + \code{Shield<>} to ensure \code{rchk} is happy (Romain in \ghpr{947} + fixing \ghit{946}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item A new plugin was added for C++20 (Dirk in \ghpr{927}) + \item Fixed an issue where 'stale' symbols could become registered in + RcppExports.cpp, leading to linker errors and other related issues + (Kevin in \ghpr{939} fixing \ghit{733} and \ghit{934}). + \item The wrapper macro gets an \code{UNPROTECT} to ensure \code{rchk} + is happy (Romain in \ghpr{949}) fixing \ghit{948}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item Three small corrections were added in the 'Rcpp Quickref' + vignette (Zhuoer Dong in \ghpr{933} fixing \ghit{932}). + \item The \code{Rcpp-modules} vignette now has documentation for + \code{.factory} (Ralf Stubner in \ghpr{938} fixing \ghit{937}). + } + \item Changes in Rcpp Deployment: + \itemize{ + \item Travis CI again reports to CodeCov.io (Dirk and Ralf Stubner in + \ghpr{942} fixing \ghit{941}). + } + } +} + +\section{Changes in Rcpp version 1.0.0 (2018-11-05)}{ + \itemize{ + \item Happy tenth birthday to Rcpp, and hello release 1.0 ! + \item Changes in Rcpp API: + \itemize{ + \item The empty destructor for the \code{Date} class was removed + to please g++-9 (prerelease) and \code{-Wdeprecated-copy} (Dirk). + \item The constructor for \code{NumericMatrix(not_init(n,k))} was + corrected (Romain in \ghpr{904}, Dirk in \ghpr{905}, and also + Romain in \ghpr{908} fixing \ghpr{907}). + \item \code{Rcpp::String} no longer silently drops embedded + \code{NUL} bytes in strings but throws new Rcpp exception + \code{embedded_nul_in_string}. (Kevin in \ghpr{917} fixing \ghit{916}). + } + \item Changes in Rcpp Deployment: + \itemize{ + \item The Dockerfile for Continuous Integration sets the required + test flag (for release versions) inside the container (Dirk). + \item Correct the \code{R CMD check} call to skip vignettes (Dirk). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item A new \code{[[Rcpp::init]]} attribute allows function + registration for running on package initialization (JJ in + \ghpr{903}). + \item Sort the files scanned for attributes in the C locale for + stable output across systems (JJ in \ghpr{912}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The 'Rcpp Extending' vignette was corrected and refers to + \code{EXPOSED} rather than \code{EXPORTED} (Ralf Stubner in + \ghpr{910}). + \item The 'Unit test' vignette is no longer included (Dirk in + \ghpr{914}). + } + } +} + +\section{Changes in Rcpp version 0.12.19 (2018-09-20)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The \code{no_init()} accessor for vectors and matrices is + now wrapped in \code{Shield<>()} to not trigger \code{rchk} + warnings (Kirill Müller in \ghpr{893} addressing \ghit{892}). + \item \code{STRICT_R_HEADERS} will be defined twelve months from + now; until then we protect it via \code{RCPP_NO_STRICT_HEADERS} + which can then be used to avoid the definition; downstream + maintainers are encouraged to update their packages as needed + (Dirk in \ghpr{900} beginning to address \ghit{898}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Added \code{[[Rcpp::init]]} attribute for registering C++ + functions to run during package initialization (JJ in \ghpr{903} + addressing \ghit{902}). + } + \item Changes in Rcpp Modules: + \itemize{ + \item Improved \code{exposeClass} functionality along with added + test (Martin Lysy in \ghpr{886} fixing \ghit{879}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item Two typos were fixed in the Rcpp Sugar vignette (Patrick + Miller in \ghpr{895}). + \item Several vignettes now use the \code{collapse} argument to + show output in the corresponding code block. + } + \item Changes in Rcpp Deployment: + \itemize{ + \item The old \code{LdFlags()} build helper was marked as + deprecated [but removed for release] (Dirk in \ghpr{887}). + \item Dockerfiles for continuous integration, standard deployment + and 'plus sized' deployment are provided along with builds + (Dirk in \ghpr{894}). + \item Travis CI now use the \code{rcpp/ci} container for tests + (Dirk in \ghpr{896}). + } + } +} + +\section{Changes in Rcpp version 0.12.18 (2018-07-21)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The \code{StringProxy::operator==} is now \code{const} + correct (Romain in \ghpr{855} fixing \ghit{854}). + \item The \code{Environment::new_child()} is now \code{const} + (Romain in \ghpr{858} fixing \ghit{854}). + \item Next \code{eval} codes now properly unwind (Lionel in the large + and careful \ghpr{859} fixing \ghit{807}). + \item In debugging mode, more type information is shown on + \code{abort()} (Jack Wasey in \ghpr{860} and \ghpr{882} fixing + \ghit{857}). + \item A new class was added which allow suspension of the RNG + synchronisation to address an issue seen in \CRANpkg{RcppDE} + (Kevin in \ghpr{862}). + \item Evaluation calls now happen in the \code{base} environment + (which may fix an issue seen between \CRANpkg{conflicted} and some + BioConductor packages) (Kevin in \ghpr{863} fixing \ghit{861}). + \item Call stack display on error can now be controlled more + finely (Romain in \ghpr{868}). + \item The new \code{Rcpp_fast_eval} is used instead of + \code{Rcpp_eval} though this still requires setting + \code{RCPP_USE_UNWIND_PROTECT} before including \code{Rcpp.h} (Qiang + Kou in \ghpr{867} closing \ghit{866}). + \item The \code{Rcpp::unwindProtect()} function extracts the + unwinding from the \code{Rcpp_fast_eval()} function and makes it + more generally available. (Lionel in \ghpr{873} and \ghpr{877}). + \item The \code{tm_gmtoff} part is skipped on AIX too + (\ghpr{876}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item The \code{sourceCpp()} function now evaluates R code in the + correct local environment in which a function was compiled (Filip + Schouwenaars in \ghpr{852} and \ghpr{869} fixing \ghit{851}). + \item Filenames are now sorted in a case-insenstive way so that + the \code{RcppExports} files are more stable across locales (Jack + Wasey in \ghpr{878}). + } + \item Changes in Rcpp Sugar: + \itemize{ + \item The sugar functions \code{min} and \code{max} now recognise + empty vectors (Dirk in \ghpr{884} fixing \ghit{883}). + } + } +} + + +\section{Changes in Rcpp version 0.12.17 (2018-05-09)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The random number \code{Generator} class no longer inherits from + \code{RNGScope} (Kevin in \ghpr{837} fixing \ghit{836}). + \item A new class, \code{SuspendRNGSynchronizationScope}, can be created + and used to ensure that calls to Rcpp functions do not attempt to call + \code{::GetRNGstate()} or \code{::PutRNGstate()} for the duration of + some code block. + \item A spurious parenthesis was removed to please gcc8 (Dirk + fixing \ghit{841}) + \item The optional \code{Timer} class header now undefines + \code{FALSE} which was seen to have side-effects on some platforms + (Romain in \ghpr{847} fixing \ghpr{846}). + \item Optional \code{StoragePolicy} attributes now also work for + string vectors (Romain in \ghpr{850} fixing \ghit{849}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item A few old typesetting conventions from the prior Rnw format + have been corrected (Peter Hickey in \ghpr{831}; Joris Meys; Dirk) + \item Two internal links to the introduction published in JSS have been + updated to the changed filename given the newer TAS introduction. + \item Some remaining backticks were replaced with straight quotes + (Ralf Stubner in \ghpr{845}). + \item A citation to the Rcpp introducion in the The American + Statistician has been added to the introductory and FAQ vignettes. + } + } +} + +\section{Changes in Rcpp version 0.12.16 (2018-03-08)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Rcpp now sets and puts the RNG state upon each entry to an Rcpp + function, ensuring that nested invocations of Rcpp functions manage the + RNG state as expected (Kevin in \ghpr{825} addressing \ghit{823}). + \item The \code{R::pythag} wrapper has been commented out; the underlying + function has been gone from R since 2.14.0, and \code{::hypot()} (part of + C99) is now used unconditionally for complex numbers (Dirk in \ghpr{826}). + \item The \code{long long} type can now be used on 64-bit Windows (Kevin + in \ghpr{811} and again in \ghpr{829} addressing \ghit{804}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Code generated with \code{cppFunction()} now uses \code{.Call()} + directly (Kirill Müller in \ghpr{813} addressing \ghit{795}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The Rcpp FAQ vignette is now indexed as `Rcpp-FAQ`; a stale Gmane + reference was removed and entry for getting compilers under Conda was added. + \item The top-level README.md now has a \emph{Support} section. + \item The Rcpp.bib reference file was refreshed to current versions. + } + } +} + +\section{Changes in Rcpp version 0.12.15 (2018-01-16)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Calls from exception handling to \code{Rf_warning()} now correctly + set an initial format string (Dirk in \ghpr{777} fixing \ghit{776}). + \item The 'new' Date and Datetime vectors now have \code{is_na} methods + too. (Dirk in \ghpr{783} fixing \ghit{781}). + \item Protect more temporary \code{SEXP} objects produced by \code{wrap} + (Kevin in \ghpr{784}). + \item Use public R APIs for \code{new_env} (Kevin in \ghpr{785}). + \item Evaluation of R code is now safer when compiled against R + 3.5 (you also need to explicitly define \code{RCPP_USE_UNWIND_PROTECT} + before including \code{Rcpp.h}). Longjumps of all kinds (condition + catching, returns, restarts, debugger exit) are appropriately + detected and handled, e.g. the C++ stack unwinds correctly + (Lionel in \ghpr{789}). [ Committed but subsequently disabled in release + 0.12.15 ] + \item The new function \code{Rcpp_fast_eval()} can be used for + performance-sensitive evaluation of R code. Unlike + \code{Rcpp_eval()}, it does not try to catch errors with + \code{tryEval} in order to avoid the catching overhead. While this + is safe thanks to the stack unwinding protection, this also means + that R errors are not transformed to an \code{Rcpp::exception}. If + you are relying on error rethrowing, you have to use the slower + \code{Rcpp_eval()}. On old R versions \code{Rcpp_fast_eval()} + falls back to \code{Rcpp_eval()} so it is safe to use against any + versions of R (Lionel in \ghpr{789}). [ Committed but subsequently + disabled in release 0.12.15 ] + \item Overly-clever checks for \code{NA} have been removed (Kevin in + \ghpr{790}). + \item The included tinyformat has been updated to the current version, + Rcpp-specific changes are now more isolated (Kirill in \ghpr{791}). + \item Overly picky \emph{fall-through} warnings by gcc-7 regarding + \code{switch} statements are now pre-empted (Kirill in \ghpr{792}). + \item Permit compilation on ANDROID (Kenny Bell in \ghpr{796}). + \item Improve support for NVCC, the CUDA compiler (Iñaki Ucar in + \ghpr{798} addressing \ghit{797}). + \item Speed up tests for NA and NaN (Kirill and Dirk in \ghpr{799} and + \ghpr{800}). + \item Rearrange stack unwind test code, keep test disabled for now (Lionel + in \ghpr{801}). + \item Further condition away protect unwind behind #define (Dirk in + \ghpr{802}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Addressed a missing Rcpp namespace prefix when generating a C++ + interface (James Balamuta in \ghpr{779}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The Rcpp FAQ now shows \code{Rcpp::Rcpp.plugin.maker()} and not the + outdated \code{:::} use applicable non-exported functions. + } + } +} + +\section{Changes in Rcpp version 0.12.14 (2017-11-17)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item New const iterators functions \code{cbegin()} and \code{cend()} + added to \code{MatrixRow} as well (Dan Dillon in \ghpr{750}). + \item The \code{Rostream} object now contains a \code{Buffer} rather than + allocating one (Kirill Müller in \ghpr{763}). + \item New \code{DateVector} and \code{DatetimeVector} classes are now the + default fully deprecating the old classes as announced one year ago. + } + \item Changes in Rcpp Package: + \itemize{ + \item DESCRIPTION file now list doi information per CRAN suggestion. + } + \item Changes in Rcpp Documentation: + \itemize{ + \item Update CITATION file with doi information and PeerJ preprint. + } + } +} + +\section{Changes in Rcpp version 0.12.13 (2017-09-24)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item New const iterators functions \code{cbegin()} and \code{cend()} have + been added to several vector and matrix classes (Dan Dillon and James + Balamuta in \ghpr{748}) starting to address \ghit{741}). + } + \item Changes in Rcpp Modules: + \itemize{ + \item Misplacement of one parenthesis in macro \code{LOAD_RCPP_MODULE} + was corrected (Lei Yu in \ghpr{737}) + } + \item Changes in Rcpp Documentation: + \itemize{ + \item Rewrote the macOS sections to depend on official documentation due + to large changes in the macOS toolchain. (James Balamuta in \ghpr{742} + addressing issue \ghit{682}). + \item Added a new vignette \sQuote{Rcpp-introduction} based on new PeerJ + preprint, renamed existing introduction to \sQuote{Rcpp-jss-2011}. + \item Transitioned all vignettes to the 'pinp' RMarkdown template + (James Balamuta and Dirk Eddelbuettel in \ghpr{755} addressing + issue \ghit{604}). + \item Added an entry on running `compileAttributes()` twice to the + Rcpp-FAQ (\ghit{#745}). + } + } +} + +\section{Changes in Rcpp version 0.12.12 (2017-07-13)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The \code{tinyformat.h} header now ends in a newline (\ghit{701}). + \item Fixed rare protection error that occurred when fetching stack traces + during the construction of an Rcpp exception (Kirill Müller in \ghpr{706}). + \item Compilation is now also possibly on Haiku-OS (Yo Gong in \ghpr{708} + addressing \ghit{707}). + \item Dimension attributes are explicitly cast to \code{int} (Kirill + Müller in \ghpr{715}). + \item Unused arguments are no longer declared (Kirill Müller in + \ghpr{716}). + \item Visibility of exported functions is now supported via the R macro + \code{atttribute_visible} (Jeroen Ooms in \ghpr{720}). + \item The \code{no_init()} constructor accepts \code{R_xlen_t} (Kirill + Müller in \ghpr{730}). + \item Loop unrolling used \code{R_xlen_t} (Kirill Müller in \ghpr{731}). + \item Two unused-variables warnings are now avoided (Jeff Pollock in + \ghpr{732}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Execute tools::package_native_routine_registration_skeleton + within package rather than current working directory (JJ in \ghpr{697}). + \item The R portion no longer uses \code{dir.exists} to no require R 3.2.0 + or newer (Elias Pipping in \ghpr{698}). + \item Fix native registration for exports with name attribute (JJ in \ghpr{703} + addressing \ghit{702}). + \item Automatically register init functions for Rcpp Modules (JJ in \ghpr{705} + addressing \ghit{704}). + \item Add Shield around parameters in Rcpp::interfaces (JJ in \ghpr{713} + addressing \ghit{712}). + \item Replace dot (".") with underscore ("_") in package names when generating + native routine registrations (JJ in \ghpr{722} addressing \ghit{721}). + \item Generate C++ native routines with underscore ("_") prefix to avoid + exporting when standard exportPattern is used in NAMESPACE (JJ in + \ghpr{725} addressing \ghit{723}). + } + } +} + +\section{Changes in Rcpp version 0.12.11 (2017-05-20)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Rcpp::exceptions can now be constructed without a call stack (Jim + Hester in \ghpr{663} addressing \ghit{664}). + \item Somewhat spurious compiler messages under very verbose settings are + now suppressed (Kirill Müller in \ghpr{670}, \ghpr{671}, \ghpr{672}, + \ghpr{687}, \ghpr{688}, \ghpr{691}). + \item Refreshed the included \code{tinyformat} template library + (James Balamuta in \ghpr{674} addressing \ghit{673}). + \item Added \code{printf}-like syntax support for exception classes and + variadic templating for \code{Rcpp::stop} and \code{Rcpp::warning} + (James Balamuta in \ghpr{676}). + \item Exception messages have been rewritten to provide additional + information. (James Balamuta in \ghpr{676} and \ghpr{677} addressing + \ghit{184}). + \item One more instance of \code{Rf_mkString} is protected from garbage + collection (Dirk in \ghpr{686} addressing \ghit{685}). + \item Two exception specification that are no longer tolerated by + \code{g++-7.1} or later were removed (Dirk in \ghpr{690} addressing + \ghit{689}) + } + \item Changes in Rcpp Documentation: + \itemize{ + \item Added a Known Issues section to the Rcpp FAQ vignette + (James Balamuta in \ghpr{661} addressing \ghit{628}, \ghit{563}, + \ghit{552}, \ghit{460}, \ghit{419}, and \ghit{251}). + } + \item Changes in Rcpp Sugar: + \itemize{ + \item Added sugar function \code{trimws} (Nathan Russell in \ghpr{680} + addressing \ghit{679}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Automatically generate native routine registrations (JJ in \ghpr{694}) + \item The plugins for C++11, C++14, C++17 now set the values R 3.4.0 or + later expects; a plugin for C++98 was added (Dirk in \ghpr{684} addressing + \ghit{683}). + } + \item Changes in Rcpp support functions: + \itemize{ + \item The \code{Rcpp.package.skeleton()} function now creates a package + registration file provided R 3.4.0 or later is used (Dirk in \ghpr{692}) + } + } +} + +\section{Changes in Rcpp version 0.12.10 (2017-03-17)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Added new size attribute aliases for number of rows and columns in + DataFrame (James Balamuta in \ghpr{638} addressing \ghit{630}). + \item Fixed single-character handling in \code{Rstreambuf} (Iñaki Ucar in + \ghpr{649} addressing \ghit{647}). + \item XPtr gains a parameter \code{finalizeOnExit} to enable running the + finalizer when R quits (Jeroen Ooms in \ghpr{656} addressing \ghit{655}). + } + \item Changes in Rcpp Sugar: + \itemize{ + \item Fixed sugar functions \code{upper_tri()} and \code{lower_tri()} + (Nathan Russell in \ghpr{642} addressing \ghit{641}). + \item The \code{algorithm.h} file now accomodates the Intel compiler + (Dirk in \ghpr{643} and Dan in \ghpr{645} addressing issue \ghit{640}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item The C++17 standard is supported with a new plugin (used eg for + \code{g++-6.2}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item An overdue explanation of how C++11, C++14, and C++17 can be used + was added to the Rcpp FAQ. + } + } +} + +\section{Changes in Rcpp version 0.12.9 (2017-01-14)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The exception stack message is now correctly demangled on all + compiler versions (Jim Hester in \ghpr{598}) + \item Date and Datetime object and vector now have format methods and + \code{operator<<} support (\ghpr{599}). + \item The \code{size} operator in \code{Matrix} is explicitly referenced + avoiding a g++-6 issues (\ghpr{607} fixing \ghit{605}). + \item The underlying date calculation code was updated (\ghpr{621}, + \ghpr{623}). + \item Addressed improper diagonal fill for non-symmetric matrices + (James Balamuta in \ghpr{622} addressing \ghit{619}) + } + \item Changes in Rcpp Sugar: + \itemize{ + \item Added new Sugar function \code{sample()} (Nathan Russell in + \ghpr{610} and \ghpr{616}). + \item Added new Sugar function \code{Arg()} (James Balamuta in + \ghpr{626} addressing \ghit{625}). + } + \item Changes in Rcpp unit tests + \itemize{ + \item Added Environment::find unit tests and an Environment::get(Symbol) + test (James Balamuta in \ghpr{595} addressing issue \ghit{594}). + \item Added diagonal matrix fill tests + (James Balamuta in \ghpr{622} addressing \ghit{619}) + } + \item Changes in Rcpp Documentation: + \itemize{ + \item Exposed pointers macros were included in the Rcpp Extending vignette + (MathurinD; James Balamuta in \ghpr{592} addressing \ghit{418}). + \item The file \code{Rcpp.bib} move to directory \code{bib} which is + guaranteed to be present (\ghpr{631}). + } + \item Changes in Rcpp build system + \itemize{ + \item Travis CI now also calls \CRANpkg{covr} for coverage analysis (Jim + Hester in PR \ghpr{591}) + } + } +} + +\section{Changes in Rcpp version 0.12.8 (2016-11-16)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item String and vector elements now use extended \code{R_xlen_t} indices + (Qiang in PR \ghpr{560}) + \item Hashing functions now return unsigned int (Qiang in PR \ghpr{561}) + \item Added static methods \code{eye()}, \code{ones()}, and \code{zeros()} + for select matrix types (Nathan Russell in PR \ghpr{569}) + \item The exception call stack is again correctly reported; print methods + and tests added too (Jim Hester in PR \ghpr{582} fixing \ghit{579}) + \item Variatic macros no longer use a GNU extensions (Nathan in PR + \ghpr{575}) + \item Hash index functions were standardized on returning unsigned + integers (Also PR \ghpr{575}) + } + \item Changes in Rcpp Sugar: + \itemize{ + \item Added new Sugar functions \code{rowSums()}, \code{colSums()}, + \code{rowMeans()}, \code{colMeans()} (PR \ghpr{551} by Nathan Russell + fixing \ghit{549}) + \item \code{Range} Sugar now used \code{R_xlen_t} type for start/end + (PR \ghpr{568} by Qiang Kou) + \item Defining \code{RCPP_NO_SUGAR} no longer breaks the build. + (PR \ghpr{585} by Daniel C. Dillon) + } + \item Changes in Rcpp unit tests + \itemize{ + \item A test for expression vectors was corrected. + \item The constructor test for datetime vectors reflects the new classes + which treats Inf correctly (and still as a non-finite value) + } + \item Changes in Rcpp Attributes + \itemize{ + \item An 'empty' return was corrected (PR \ghpr{589} fixing issue + \ghit{588}, and with thanks to Duncan Murdoch for the heads-up) + } + \item Updated Date and Datetime vector classes: + \itemize{ + \item The \code{DateVector} and \code{DatetimeVector} classes were renamed + with a prefix \code{old}; they are currently \code{typedef}'ed to the + existing name (\ghpr{557}) + \item New variants \code{newDateVector} and \code{newDatetimeVector} were + added based on \code{NumericVector} (also \ghpr{557}, \ghpr{577}, + \ghpr{581}, \ghpr{587}) + \item By defining \code{RCPP_NEW_DATE_DATETIME_VECTORS} the new classes + can activated. We intend to make the new classes the default no sooner + than twelve months from this release. + \item The \code{capabilities()} function can also be used for presence of + this feature + } + } +} + +\section{Changes in Rcpp version 0.12.7 (2016-09-04)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The \code{NORET} macro is now defined if it was not already defined + by R itself (Kevin fixing issue \ghit{512}). + \item Environment functions get() & find() now accept a Symbol + (James Balamuta in \ghpr{513} addressing issue \ghit{326}). + \item Several uses of \code{Rf_eval} were replaced by the preferred + \code{Rcpp::Rcpp_eval} (Qiang in PR \ghpr{523} closing \ghit{498}). + \item Improved Autogeneration Warning for RcppExports + (James Balamuta in \ghpr{528} addressing issue \ghit{526}). + \item Fixed invalid C++ prefix identifiers in auto-generated code + (James Balamuta in \ghpr{528} and \ghpr{531} addressing issue + \ghit{387}; Simon Dirmeier in \ghpr{548}). + \item String constructors now set default UTF-8 encoding (Qiang Kou in + \ghpr{529} fixing \ghit{263}). + \item Add variadic variants of the \code{RCPP_RETURN_VECTOR} and + \code{RCPP_RETURN_MATRIX} macro when C++11 compiler used (Artem Klevtsov + in \ghpr{537} fixing \ghit{38}). + } + \item Changes in Rcpp build system + \itemize{ + \item Travis CI is now driven via \code{run.sh} from our fork, and deploys + all packages as .deb binaries using our PPA where needed (Dirk in + \ghpr{540} addressing issue \ghit{517}). + } + \item Changes in Rcpp unit tests + \itemize{ + \item New unit tests for random number generators the R namespace which + call the standalone Rmath library. (James Balamuta in \ghpr{514} + addressing issue \ghit{28}). + } + \item Changes in Rcpp Examples: + \itemize{ + \item Examples that used cxxfunction() from the inline package have been + rewritten to use either sourceCpp() or cppFunction() + (James Balamuta in \ghpr{541}, \ghpr{535}, \ghpr{534}, and \ghpr{532} + addressing issue \ghit{56}). + } + } +} + +\section{Changes in Rcpp version 0.12.6 (2016-07-18)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The \code{long long} data type is used only if it is available, + to avoid compiler warnings (Kirill Müller in \ghpr{488}). + \item The compiler is made aware that \code{stop()} never returns, to + improve code path analysis (Kirill Müller in \ghpr{487} addressing issue + \ghit{486}). + \item String replacement was corrected (Qiang in \ghpr{479} following + mailing list bug report by Masaki Tsuda) + \item Allow for UTF-8 encoding in error messages via + \code{RCPP_USING_UTF8_ERROR_STRING} macro (Qin Wenfeng in \ghpr{493}) + \item The R function \code{Rf_warningcall} is now provided as well (as + usual without leading \code{Rf_}) (\ghpr{497} fixing \ghit{495}) + } + \item Changes in Rcpp Sugar: + \itemize{ + \item Const-ness of \code{min} and \code{max} functions has been corrected. + (Dan Dillon in PR \ghpr{478} fixing issue \ghit{477}). + \item Ambiguities for matrix/vector and scalar operations have been fixed + (Dan Dillon in PR \ghpr{476} fixing issue \ghit{475}). + \item New \code{algorithm} header using iterator-based approach for + vectorized functions (Dan in PR \ghpr{481} revisiting PR \ghpr{428} and + addressing issue \ghit{426}, with futher work by Kirill in PR \ghpr{488} + and Nathan in \ghpr{503} fixing issue \ghit{502}). + \item The \code{na_omit()} function is now faster for vectors without + \code{NA} values (Artem Klevtsov in PR \ghpr{492}) + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Add \code{cacheDir} argument to \code{sourceCpp()} to enable caching of + shared libraries across R sessions (JJ in \ghpr{504}). + \item Code generation now deals correctly which packages containing a dot + in their name (Qiang in \ghpr{501} fixing \ghit{500}). + } + \item Changes in Rcpp Documentation: + \itemize{ + \item A section on default parameters was added to the Rcpp FAQ vignette + (James Balamuta in \ghpr{505} fixing \ghit{418}). + \item The Rcpp-attributes vignette is now mentioned more prominently in + question one of the Rcpp FAQ vignette. + \item The Rcpp Quick Reference vignette received a facelift with new + sections on Rcpp attributes and plugins begin added. (James Balamuta in + \ghpr{509} fixing \ghit{484}). + \item The bib file was updated with respect to the recent JSS publication + for RProtoBuf. + } + } +} + +\section{Changes in Rcpp version 0.12.5 (2016-05-14)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The checks for different C library implementations now also check for Musl + used by Alpine Linux (Sergio Marques in PR \ghpr{449}). + \item \code{Rcpp::Nullable} works better with Rcpp::String (Dan Dillon in + PR \ghpr{453}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item R 3.3.0 Windows with Rtools 3.3 is now supported (Qin Wenfeng in PR + \ghpr{451}). + \item Correct handling of dependent file paths on Windows (use winslash = "/"). + } + \item Changes in Rcpp Modules: + \itemize{ + \item An apparent race condition in Module loading seen with R 3.3.0 was + fixed (Ben Goodrich in \ghpr{461} fixing \ghit{458}). + \item The (older) \code{loadRcppModules()} is now deprecated in favour of + \code{loadModule()} introduced around R 2.15.1 and Rcpp 0.9.11 (PR \ghpr{470}). + } + \item Changes in Rcpp support functions: + \itemize{ + \item The \code{Rcpp.package.skeleton()} function was again updated in + order to create a \code{DESCRIPTION} file which passes \code{R CMD check} + without notes. warnings, or error under R-release and R-devel (PR \ghpr{471}). + \item A new function \code{compilerCheck} can test for minimal \code{g++} + versions (PR \ghpr{474}). + } + } +} + +\section{Changes in Rcpp version 0.12.4 (2016-03-22)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item New accessors \code{as()} and \code{clone()} were added to the + \code{Nullable} class (Dan in PR \ghpr{423} closing \ghit{421}) + \item The \code{Nullable<>::operator SEXP()} and + \code{Nullable<>::get()} now also work for \code{const} objects + (Kirill Müller in PR \ghpr{417}). + \item A subsetting error was fixed (Qiang via \ghpr{432} closing + \ghit{431}). + } + \item Changes in Rcpp Sugar: + \itemize{ + \item Added new Sugar function \code{median()} (Nathan in PR \ghpr{425} + closing \ghit{424}) + \item Added new Sugar function \code{cbind()} (Nathan in PR \ghpr{447} + closing \ghit{407}) + } + \item Changes in Rcpp Attributes: + \itemize{ + \item A plugin for C++14 was added (Dan in PR \ghpr{427}) + } + \item Changes in Rcpp Documentation: + \itemize{ + \item An entry was added to the Rcpp-FAQ vignette describing the required + packages for vignette building (\ghit{422}). + \item Use on OS X was further detailed (James Balamuta in \ghpr{433} with + further review by Bob Rudis). + \item An entry was added concerning the hard-code limit of arguments to + some constructor and function (cf \ghit{435}). + \item The Rcpp-FAQ vignette now contains a table of content. + \item Typos and indentation were corrected in the Rcpp Sugar vignette + (\ghpr{445} by Colin Gillespie). + } + } +} + +\section{Changes in Rcpp version 0.12.3 (2016-01-10)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Const iterators now \code{CharacterVector} now behave like regular + iterators (PR \ghpr{404} by Dan fixing \ghit{362}). + \item Math operators between matrix and scalars type have been added (PR + \ghpr{406} by Qiang fixing \ghit{365}). + \item A missing \code{std::hash} function interface for + \code{Rcpp::String} has been addded (PR \ghpr{408} by Qiang fixing + \ghit{84}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Avoid invalid function names when generating C++ interfaces (PR + \ghpr{403} by JJ fixing \ghit{402}). + \item Insert additional space around \code{&} in function interface (PR + \ghpr{400} by Kazuki Fukui fixing \ghit{278}). + } + \item Changes in Rcpp Modules: + \itemize{ + \item The copy constructor now initialized the base class (PR \ghpr{411} + by Joshua Pritikin fixing \ghit{410}) + } + \item Changes in Rcpp Repository: + \itemize{ + \item Added a file \code{Contributing.md} providing some points to + potential contributors (PR \ghpr{414} closing issue \ghit{413}) + } + } +} + +\section{Changes in Rcpp version 0.12.2 (2015-11-14)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Correct return type in product of matrix dimensions (PR \ghpr{374} + by Florian) + \item Before creating a single String object from a \code{SEXP}, ensure + that it is from a vector of length one (PR \ghpr{376} by Dirk, fixing + \ghit{375}). + \item No longer use \code{STRING_ELT} as a left-hand side, thanks to a + heads-up by Luke Tierney (PR \ghpr{378} by Dirk, fixing \ghit{377}). + \item Rcpp Module objects are now checked more carefully (PR \ghpr{381} + by Tianqi, fixing \ghit{380}) + \item An overflow in Matrix column indexing was corrected (PR \ghpr{390} + by Qiang, fixing a bug reported by Allessandro on the list) + \item \code{Nullable} types can now be assigned \code{R_NilValue} in + function signatures. (PR \ghpr{395} by Dan, fixing issue \ghit{394}) + \item \code{operator<<()} now always shows decimal points (PR \ghpr{396} + by Dan) + \item Matrix classes now have a \code{transpose()} function (PR \ghpr{397} + by Dirk fixing \ghit{383}) + \item \code{operator<<()} for complex types was added (PRs \ghpr{398} by + Qiang and \ghpr{399} by Dirk, fixing \ghit{187}) + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Enable export of C++ interface for functions that return void. + } + \item Changes in Rcpp Sugar: + \itemize{ + \item Added new Sugar function \code{cummin()}, \code{cummax()}, + \code{cumprod()} (PR \ghpr{389} by Nathan Russell fixing \ghit{388}) + \item Enabled sugar math operations for subsets; e.g. x[y] + x[z]. + (PR \ghpr{393} by Kevin and Qiang, implementing \ghit{392}) + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The \code{NEWS} file now links to GitHub issue tickets and pull + requests. + \item The \code{Rcpp.bib} file with bibliographic references was updated. + } + } +} + +\section{Changes in Rcpp version 0.12.1 (2015-09-10)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Correct use of WIN32 instead of _WIN32 to please Windows 10 + \item Add an assignment operator to \code{DimNameProxy} (PR \ghpr{339} by Florian) + \item Add vector and matrix accessors \code{.at()} with bounds checking + (PR \ghpr{342} by Florian) + \item Correct character vector conversion from single char (PR \ghpr{344} by + Florian fixing issue \ghit{343}) + \item Correct on use of \code{R_xlen_t} back to \code{size_t} (PR \ghpr{348} by + Romain) + \item Correct subsetting code to allow for single assignment (PR \ghpr{349} by + Florian) + \item Enable subset assignment on left and righ-hand side (PR \ghpr{353} by + Qiang, fixing issue \ghit{345}) + \item Refreshed to included \code{tinyformat} template library (PR \ghpr{357} by + Dirk, issue \ghit{356}) + \item Add \code{operator<<()} for vectors and matrices (PR \ghpr{361} by Dan + fixing issue \ghit{239}) + \item Make \code{String} and \code{String_Proxy} objects comparable (PR + \ghpr{366} and PR \ghpr{372} by Dan, fixing issue \ghit{191}) + \item Add a new class \code{Nullable} for objects which may be \code{NULL} + (PR \ghpr{368} by Dirk and Dan, fixing issue \ghit{363}) + \item Correct creation and access of large matrices (PR \ghpr{370} by Florian, + fixing issue \ghit{369}) + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Correctly reset directory in case of no-rebuilding but Windows code + (PR \ghpr{335} by Dirk) + } + \item Changes in Rcpp Modules: + \itemize{ + \item We no longer define multiple Modules objects named \code{World} in + the unit tests with was seen to have a bad effect with R 3.2.2 or later + (PR \ghpr{351} by Dirk fixing issue \ghit{350}). + \item Applied patch by Kurt Hornik which improves how Rcpp loads Modules + (PR \ghpr{353} by Dirk) + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The \code{Rcpp.bib} file with bibliographic references was updated. + } + } +} + +\section{Changes in Rcpp version 0.12.0 (2015-07-24)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item \code{Rcpp_eval()} no longer uses \code{R_ToplevelExec} when evaluating + R expressions; this should resolve errors where calling handlers (e.g. + through \code{suppressMessages()}) were not properly respected. + \item All internal length variables have been changed from \code{R_len_t} + to \code{R_xlen_t} to support vectors longer than 2^31-1 elements (via + PR \ghpr{303} by Qiang Kou). + \item The sugar function \code{sapply} now supports lambda functions + (addressing \ghit{213} thanks to Matt Dziubinski) + \item The \code{var} sugar function now uses a more robust two-pass + method, supports complex numbers, with new unit tests added (via PR + \ghpr{320} by Matt Dziubinski) + \item \code{String} constructors now allow encodings (via PR \ghpr{310} + by Qiang Kou) + \item \code{String} objects are preserving the underlying \code{SEXP} + objects better, and are more careful about initializations (via PRs + \ghpr{322} and \ghpr{329} by Qiang Kou) + \item DataFrame constructors are now a little more careful (via PR + \ghpr{301} by Romain Francois) + \item For R 3.2.0 or newer, \code{Rf_installChar()} is used instead of + \code{Rf_install(CHAR())} (via PR \ghpr{332}). + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Use more robust method of ensuring unique paths for generated shared + libraries. + \item The \code{evalCpp} function now also supports the \code{plugins} + argument. + \item Correctly handle signature termination characters ('\{' or ';') contained + in quotes. + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The \code{Rcpp-FAQ} vignette was once again updated with respect to + OS X issues and Fortran libraries needed for e.g. \CRANpkg{RcppArmadillo}. + \item The included \code{Rcpp.bib} bibtex file (which is also used by + other Rcpp* packages) was updated with respect to its CRAN references. + } + } +} + +\section{Changes in Rcpp version 0.11.6 (2015-05-01)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The unwinding of exceptions was refined to protect against inadvertent + memory leaks. + \item Header files now try even harder not to let macro definitions leak. + \item Matrices have a new default constructor for zero-by-zero dimension + matrices (via a pull request by Dmitrii Meleshko). + \item A new \code{empty()} string constructor was added (via another pull + request). + \item Better support for Vectors with a storage policy different from the + default, i.e. \code{NoProtectStorage}, was added. + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Rtools 3.3 is now supported. + } + } +} + +\section{Changes in Rcpp version 0.11.5 (2015-03-04)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item An error handler for tinyformat was defined to prevent the \code{assert()} + macro from spilling. + \item The \code{Rcpp::warning} function was added as a wrapper for \code{Rf_warning}. + \item The \code{XPtr} class was extended with new \code{checked_get} + and \code{release} functions as well as improved behavior (throw an + exception rather than crash) when a NULL external pointer is dereferenced. + \item R code is evaluated within an \code{R_toplevelExec} block to prevent + user interrupts from bypassing C++ destructors on the stack. + \item The \code{Rcpp::Environment} constructor can now use a supplied + parent environment. + \item The \code{Rcpp::Function} constructor can now use a supplied + environment or namespace. + \item The \code{attributes_hidden} macro from R is used to shield internal + functions; the \code{R_ext/Visibility.h} header is now included as well. + \item A \code{Rcpp::print} function was added as a wrapper around \code{Rf_PrintValue}. + } + \item Changes in Rcpp Attributes: + \itemize{ + \item The \code{pkg_types.h} file is now included in \code{RcppExports.cpp} + if it is present in either the \code{inst/include} or \code{src}. + \item \code{sourceCpp} was modified to allow includes of local files + (e.g. \code{#include "foo.hpp"}). Implementation files (*.cc; *.cpp) corresponding + to local includes are also automatically built if they exist. + \item The generated attributes code was simplified with respect to + \code{RNGScope} and now uses \code{RObject} and its destructor rather than \code{SEXP} + protect/unprotect. + \item Support addition of the \code{rng} parameter in \code{Rcpp::export} + to suppress the otherwise automatic inclusion of \code{RNGScope} in + generated code. + \item Attributes code was made more robust and can e.g. no longer recurse. + \item Version 3.2 of the Rtools is now correctly detected as well. + \item Allow 'R' to come immediately after '***' for defining embedded R + code chunks in sourceCpp. + \item The attributes vignette has been updated with documentation + on new features added over the past several releases. + } + \item Changes in Rcpp tests: + \itemize{ + \item On Travis CI, all build dependencies are installed as binary + \code{.deb} packages resulting in faster tests. + } + } +} + +\section{Changes in Rcpp version 0.11.4 (2015-01-20)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The \code{ListOf} class gains the \code{.attr} and + \code{.names} methods common to other Rcpp vectors. + \item The \code{[dpq]nbinom_mu()} scalar functions are now available via + the \code{R::} namespace when R 3.1.2 or newer is used. + \item Add an additional test for AIX before attempting to include \code{execinfo.h}. + \item \code{Rcpp::stop} now supports improved \code{printf}-like syntax + using the small tinyformat header-only library (following a similar + implementation in Rcpp11) + \item Pairlist objects are now protected via an additional \code{Shield<>} + as suggested by Martin Morgan on the rcpp-devel list. + \item Sorting is now prohibited at compile time for objects of type + \code{List}, \code{RawVector} and \code{ExpressionVector}. + \item Vectors now have a \code{Vector::const\_iterator} that is 'const correct' + thanks to fix by Romain following a bug report in rcpp-devel by Martyn Plummer. + \item The \code{mean()} sugar function now uses a more robust two-pass + method, and new unit tests for \code{mean()} were added at the same time. + \item The \code{mean()} and \code{var()} functions now support all core + vector types. + \item The \code{setequal()} sugar function has been corrected via + suggestion by Qiang Kou following a bug report by Søren Højsgaard. + \item The macros \code{major}, \code{minor}, and \code{makedev} no longer leak + in from the (Linux) system header \code{sys/sysmacros.h}. + \item The \code{push_front()} string function was corrected. + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Only look for plugins in the package's namespace + (rather than entire search path). + \item Also scan header files for definitions of functions to be considerd + by Attributes. + \item Correct the regular expression for source files which are scanned. + } + \item Changes in Rcpp unit tests + \itemize{ + \item Added a new binary test which will load a pre-built package to + ensure that the Application Binary Interface (ABI) did not change; this + test will (mostly or) only run at Travis where we have reasonable control + over the platform running the test and can provide a binary. + \item New unit tests for sugar functions \code{mean}, \code{setequal} and + \code{var} were added as noted above. + } + \item Changes in Rcpp Examples: + \itemize{ + \item For the (old) examples \code{ConvolveBenchmarks} and \code{OpenMP}, + the respective \code{Makefile} was renamed to \code{GNUmakefile} to please + \code{R CMD check} as well as the CRAN Maintainers. + } + } +} + +\section{Changes in Rcpp version 0.11.3 (2014-09-27)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The deprecation of \code{RCPP_FUNCTION_*} which was announced with + release 0.10.5 last year is proceeding as planned, and the file + \code{macros/preprocessor_generated.h} has been removed. + \item \code{Timer} no longer records time between steps, but times from + the origin. It also gains a \code{get_timers(int)} methods that + creates a vector of \code{Timer} that have the same origin. This is modelled + on the \code{Rcpp11} implementation and is more useful for situations where + we use timers in several threads. \code{Timer} also gains a constructor + taking a \code{nanotime_t} to use as its origin, and a \code{origin} method. + This can be useful for situations where the number of threads is not known + in advance but we still want to track what goes on in each thread. + \item A cast to \code{bool} was removed in the vector proxy code as + inconsistent behaviour between clang and g++ compilations was noticed. + \item A missing \code{update(SEXP)} method was added thanks to pull + request by Omar Andres Zapata Mesa. + \item A proxy for \code{DimNames} was added. + \item A \code{no_init} option was added for Matrices and Vectors. + \item The \code{InternalFunction} class was updated to work with + \code{std::function} (provided a suitable C++11 compiler is available) + via a pull request by Christian Authmann. + \item A \code{new_env()} function was added to \code{Environment.h} + \item The return value of range eraser for Vectors was fixed in a pull + request by Yixuan Qiu. + } + \item Changes in Rcpp Sugar: + \itemize{ + \item In \code{ifelse()}, the returned \code{NA} type was corrected for + \code{operator[]}. + } + \item Changes in Rcpp Attributes: + \itemize{ + \item Include LinkingTo in DESCRIPTION fields scanned to confirm that + C++ dependencies are referenced by package. + \item Add \code{dryRun} parameter to \code{sourceCpp}. + \item Corrected issue with relative path and R chunk use for \code{sourceCpp}. + } + \item Changes in Rcpp Documentation: + \itemize{ + \item The \code{Rcpp-FAQ} vignette was updated with respect to OS X issues. + \item A new entry in the \code{Rcpp-FAQ} clarifies the use of licenses. + \item Vignettes build results no longer copied to \code{/tmp} to please CRAN. + \item The Description in \code{DESCRIPTION} has been shortened. + } + \item Changes in Rcpp support functions: + \itemize{ + \item The \code{Rcpp.package.skeleton()} function will now use + \CRANpkg{pkgKitten} package, if available, to create a package which passes + \code{R CMD check} without warnings. A new \code{Suggests:} has been added + for \CRANpkg{pkgKitten}. + \item The \code{modules=TRUE} case for \code{Rcpp.package.skeleton()} has + been improved and now runs without complaints from \code{R CMD check} as well. + } + \item Changes in Rcpp unit test functions: + \itemize{ + \item Functions from the \CRANpkg{RUnit} package are now prefixed with \code{RUnit::} + \item The \code{testRcppModule} and \code{testRcppClass} sample packages + now pass \code{R CMD check --as-cran} cleanly with NOTES or WARNINGS + } + } +} + +\section{Changes in Rcpp version 0.11.2 (2014-06-06)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Implicit conversions, e.g. between \code{NumericVector} and + \code{IntegerVector}, will now give warnings if you use + \code{\#define RCPP_WARN_ON_COERCE} before including the Rcpp + headers. + \item Templated \code{List} containers, \code{ListOf}, have been + introduced. When subsetting such containers, the return is assumed + to be of type T, allowing code such as + \code{ListOf x; NumericVector y = x[0] + x[1] + x[2]}. + \item In a number of instances, returned results are protected and/or cast + more carefully. + } + \item Changes in Rcpp Attributes + \itemize{ + \item Trailing line comments are now stripped by the attributes + parser. This allows the parser to handle C++ source files + containing comments inline with function arguments. + \item The \code{USE_CXX1X} environment variable is now defined by + the cpp11 plugin when R >= 3.1. Two additional plugins have been + added for use with C++0x (eg when using g++ 4.6.* as on Windows) + as well as C++1y for compilers beginning to support the next + revision of the standard; additional fallback is provided for + Windows. + \item \code{compileAttributes()} now also considers Imports: which + may suppress a warning when running \code{Rcpp.package.skeleton()}. + } + } +} + +\section{Changes in Rcpp version 0.11.1 (2014-03-13)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Preserve backwards compatibility with \CRANpkg{Rcpp} 0.10.* by + allowing \code{RObject} extraction from vectors (or lists) of Rcpp + objects + \item Add missing default constructor to Reference class that was + omitted in the header-only rewrite + \item Fixes for \code{NA} and \code{NaN} handling of the + \code{IndexHash} class, as well as the vector \code{.sort()} + method. These fixes ensure that sugar functions depending on + \code{IndexHash} (i.e. \code{unique()}, \code{sort_unique()}, + \code{match()}) will now properly handle \code{NA} and \code{NaN} + values for numeric vectors. + \item \code{DataFrame::nrows} now more accurately mimics R's + internal behavior (checks the row.names attribute) + \item Numerous changes to permit compilation on the Solaris OS + \item Rcpp vectors gain a subsetting method -- it is now possible + to subset an Rcpp vector using \code{CharacterVector}s (subset + by name), \code{LogicalVector}s (logical subsetting), and + \code{IntegerVector}s (0-based index subsetting). Such subsetting + will also work with Rcpp sugar expressions, enabling expressions + such as \code{x[ x > 0]}. + \item Comma initialization (e.g. + \code{CharacterVector x = "a", "b", "c";}, has been disabled, as + it causes problems with the behavior of the \code{=} operator with + \code{Rcpp::List}s. Users who want to re-enable this functionality + can use \code{#define RCPP_COMMA_INITIALIZATION}, but be aware of + the above caveat. The more verbose + \code{CharacterVector x = CharacterVector::create("a", "b", "c")} + is preferred. + } + \item Changes in Rcpp Attributes + \itemize{ + \item Fix issue preventing packages with \code{Rcpp::interfaces} + attribute from compiling. + \item Fix behavior with attributes parsing of \code{::create} for default + arguments, and also allow constructors of a given size + (e.g. \code{NumericVector v = NumericVector(10))} gives a default + value of \code{numeric(10)} at the R level). Also make NAs preserve + type when exported to R (e.g. \code{NA_STRING} as a default argument + maps to \code{NA_character_} at the R level) + } + \item Changes in Rcpp modules + \itemize{ + \item Corrected the \code{un_pointer} implementation for \code{object} + } + } +} + +\section{Changes in Rcpp version 0.11.0 (2014-02-02)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Functions provided/used by \CRANpkg{Rcpp} are now registered + with R and instantiated by client package alleviating the new for + explicit linking against \code{libRcpp} which is therefore no + longer created. + \item Updated the \code{Rcpp.package.skeleton()} function accordingly. + \item New class \code{StretchyList} for pair lists with fast addition of + elements at the front and back. This abstracts the 3 functions + \code{NewList}, \code{GrowList} and \code{Insert} used in various + packages and in parsers in R. + \item The function \code{dnt}, \code{pnt}, \code{qnt} sugar + functions were incorrectly expanding to the no-degree-of-freedoms + variant. + \item Unit tests for \code{pnt} were added. + \item The sugar table function did not handle NAs and NaNs properly + for numeric vectors. Fixed and tests added. + \item The internal coercion mechanism mapping numerics to strings has + been updated to better match \R (specifically with \code{Inf}, \code{-Inf}, + and \code{NaN}.) + \item Applied two bug fixes to Vector \code{sort()} and \code{RObject} + definition spotted and corrected by Kevin Ushey + \item New \code{checkUserInterrupt()} function that provides a C++ friendly + implementation of \code{R_CheckUserInterrupt}. + } + \item Changes in Rcpp attributes: + \itemize{ + \item Embedded R code chunks in sourceCpp are now executed within + the working directory of the C++ source file. + \item Embedded R code chunks in sourceCpp can now be disabled. + } + \item Changes in Rcpp documentation: + \itemize{ + \item The Rcpp-FAQ and Rcpp-package vignettes have been updated and expanded. + \item Vignettes are now typeset with grey background for code boxes. + \item The bibtex reference file has been update to reflexct + current package versions. + } + \item Changes in Rcpp unit tests: + \itemize{ + \item The file \code{tests/doRUnit.R} was rewritten following the + pattern deployed in \CRANpkg{RProtoBuf} which is due to Murray Stokely + \item The function \code{test()} was rewritten; it provides an + easy entry point to running unit tests of the installed package + } + } +} + +\section{Changes in Rcpp version 0.10.6 (2013-10-27)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item The function \code{exposeClass} takes a description of the + constructors, fields and methods to be exposed from a C++ + class, and writes C++ and R files in the package. Inherited + classes can be dealt with, but require data type information. + This approach avoids hand-coding module files. + \item Two missing \code{is<>()} templates for + \code{CharacterVector} and \code{CharacterMatrix} have been added, + and some tests for \code{is_na()} and \code{is_finite()} have been + corrected thanks to Thomas Tse. + } + \item Changes in R code: + \itemize{ + \item Export linking helper function \code{LdFlags} as well as + \code{RcppLdFlags}. + \item Function \code{Rcpp.package.skeleton()} no longer passes a + \code{namespace} argument on to \code{package.skeleton()} + } + \item Changes in R setup: + \itemize{ + \item Raise requirement for R itself to be version 3.0.0 or later + as needed by the vignette processing + } + \item Changes in Rcpp attributes: + \itemize{ + \item \code{sourceCpp} now correctly binds to Rtools 3.0 and 3.1 + } + } +} + +\section{Changes in Rcpp version 0.10.5 (2013-09-28)}{ + \itemize{ + \item Changes in R code: + \itemize{ + \item New R function \code{demangle} that calls the \code{DEMANGLE} macro. + \item New R function \code{sizeof} to query the byte size of a type. This + returns an object of S3 class \code{bytes} that has a \code{print} method + showing bytes and bits. + } + \item Changes in Rcpp API: + \itemize{ + \item Add \code{defined(__sun)} to lists of operating systems to + test for when checking for lack of \code{backtrace()} needed for + stack traces. + \item \code{as}, \code{as}, \code{as} and + \code{as} are now supported, when + T is a class exposed by modules, i.e. with \code{RCPP_EXPOSED_CLASS} + \item \code{DoubleVector} as been added as an alias to + \code{NumericVector} + \item New template function \code{is} to identify if an R object + can be seen as a \code{T}. For example \code{is(x)}. + This is a building block for more expressive dispatch in various places + (modules and attributes functions). + \item \code{wrap} can now handle more types, i.e. types that iterate over + \code{std::pair} where KEY can be converted to a + \code{String} and \code{VALUE} is either a primitive type (int, double) + or a type that wraps. Examples : + \itemize{ + \item \code{std::map} : we can make a String from an int, + and double is primitive + \item \code{boost::unordered_map >}: we can make + a String from a double and \code{std::vector} can wrap itself + } + Other examples of this are included at the end of the \code{wrap} unit test + file (\code{runit.wrap.R} and \code{wrap.cpp}). + \item \code{wrap} now handles containers of classes handled by modules. e.g. + if you expose a class \code{Foo} via modules, then you can wrap + \code{vector}, ... An example is included in the \code{wrap} unit test + file + \item \code{RcppLdFlags()}, often used in \code{Makevars} files of + packages using \pkg{Rcpp}, is now exported from the package namespace. + } + \item Changes in Attributes: + \itemize{ + \item Objects exported by a module (i.e. by a \code{RCPP_MODULE} call + in a file that is processed by \code{sourceCpp}) are now directly + available in the environment. We used to make the module object + available, which was less useful. + \item A plugin for \code{openmp} has been added to support use of OpenMP. + \item \code{Rcpp::export} now takes advantage of the more flexible + \code{as<>}, handling constness and referenceness of the input types. + For users, it means that for the parameters of function exported by modules, + we can now use references, pointers and const versions of them. + The file \code{Module.cpp} file has an example. + \item{No longer call non-exported functions from the tools package} + \item{No longer search the inline package as a fallback when loading + plugins for the the \code{Rcpp::plugins} attribute}. + } + \item Changes in Modules: + \itemize{ + \item We can now expose functions and methods that take + \code{T&} or \code{const T&} as arguments. In these situations + objects are no longer copied as they used to be. + } + \item Changes in sugar: + \itemize{ + \item \code{is_na} supports classes \code{DatetimeVector} and + \code{DateVector} + } + \item Changes in Rcpp documentation: + \itemize{ + \item The vignettes have been moved from \code{inst/doc/} to the + \code{vignettes} directory which is now preferred. + \item The appearance of the vignettes has been refreshed by + switching to the Bistream Charter font, and microtype package. + } + \item Deprecation of \code{RCPP_FUNCTION_*}: + \itemize{ + \item The macros from the \code{preprocessor_generated.h} file + have been deprecated. They are still available, but they print a + message in addition to their expected behavior. + \item The macros will be permanently removed in the first \pkg{Rcpp} + release after July 2014. + \item Users of these macros should start replacing them with more + up-to-date code, such as using 'Rcpp attributes' or 'Rcpp modules'. + } + } +} + +\section{Changes in Rcpp version 0.10.4 (2013-06-23)}{ + \itemize{ + \item Changes in R code: None beyond those detailed for Rcpp Attributes + \item Changes in Rcpp attributes: + \itemize{ + \item Fixed problem whereby the interaction between the gc and the + RNGScope destructor could cause a crash. + \item Don't include package header file in generated C++ interface + header files. + \item Lookup plugins in \pkg{inline} package if they aren't found + within the \pkg{Rcpp} package. + \item Disallow compilation for files that don't have extensions + supported by R CMD SHLIB + } + \item Changes in Rcpp API: + \itemize{ + \item The \code{DataFrame::create} set of functions has been reworked + to just use \code{List::create} and feed to the \code{DataFrame} + constructor + \item The \code{operator-()} semantics for \code{Date} and + \code{Datetime} are now more inline with standard C++ behaviour; + with thanks to Robin Girard for the report. + \item RNGScope counter now uses unsigned long rather than int. + \item \code{Vector<*>::erase(iterator, iterator)} was fixed. Now + it does not remove the element pointed by last (similar to what is + done on stl types and what was intended initially). Reported on + Rcpp-devel by Toni Giorgino. + \item Added equality operator between elements of + \code{CharacterVector}s. + } + \item Changes in Rcpp sugar: + \itemize{ + \item New function \code{na_omit} based on the StackOverflow thread + \url{http://stackoverflow.com/questions/15953768/} + \item New function \code{is_finite} and \code{is_infinite} that + reproduces the behavior of R's \code{is.finite} and + \code{is.infinite} functions + } + \item Changes in Rcpp build tools: + \itemize{ + \item Fix by Martyn Plummer for Solaris in handling of + \code{SingleLogicalResult}. + \item The \code{src/Makevars} file can now optionally override the + path for \code{/usr/bin/install_name_tool} which is used on OS X. + \item Vignettes are trying harder not to be built in parallel. + } + \item Changes in Rcpp documentation: + \itemize{ + \item Updated the bibliography in \code{Rcpp.bib} (which is also + sourced by packages using Rcpp). + \item Updated the \code{THANKS} file. + } + \item Planned Deprecation of \code{RCPP_FUNCTION_*}: + \itemize{ + \item The set of macros \code{RCPP_FUNCTION_} etc ... from the + \code{preprocessor_generated.h} file will be deprecated in the next version + of \pkg{Rcpp}, i.e they will still be available but will generate some + warning in addition to their expected behavior. + \item In the first release that is at least 12 months after this announcement, the + macros will be removed from \pkg{Rcpp}. + \item Users of these macros (if there are any) should start replacing them + with more up to date code, such as using Rcpp attributes or Rcpp + modules. + } + } +} + +\section{Changes in Rcpp version 0.10.3 (2013-03-23)}{ + \itemize{ + \item Changes in R code: + \itemize{ + \item Prevent build failures on Windowsn when Rcpp is installed + in a library path with spaces (transform paths in the same manner + that R does before passing them to the build system). + } + \item Changes in Rcpp attributes: + \itemize{ + \item Rcpp modules can now be used with \code{sourceCpp} + \item Standalone roxygen chunks (e.g. to document a class) are now + transposed into RcppExports.R + \item Added \code{Rcpp::plugins} attribute for binding + directly to inline plugins. Plugins can be registered using + the new \code{registerPlugin} function. + \item Added built-in \code{cpp11} plugin for specifying + the use of C++11 in a translation unit + \item Merge existing values of build related environment + variables for sourceCpp + \item Add global package include file to RcppExports.cpp + if it exists + \item Stop with an error if the file name passed to + \code{sourceCpp} has spaces in it + \item Return invisibly from void functions + \item Ensure that line comments invalidate block comments when + parsing for attributes + \item Eliminated spurious empty hello world function definition + in Rcpp.package.skeleton + } + \item Changes in Rcpp API: + \itemize{ + \item The very central use of R API R_PreserveObject and + R_ReleaseObject has been replaced by a new system based on the + functions Rcpp_PreserveObject, Rcpp_ReleaseObject and Rcpp_ReplaceObject + which shows better performance and is implemented using a generic vector + treated as a stack instead of a pairlist in the R + implementation. However, as this preserve / release code is still + a little rough at the edges, a new #define is used (in config.h) + to disable it for now. + \item Platform-dependent code in Timer.cpp now recognises a few + more BSD variants thanks to contributed defined() test suggestions + \item Support for wide character strings has been added throughout the + API. In particular String, CharacterVector, wrap and as are aware of + wide character strings + } + } +} + +\section{Changes in Rcpp version 0.10.2 (2012-12-21)}{ + \itemize{ + \item Changes in Rcpp API: + \itemize{ + \item Source and header files were reorganized and consolidated so + that compile time are now significantly lower + \item Added additional check in \code{Rstreambuf} deletetion + \item Added support for \code{clang++} when using \code{libc++}, + and for anc \code{icpc} in \code{std=c++11} mode, thanks to a + patch by Yan Zhou + \item New class \code{Rcpp::String} to facilitate working with a single + element of a character vector + \item New utility class sugar::IndexHash inspired from Simon + Urbanek's fastmatch package + \item Implementation of the equality operator between two Rcomplex + \item \code{RNGScope} now has an internal counter that enables it + to be safely used multiple times in the same stack frame. + \item New class \code{Rcpp::Timer} for benchmarking + } + \item Changes in Rcpp sugar: + \itemize{ + \item More efficient version of \code{match} based on \code{IndexHash} + \item More efficient version of \code{unique} base on \code{IndexHash} + \item More efficient version of \code{in} base on \code{IndexHash} + \item More efficient version of \code{duplicated} base on \code{IndexHash} + \item More efficient version of \code{self_match} base on \code{IndexHash} + \item New function \code{collapse} that implements paste(., collapse= "" ) + } + \item Changes in Rcpp attributes: + \itemize{ + \item Use code generation rather than modules to implement + \code{sourceCpp} and \code{compileAttributes} (eliminates + problem with exceptions not being able to cross shared library + boundaries on Windows) + \item Exported functions now automatically establish an \code{RNGScope} + \item Functions exported by \code{sourceCpp} now directly + reference the external function pointer rather than rely on + dynlib lookup + \item On Windows, Rtools is automatically added to the PATH + during \code{sourceCpp} compilations + \item Diagnostics are printed to the console if \code{sourceCpp} + fails and C++ development tools are not installed + \item A warning is printed if when \code{compileAttributes} detects + \code{Rcpp::depends} attributes in source files that are not + matched by Depends/LinkingTo entries in the package DESCRIPTION + } + } +} + +\section{Changes in Rcpp version 0.10.1 (2012-11-26)}{ + \itemize{ + \item Changes in Rcpp sugar: + \itemize{ + \item New functions: \code{setdiff}, \code{union_}, \code{intersect} + \code{setequal}, \code{in}, \code{min}, \code{max}, \code{range}, + \code{match}, \code{table}, \code{duplicated} + \item New function: \code{clamp} which combines pmin and pmax, e.g. + clamp( a, x, b) is the same as pmax( b, pmin(x, a) ) + \item New function: \code{self_match} which implements something + similar to \code{match( x, unique( x ) )} + } + \item Changes in Rcpp API: + \itemize{ + \item The \code{Vector} template class (hence \code{NumericVector} + ...) get the \code{is_na} and the \code{get_na} static methods. + \item New helper class \code{no_init} that can be used to + create a vector without initializing its data, e.g. : + \code{ IntegerVector out = no_init(n) ; } + \item New exception constructor requiring only a message; \code{stop} + function to throw an exception + \item \code{DataFrame} gains a \code{nrows} method + } + \item Changes in Rcpp attributes: + \itemize{ + \item Ability to embed R code chunks (via specially formatted + block comments) in C++ source files. + \item Allow specification of argument defaults for exported functions. + \item New scheme for more flexible mixing of generated and user composed + C++ headers. + \item Print warning if no export attributes are found in source file. + \item Updated vignette with additional documentation on exposing + C++ interfaces from packages and signaling errors. + } + \item Changes in Rcpp modules: + \itemize{ + \item Enclose .External invocations in \code{BEGIN_RCPP}/\code{END_RCPP} + } + \item Changes in R code : + \itemize{ + \item New function \code{areMacrosDefined} + \item Additions to \code{Rcpp.package.skeleton}: + \itemize{ + \item \code{attributes} parameter to generate a version of + \code{rcpp_hello_world} that uses \code{Rcpp::export}. + \item \code{cpp_files} parameter to provide a list of C++ + files to include the in the \code{src} directory of the package. + } + } + \item Miscellaneous changes: + \itemize{ + \item New example 'pi simulation' using R and C++ via Rcpp attributes + } + } +} +\section{Changes in Rcpp version 0.10.0 (2012-11-13)}{ + \itemize{ + \item Support for C++11 style attributes (embedded in comments) to enable + use of C++ within interactive sessions and to automatically generate module + declarations for packages: + \itemize{ + \item Rcpp::export attribute to export a C++ function to R + \item \code{sourceCpp()} function to source exported functions from a file + \item \code{cppFunction()} and \code{evalCpp()} functions for inline declarations + and execution + \item \code{compileAttribtes()} function to generate Rcpp modules from + exported functions within a package + \item Rcpp::depends attribute for specifying additional build + dependencies for \code{sourceCpp()} + \item Rcpp::interfaces attribute to specify the external bindings + \code{compileAttributes()} should generate (defaults to R-only but a + C++ include file using R_GetCCallable can also be generated) + \item New vignette "Rcpp-attribute" + } + \item Rcpp modules feature set has been expanded: + \itemize{ + \item Functions and methods can now return objects from classes that + are exposed through modules. This uses the make_new_object template + internally. This feature requires that some class traits are declared + to indicate Rcpp's \code{wrap}/\code{as} system that these classes are covered + by modules. The macro RCPP_EXPOSED_CLASS and RCPP_EXPOSED_CLASS_NODECL + can be used to declared these type traits. + \item Classes exposed through modules can also be used as parameters + of exposed functions or methods. + \item Exposed classes can declare factories with ".factory". A factory + is a c++ function that returns a pointer to the target class. It is + assumed that these objects are allocated with new on the factory. On the + R side, factories are called just like other constructors, with the + "new" function. This feature allows an alternative way to construct + objects. + \item "converter" can be used to declare a way to convert an object + of a type to another type. This gets translated to the appropriate + "as" method on the R side. + \item Inheritance. A class can now declare that it inherits from + another class with the .derives( "Parent" ) notation. As a result + the exposed class gains methods and properties (fields) from its + parent class. + } + \item New sugar functions: + \itemize{ + \item \code{which_min} implements which.min. Traversing the sugar expression + and returning the index of the first time the minimum value is found. + \item \code{which_max} idem + \item \code{unique} uses unordered_set to find unique values. In particular, + the version for CharacterVector is found to be more efficient than + R's version + \item \code{sort_unique} calculates unique values and then sorts them. + } + \item Improvements to output facilities: + \itemize{ + \item Implemented \code{sync()} so that flushing output streams works + \item Added \code{Rcerr} output stream (forwarding to + \code{REprintf}) + } + \item Provide a namespace 'R' for the standalone Rmath library so + that Rcpp users can access those functions too; also added unit tests + \item Development releases sets variable RunAllRcppTests to yes to + run all tests (unless it was alredy set to 'no'); CRAN releases do + not and still require setting -- which helps with the desired CRAN + default of less testing at the CRAN server farm. + } +} + +\section{Changes in Rcpp version 0.9.15 (2012-10-13)}{ + \itemize{ + \item Untangling the clang++ build issue about the location of the + exceptions header by directly checking for the include file -- an + approach provided by Martin Morgan in a kindly contributed patch + as unit tests for them. + \item The \code{Date} and \code{Datetime} types now correctly + handle \code{NA}, \code{NaN} and \code{Inf} representation; the + \code{Date} type switched to an internal representation via \code{double} + \item Added \code{Date} and \code{Datetime} unit tests for the new + features + \item An additional \code{PROTECT} was added for parsing exception + messages before returning them to R, following a report by Ben North + } +} + +\section{Changes in Rcpp version 0.9.14 (2012-09-30)}{ + \itemize{ + \item Added new Rcpp sugar functions trunc(), round() and signif(), as well + as unit tests for them + \item Be more conservative about where we support clang++ and the inclusion + of exception_defines.h and prevent this from being attempted on OS X + where it failed for clang 3.1 + \item Corrected a typo in Module.h which now again permits use of finalizers + \item Small correction for (unexported) bib() function (which provides a path + to the bibtex file that ships with Rcpp) + \item Converted NEWS to NEWS.Rd + } +} +\section{Changes in Rcpp version 0.9.13 (2012-06-28)}{ + \itemize{ + \item Truly corrected Rcpp::Environment class by having default constructor + use the global environment, and removing the default argument of + global environment from the SEXP constructor + \item Added tests for clang++ version to include bits/exception_defines.h + for versions 3.0 or higher (similar to g++ 4.6.0 or later), needed to + include one particular exceptions header + \item Made more regression tests conditional on the RunAllRcppTests to come + closer to the CRAN mandate of running tests in sixty seconds + \item Updated unit test wrapper tests/doRUnit.R as well as unitTests/runTests.R + } +} +\section{Changes in Rcpp version 0.9.12 (2012-06-23)}{ + \itemize{ + \item Corrected Rcpp::Environment class by removing (empty) ctor following + rev3592 (on May 2) where default argument for ctor was moved + \item Unit testing now checks for environment variable RunAllRcppTests being + set to "yes"; otherwise some tests are skipped. This is arguably not + the right thing to do, but CRAN maintainers insist on faster tests. + \item Unit test wrapper script runTests.R has new option --allTests to set + the environment variable + \item The cleanup script now also considers inst/unitTests/testRcppClass/src + } +} +\section{Changes in Rcpp version 0.9.11 (2012-06-22)}{ + \itemize{ + \item New member function for vectors (and lists etc) containsElementNamed() + which returns a boolean indicating if the given element name is present + \item Updated the Rcpp.package.skeleton() support for Rcpp modules by + carrying functions already present from the corresponding unit test + which was also slightly expanded; and added more comments to the code + \item Rcpp modules can now be loaded via loadRcppModules() from .onLoad(), + or via loadModule("moduleName") from any R file + \item Extended functionality to let R modify C++ clases imported via modules + documented in help(setRcppClass) + \item Support compilation in Cygwin thanks to a patch by Dario Buttari + \item Extensions to the Rcpp-FAQ and the Rcpp-modules vignettes + \item The minium version of R is now 2.15.1 which is required for some of + the Rcpp modules support + } +} +\section{Changes in Rcpp version 0.9.10 (2012-02-16)}{ + \itemize{ + \item Rearrange headers so that Rcpp::Rcout can be used by RcppArmadillo et al + \item New Rcpp sugar function mapply (limited to two or three input vectors) + \item Added custom version of the Rcpp sugar diff function for numeric vectors + skipping unncesserry checks for NA + \item Some internal code changes to reflect changes and stricter requirements + in R CMD check in the current R-devel versions + \item Corrected fixed-value initialization for IntegerVector (with thanks to + Gregor Kastner for spotting this) + \item New Rcpp-FAQ entry on simple way to set compiler option for cxxfunction + } +} +\section{Changes in Rcpp version 0.9.9 (2012-12-25)}{ + \itemize{ + \item Reverting the 'int64' changes from release 0.9.8 which adversely + affect packages using Rcpp: We will re-apply the 'int64' changes in a + way which should cooperate more easily with 'long' and 'unsigned long'. + \item Unit test output directory fallback changed to use Rcpp.Rcheck + \item Conditioned two unit tests to not run on Windows where they now break + whereas they passed before, and continue to pass on other OSs + } +} +\section{Changes in Rcpp version 0.9.8 (2011-12-21)}{ + \itemize{ + \item wrap now handles 64 bit integers (int64_t, uint64_t) and containers + of them, and Rcpp now depends on the int64 package (also on CRAN). + This work has been sponsored by the Google Open Source Programs + Office. + \item Added setRcppClass() function to create extended reference classes + with an interface to a C++ class (typically via Rcpp Module) which + can have R-based fields and methods in addition to those from the C++. + \item Applied patch by Jelmer Ypma which adds an output stream class + 'Rcout' not unlike std::cout, but implemented via Rprintf to + cooperate with R and its output buffering. + \item New unit tests for pf(), pnf(), pchisq(), pnchisq() and pcauchy() + \item XPtr constructor now checks for corresponding type in SEXP + \item Updated vignettes for use with updated highlight package + \item Update linking command for older fastLm() example using external + Armadillo + } +} +\section{Changes in Rcpp version 0.9.7 (2011-09-29)}{ + \itemize{ + \item Applied two patches kindly provided by Martyn Plummer which provide + support for compilation on Solaris using the SunPro compiler + \item Minor code reorganisation in which exception specifiers are removed; + this effectively only implements a run-time (rather than compile-time) + check and is generally seen as a somewhat depreated C++ idiom. Thanks + to Darren Cook for alerting us to this issue. + \item New example 'OpenMPandInline.r' in the OpenMP/ directory, showing how + easily use OpenMP by modifying the RcppPlugin output + \item New example 'ifelseLooped.r' showing Rcpp can accelerate loops that may + be difficult to vectorise due to dependencies + \item New example directory examples/Misc/ regrouping the new example as + well as the fibonacci example added in Rcpp 0.9.6 + \item New Rcpp-FAQ example warning of lossy conversion from 64-bit long + integer types into a 53-bit mantissa which has no clear fix yet. + \item New unit test for accessing a non-exported function from a namespace + } +} +\section{Changes in Rcpp version 0.9.6 (2011-07-26)}{ + \itemize{ + \item Added helper traits to facilitate implementation of the RcppEigen + package: The is_eigen_base traits identifies if a class derives from + EigenBase using SFINAE; and new dispatch layer was added to wrap() to + help RcppEigen + \item XPtr now accepts a second template parameter, which is a function + taking a pointer to the target class. This allows the developper to + supply his/her own finalizer. The template parameter has a default + value which retains the original behaviour (calling delete on the + pointer) + \item New example RcppGibbs, extending Sanjog Misra's Rcpp illustration of + Darren Wilkinson's comparison of MCMC Gibbs Sampler implementations; + also added short timing on Normal and Gaussian RNG draws between Rcpp + and GSL as R's rgamma() is seen to significantly slower + \item New example on recursively computing a Fibonacci number using Rcpp and + comparing this to R and byte-compiled R for a significant speed gain + } +} +\section{Changes in Rcpp version 0.9.5 (2011-07-05)}{ + \itemize{ + \item New Rcpp-FAQ examples on using the plugin maker for inline's + cxxfunction(), and on setting row and column names for matrices + \item New sugar functions: mean, var, sd + \item Minor correction and extension to STL documentation in Rcpp-quickref + \item wrap() is now resilient to NULL pointers passed as in const char * + \item loadRcppModules() gains a "direct" argument to expose the module instead + of exposing what is inside it + \item Suppress a spurious warning from R CMD check on packages created with + Rcpp.package.skeleton(..., module=TRUE) + \item Some fixes and improvements for Rcpp sugar function 'rlnorm()' + \item Beginnings of new example using OpenMP and recognising user interrupts + } +} +\section{Changes in Rcpp version 0.9.4 (2011-04-12)}{ + \itemize{ + \item New R function "loadRcppModules" to load Rcpp modules automatically + from a package. This function must be called from the .onLoad function + and works with the "RcppModules" field of the package's DESCRIPTION file + \item The Modules example wrapped the STL std::vector received some editing + to disambiguate some symbols the newer compilers did not like + \item Coercing of vectors of factors is now done with an explicit callback + to R's "as.character()" as Rf_coerceVector no longer plays along + \item A CITATION file for the published JSS paper has been added, and + references were added to Rcpp-package.Rd and the different vignettes + } +} +\section{Changes in Rcpp version 0.9.3 (2011-04-05)}{ + \itemize{ + \item Fixed a bug in which modules code was not behaving when compiled + twice as can easily happen with inline'ed version + \item Exceptions code includes exception_defines.h only when g++ is 4.5 or + younger as the file no longer exists with g++-4.6 + \item The documentation Makefile now uses the $R_HOME environment variable + \item The documentation Makefile no longer calls clean in the all target + \item C++ conformance issue found by clang/llvm addressed by re-ordering + declarations in grow.h as unqualified names must be declared before + they are used, even when used within templates + \item The 'long long' typedef now depends on C++0x being enabled as this + was not a feature in C++98; this suppresses a new g++-4.5 warning + \item The Rcpp-introduction vignette was updated to the forthcoming JSS paper + } +} +\section{Changes in Rcpp version 0.9.2 (2011-02-23)}{ + \itemize{ + \item The unitTest runit.Module.client.package.R is now skipped on older OS + X releases as it triggers a bug with g++ 4.2.1 or older; OS X 10.6 is + fine but as it no longer support ppc we try to accomodate 10.5 too + Thanks to Simon Urbanek for pinning this down and Baptiste Auguie + and Ken Williams for additonal testing + \item RcppCommon.h now recognises the Intel Compiler thanks to a short + patch by Alexey Stukalov; this turns off Cxx0x and TR1 features too + \item Three more setup questions were added to the Rcpp-FAQ vignette + \item One question about RcppArmadillo was added to the Rcpp-FAQ vignette + } +} +\section{Changes in Rcpp version 0.9.1 (2011-02-14)}{ + \itemize{ + \item A number of internal changes to the memory allocation / protection of + temporary objects were made---with a heartfelt "Thank You!" to both + Doug Bates for very persistent debugging of Rcpp modules code, and to + Luke Tierney who added additional memory allocation debugging tools + to R-devel (which will be in R 2.13.0 and may also be in R 2.12.2) + \item Removed another GNU Make-specific variable from src/Makevars in order + to make the build more portable; this was noticed on FreeBSD + \item On *BSD, do not try to compute a stack trace but provide file and + line number (which is the same behaviour as implemented in Windows) + \item Fixed an int conversion bug reported by Daniel Sabanes Bove on r-devel, + added unit test as well + \item Added unit tests for complex-typed vectors (thanks to Christian Gunning) + \item Expanded the Rcpp-quickref vignette (with thanks to Christian Gunning) + \item Additional examples were added to the Rcpp-FAQ vignette + } +} +\section{Changes in Rcpp version 0.9.0 (2010-12-19)}{ + \itemize{ + \item The classic API was factored out into its own package RcppClassic which + is released concurrently with this version. + \item If an object is created but not initialized, attempting to use + it now gives a more sensible error message (by forwarding an + Rcpp::not_initialized exception to R). + \item SubMatrix fixed, and Matrix types now have a nested ::Sub typedef. + \item New unexported function SHLIB() to aid in creating a shared library on + the command-line or in Makefile (similar to CxxFlags() / LdFlags()). + \item Module gets a seven-argument ctor thanks to a patch from Tama Ma. + \item The (still incomplete) QuickRef vignette has grown thanks to a patch + by Christian Gunning. + \item Added a sprintf template intended for logging and error messages. + \item Date::getYear() corrected (where addition of 1900 was not called for); + corresponding change in constructor from three ints made as well. + \item Date() and Datetime() constructors from string received a missing + conversion to int and double following strptime. The default format + string for the Datetime() strptime call was also corrected. + \item A few minor fixes throughout, see ChangeLog. + } +} +\section{Changes in Rcpp version 0.8.9 (2010-11-27)}{ + \itemize{ + \item Many improvements were made in 'Rcpp modules': + - exposing multiple constructors + - overloaded methods + - self-documentation of classes, methods, constructors, fields and + functions. + - new R function "populate" to facilitate working with modules in + packages. + - formal argument specification of functions. + - updated support for Rcpp.package.skeleton. + - constructors can now take many more arguments. + \item The 'Rcpp-modules' vignette was updated as well and describe many + of the new features + \item New template class Rcpp::SubMatrix and support syntax in Matrix + to extract a submatrix: + NumericMatrix x = ... ; + // extract the first three columns + SubMatrix y = x( _ , Range(0,2) ) ; + // extract the first three rows + SubMatrix y = x( Range(0,2), _ ) ; + // extract the top 3x3 sub matrix + SubMatrix y = x( Range(0,2), Range(0,2) ) ; + \item Reference Classes no longer require a default constructor for + subclasses of C++ classes + \item Consistently revert to using backticks rather than shell expansion + to compute library file location when building packages against Rcpp + on the default platforms; this has been applied to internal test + packages as well as CRAN/BioC packages using Rcpp + } +} +\section{Changes in Rcpp version 0.8.8 (2010-11-01)}{ + \itemize{ + \item New syntactic shortcut to extract rows and columns of a Matrix. + x(i,_) extracts the i-th row and x(_,i) extracts the i-th column. + \item Matrix indexing is more efficient. However, faster indexing is + disabled if g++ 4.5.0 or later is used. + \item A few new Rcpp operators such as cumsum, operator=(sugar) + \item Variety of bug fixes: + - column indexing was incorrect in some cases + - compilation using clang/llvm (thanks to Karl Millar for the patch) + - instantation order of Module corrected + - POSIXct, POSIXt now correctly ordered for R 2.12.0 + } +} +\section{Changes in Rcpp version 0.8.7 (2010-10-15)}{ + \itemize{ + \item As of this version, Rcpp depends on R 2.12 or greater as it interfaces + the new reference classes (see below) and also reflects the POSIXt + class reordering both of which appeared with R version 2.12.0 + \item new Rcpp::Reference class, that allows internal manipulation of R + 2.12.0 reference classes. The class exposes a constructor that takes + the name of the target reference class and a field(string) method + that implements the proxy pattern to get/set reference fields using + callbacks to the R operators "$" and "$<-" in order to preserve the + R-level encapsulation + \item the R side of the preceding item allows methods to be written in R as + per ?ReferenceClasses, accessing fields by name and assigning them + using "<<-". Classes extracted from modules are R reference classes. + They can be subclassed in R, and/or R methods can be defined using + the $methods(...) mechanism. + \item internal performance improvements for Rcpp sugar as well as an added + 'noNA()' wrapper to omit tests for NA values -- see the included + examples in inst/examples/convolveBenchmarks for the speedups + \item more internal performance gains with Functions and Environments + } +} +\section{Changes in Rcpp version 0.8.6 (2010-09-09)}{ + \itemize{ + \item new macro RCPP_VERSION and Rcpp_Version to allow conditional compiling + based on the version of Rcpp + #if defined(RCPP_VERSION) && RCPP_VERSION >= Rcpp_Version(0,8,6) + #endif + \item new sugar functions for statistical distributions (d-p-q-r functions) + with distributions : unif, norm, gamma, chisq, lnorm, weibull, logis, + f, pois, binom, t, beta. + \item new ctor for Vector taking size and function pointer so that for example + NumericVector( 10, norm_rand ) + generates a N(0,1) vector of size 10 + \item added binary operators for complex numbers, as well as sugar support + \item more sugar math functions: sqrt, log, log10, exp, sin, cos, ... + \item started new vignette Rcpp-quickref : quick reference guide of Rcpp API + (still work in progress) + \item various patches to comply with solaris/suncc stricter standards + \item minor enhancements to ConvolutionBenchmark example + \item simplified src/Makefile to no longer require GNU make; packages using + Rcpp still do for the compile-time test of library locations + } +} +\section{Changes in Rcpp version 0.8.5 (2010-07-25)}{ + \itemize{ + \item speed improvements. Vector::names, RObject::slot have been improved + to take advantage of R API functions instead of callbacks to R + \item Some small updates to the Rd-based documentation which now points to + content in the vignettes. Also a small formatting change to suppress + a warning from the development version of R. + \item Minor changes to Date() code which may reenable SunStudio builds + } +} +\section{Changes in Rcpp version 0.8.4 (2010-07-09)}{ + \itemize{ + \item new sugar vector functions: rep, rep_len, rep_each, rev, head, tail, + diag + \item sugar has been extended to matrices: The Matrix class now extends the + Matrix_Base template that implements CRTP. Currently sugar functions + for matrices are: outer, col, row, lower_tri, upper_tri, diag + \item The unit tests have been reorganised into fewer files with one call + each to cxxfunction() (covering multiple tests) resulting in a + significant speedup + \item The Date class now uses the same mktime() replacement that R uses + (based on original code from the timezone library by Arthur Olson) + permitting wide date ranges on all operating systems + \item The FastLM example has been updated, a new benchmark based on the + historical Longley data set has been added + \item RcppStringVector now uses std::vector internally + \item setting the .Data slot of S4 objects did not work properly + } +} +\section{Changes in Rcpp version 0.8.3 (2010-06-27)}{ + \itemize{ + \item This release adds Rcpp sugar which brings (a subset of) the R syntax + into C++. This supports : + - binary operators : <,>,<=,>=,==,!= between R vectors + - arithmetic operators: +,-,*,/ between compatible R vectors + - several functions that are similar to the R function of the same name: + abs, all, any, ceiling, diff, exp, ifelse, is_na, lapply, pmin, pmax, + pow, sapply, seq_along, seq_len, sign + Simple examples : + // two numeric vector of the same size + NumericVector x ; + NumericVector y ; + NumericVector res = ifelse( x < y, x*x, -(y*y) ) ; + // sapply'ing a C++ function + double square( double x )\{ return x*x ; \} + NumericVector res = sapply( x, square ) ; + Rcpp sugar uses the technique of expression templates, pioneered by the + Blitz++ library and used in many libraries (Boost::uBlas, Armadillo). + Expression templates allow lazy evaluation of expressions, which + coupled with inlining generates very efficient code, very closely + approaching the performance of hand written loop code, and often + much more efficient than the equivalent (vectorized) R code. + Rcpp sugar is curently limited to vectors, future releases will + include support for matrices with sugar functions such as outer, etc ... + Rcpp sugar is documented in the Rcpp-sugar vignette, which contains + implementation details. + \item New helper function so that "Rcpp?something" brings up Rcpp help + \item Rcpp Modules can now expose public data members + \item New classes Date, Datetime, DateVector and DatetimeVector with proper + 'new' API integration such as as(), wrap(), iterators, ... + \item The so-called classic API headers have been moved to a subdirectory + classic/ This should not affect client-code as only Rcpp.h was ever + included. + \item RcppDate now has a constructor from SEXP as well + \item RcppDateVector and RcppDatetimeVector get constructors from int + and both const / non-const operator(int i) functions + \item New API class Rcpp::InternalFunction that can expose C++ functions + to R without modules. The function is exposed as an S4 object of + class C++Function + } +} +\section{Changes in Rcpp version 0.8.2 (2010-06-09)}{ + \itemize{ + \item Bug-fix release for suncc compiler with thanks to Brian Ripley for + additional testing. + } +} +\section{Changes in Rcpp version 0.8.1 (2010-06-08)}{ + \itemize{ + \item This release adds Rcpp modules. An Rcpp module is a collection of + internal (C++) functions and classes that are exposed to R. This + functionality has been inspired by Boost.Python. + Modules are created internally using the RCPP_MODULE macro and + retrieved in the R side with the Module function. This is a preview + release of the module functionality, which will keep improving until + the Rcpp 0.9.0 release. + The new vignette "Rcpp-modules" documents the current feature set of + Rcpp modules. + \item The new vignette "Rcpp-package" details the steps involved in making a + package that uses Rcpp. + \item The new vignette "Rcpp-FAQ" collects a number of frequently asked + questions and answers about Rcpp. + \item The new vignette "Rcpp-extending" documents how to extend Rcpp + with user defined types or types from third party libraries. Based on + our experience with RcppArmadillo + \item Rcpp.package.skeleton has been improved to generate a package using + an Rcpp module, controlled by the "module" argument + \item Evaluating a call inside an environment did not work properly + \item cppfunction has been withdrawn since the introduction of the more + flexible cxxfunction in the inline package (0.3.5). Rcpp no longer + depends on inline since many uses of Rcpp do not require inline at + all. We still use inline for unit tests but this is now handled + locally in the unit tests loader runTests.R. + Users of the now-withdrawn function cppfunction can redefine it as: + cppfunction <- function(...) cxxfunction( ..., plugin = "Rcpp" ) + \item Support for std::complex was incomplete and has been enhanced. + \item The methods XPtr::getTag and XPtr::getProtected are deprecated, + and will be removed in Rcpp 0.8.2. The methods tag() and prot() should + be used instead. tag() and prot() support both LHS and RHS use. + \item END_RCPP now returns the R Nil values; new macro VOID_END_RCPP + replicates prior behabiour + } +} +\section{Changes in Rcpp version 0.8.0 (2010-05-17)}{ + \itemize{ + \item All Rcpp headers have been moved to the inst/include directory, + allowing use of 'LinkingTo: Rcpp'. But the Makevars and Makevars.win + are still needed to link against the user library. + \item Automatic exception forwarding has been withdrawn because of + portability issues (as it did not work on the Windows platform). + Exception forwarding is still possible but is now based on explicit + code of the form: + try \{ + // user code + \} catch( std::exception& __ex__)\{ + forward_exception_to_r( __ex___ ) ; + Alternatively, the macro BEGIN_RCPP and END_RCPP can use used to enclose + code so that it captures exceptions and forward them to R. + BEGIN_RCPP + // user code + END_RCPP + \item new __experimental__ macros + The macros RCPP_FUNCTION_0, ..., RCPP_FUNCTION_65 to help creating C++ + functions hiding some code repetition: + RCPP_FUNCTION_2( int, foobar, int x, int y)\{ + return x + y ; + The first argument is the output type, the second argument is the + name of the function, and the other arguments are arguments of the + C++ function. Behind the scenes, the RCPP_FUNCTION_2 macro creates an + intermediate function compatible with the .Call interface and handles + exceptions + Similarly, the macros RCPP_FUNCTION_VOID_0, ..., RCPP_FUNCTION_VOID_65 + can be used when the C++ function to create returns void. The generated + R function will return R_NilValue in this case. + RCPP_FUNCTION_VOID_2( foobar, std::string foo )\{ + // do something with foo + The macro RCPP_XP_FIELD_GET generates a .Call compatible function that + can be used to access the value of a field of a class handled by an + external pointer. For example with a class like this: + class Foo\{ + public: + int bar ; + RCPP_XP_FIELD_GET( Foo_bar_get, Foo, bar ) ; + RCPP_XP_FIELD_GET will generate the .Call compatible function called + Foo_bar_get that can be used to retrieved the value of bar. + The macro RCPP_FIELD_SET generates a .Call compatible function that + can be used to set the value of a field. For example: + RCPP_XP_FIELD_SET( Foo_bar_set, Foo, bar ) ; + generates the .Call compatible function called "Foo_bar_set" that + can be used to set the value of bar + The macro RCPP_XP_FIELD generates both getter and setter. For example + RCPP_XP_FIELD( Foo_bar, Foo, bar ) + generates the .Call compatible Foo_bar_get and Foo_bar_set using the + macros RCPP_XP_FIELD_GET and RCPP_XP_FIELD_SET previously described + The macros RCPP_XP_METHOD_0, ..., RCPP_XP_METHOD_65 faciliate + calling a method of an object that is stored in an external pointer. For + example: + RCPP_XP_METHOD_0( foobar, std::vector , size ) + creates the .Call compatible function called foobar that calls the + size method of the std::vector class. This uses the Rcpp::XPtr< + std::vector > class. + The macros RCPP_XP_METHOD_CAST_0, ... is similar but the result of + the method called is first passed to another function before being + wrapped to a SEXP. For example, if one wanted the result as a double + RCPP_XP_METHOD_CAST_0( foobar, std::vector , size, double ) + The macros RCPP_XP_METHOD_VOID_0, ... are used when calling the + method is only used for its side effect. + RCPP_XP_METHOD_VOID_1( foobar, std::vector, push_back ) + Assuming xp is an external pointer to a std::vector, this could + be called like this : + .Call( "foobar", xp, 2L ) + \item Rcpp now depends on inline (>= 0.3.4) + \item A new R function "cppfunction" was added which invokes cfunction from + inline with focus on Rcpp usage (enforcing .Call, adding the Rcpp + namespace, set up exception forwarding). cppfunction uses BEGIN_RCPP + and END_RCPP macros to enclose the user code + \item new class Rcpp::Formula to help building formulae in C++ + \item new class Rcpp::DataFrame to help building data frames in C++ + \item Rcpp.package.skeleton gains an argument "example_code" and can now be + used with an empty list, so that only the skeleton is generated. It + has also been reworked to show how to use LinkingTo: Rcpp + \item wrap now supports containers of the following types: long, long double, + unsigned long, short and unsigned short which are silently converted + to the most acceptable R type. + \item Revert to not double-quote protecting the path on Windows as this + breaks backticks expansion used n Makevars.win etc + \item Exceptions classes have been moved out of Rcpp classes, + e.g. Rcpp::RObject::not_a_matrix is now Rcpp::not_a_matrix + } +} +\section{Changes in Rcpp version 0.7.12 (2010-04-16)}{ + \itemize{ + \item Undo shQuote() to protect Windows path names (which may contain + spaces) as backticks use is still broken; use of $(shell ...) works + } +} +\section{Changes in Rcpp version 0.7.11 (2010-03-26)}{ + \itemize{ + \item Vector<> gains a set of templated factory methods "create" which + takes up to 20 arguments and can create named or unnamed vectors. + This greatly facilitates creating objects that are returned to R. + \item Matrix now has a diag() method to create diagonal matrices, and + a new constructor using a single int to create square matrices + \item Vector now has a new fill() method to propagate a single value + \item Named is no more a class but a templated function. Both interfaces + Named(.,.) and Named(.)=. are preserved, and extended to work also on + simple vectors (through Vector<>::create) + \item Applied patch by Alistair Gee to make ColDatum more robust + \item Fixed a bug in Vector that caused random behavior due to the lack of + copy constructor in the Vector template + } +} +\section{Changes in Rcpp version 0.7.10 (2010-03-15)}{ + \itemize{ + \item new class Rcpp::S4 whose constructor checks if the object is an S4 + object + \item maximum number of templated arguments to the pairlist function, the + DottedPair constructor, the Language constructor and the Pairlist + constructor has been updated to 20 (was 5) and a script has been + added to the source tree should we want to change it again + \item use shQuote() to protect Windows path names (which may contain spaces) + } +} +\section{Changes in Rcpp version 0.7.9 (2010-03-12)}{ + \itemize{ + \item Another small improvement to Windows build flags + \item bugfix on 64 bit platforms. The traits classes (wrap_type_traits, etc) + used size_t when they needed to actually use unsigned int + \item fixed pre gcc 4.3 compatibility. The trait class that was used to + identify if a type is convertible to another had too many false + positives on pre gcc 4.3 (no tr1 or c++0x features). fixed by + implementing the section 2.7 of "Modern C++ Design" book. + } +} +\section{Changes in Rcpp version 0.7.8 (2010-03-09)}{ + \itemize{ + \item All vector classes are now generated from the same template class + Rcpp::Vector where RTYPE is one of LGLSXP, RAWSXP, STRSXP, + INTSXP, REALSXP, CPLXSXP, VECSXP and EXPRSXP. typedef are still + available : IntegerVector, ... All vector classes gain methods + inspired from the std::vector template : push_back, push_front, + erase, insert + \item New template class Rcpp::Matrix deriving from + Rcpp::Vector. These classes have the same functionality + as Vector but have a different set of constructors which checks + that the input SEXP is a matrix. Matrix<> however does/can not + guarantee that the object will allways be a matrix. typedef + are defined for convenience: Matrix is IntegerMatrix, etc... + \item New class Rcpp::Row that represents a row of a matrix + of the same type. Row contains a reference to the underlying + Vector and exposes a nested iterator type that allows use of + STL algorithms on each element of a matrix row. The Vector class + gains a row(int) method that returns a Row instance. Usage + examples are available in the runit.Row.R unit test file + \item New class Rcpp::Column that represents a column of a + matrix. (similar to Rcpp::Row). Usage examples are + available in the runit.Column.R unit test file + \item The Rcpp::as template function has been reworked to be more + generic. It now handles more STL containers, such as deque and + list, and the genericity can be used to implement as for more + types. The package RcppArmadillo has examples of this + \item new template class Rcpp::fixed_call that can be used in STL algorithms + such as std::generate. + \item RcppExample et al have been moved to a new package RcppExamples; + src/Makevars and src/Makevars.win simplified accordingly + \item New class Rcpp::StringTransformer and helper function + Rcpp::make_string_transformer that can be used to create a function + that transforms a string character by character. For example + Rcpp::make_string_transformer(tolower) transforms each character + using tolower. The RcppExamples package has an example of this. + \item Improved src/Makevars.win thanks to Brian Ripley + \item New examples for 'fast lm' using compiled code: + - using GNU GSL and a C interface + - using Armadillo (http://arma.sf.net) and a C++ interface + Armadillo is seen as faster for lack of extra copying + \item A new package RcppArmadillo (to be released shortly) now serves + as a concrete example on how to extend Rcpp to work with a modern + C++ library such as the heavily-templated Armadillo library + \item Added a new vignette 'Rcpp-introduction' based on a just-submitted + overview article on Rcpp + } +} +\section{Changes in Rcpp version 0.7.7 (2010-02-14)}{ + \itemize{ + \item new template classes Rcpp::unary_call and Rcpp::binary_call + that facilitates using R language calls together + with STL algorithms. + \item fixed a bug in Language constructors taking a string as their + first argument. The created call was wrong. + } +} +\section{Changes in Rcpp version 0.7.6 (2010-02-12)}{ + \itemize{ + \item SEXP_Vector (and ExpressionVector and GenericVector, a.k.a List) now + have methods push_front, push_back and insert that are templated + \item SEXP_Vector now has int- and range-valued erase() members + \item Environment class has a default constructor (for RInside) + \item SEXP_Vector_Base factored out of SEXP_Vector (Effect. C++ #44) + \item SEXP_Vector_Base::iterator added as well as begin() and end() + so that STL algorithms can be applied to Rcpp objects + \item CharacterVector gains a random access iterator, begin() and end() to + support STL algorithms; iterator dereferences to a StringProxy + \item Restore Windows build; successfully tested on 32 and 64 bit; + \item Small fixes to inst/skeleton files for bootstrapping a package + \item RObject::asFoo deprecated in favour of Rcpp::as + } +} +\section{Changes in Rcpp version 0.7.5 (2010-02-08)}{ + \itemize{ + \item wrap has been much improved. wrappable types now are : + - primitive types : int, double, Rbyte, Rcomplex, float, bool + - std::string + - STL containers which have iterators over wrappable types: + (e.g. std::vector, std::deque, std::list, etc ...). + - STL maps keyed by std::string, e.g std::map + - classes that have implicit conversion to SEXP + - classes for which the wrap template if fully or partly specialized + This allows composition, so for example this class is wrappable: + std::vector< std::map > (if T is wrappable) + \item The range based version of wrap is now exposed at the Rcpp:: + level with the following interface : + Rcpp::wrap( InputIterator first, InputIterator last ) + This is dispatched internally to the most appropriate implementation + using traits + \item a new namespace Rcpp::traits has been added to host the various + type traits used by wrap + \item The doxygen documentation now shows the examples + \item A new file inst/THANKS acknowledges the kind help we got from others + \item The RcppSexp has been removed from the library. + \item The methods RObject::asFoo are deprecated and will be removed + in the next version. The alternative is to use as. + \item The method RObject::slot can now be used to get or set the + associated slot. This is one more example of the proxy pattern + \item Rcpp::VectorBase gains a names() method that allows getting/setting + the names of a vector. This is yet another example of the + proxy pattern. + \item Rcpp::DottedPair gains templated operator<< and operator>> that + allow wrap and push_back or wrap and push_front of an object + \item Rcpp::DottedPair, Rcpp::Language, Rcpp::Pairlist are less + dependent on C++0x features. They gain constructors with up + to 5 templated arguments. 5 was choosed arbitrarily and might + be updated upon request. + \item function calls by the Rcpp::Function class is less dependent + on C++0x. It is now possible to call a function with up to + 5 templated arguments (candidate for implicit wrap) + \item added support for 64-bit Windows (thanks to Brian Ripley and Uwe Ligges) + } +} +\section{Changes in Rcpp version 0.7.4 (2010-01-30)}{ + \itemize{ + \item matrix-like indexing using operator() for all vector + types : IntegerVector, NumericVector, RawVector, CharacterVector + LogicalVector, GenericVector and ExpressionVector. + \item new class Rcpp::Dimension to support creation of vectors with + dimensions. All vector classes gain a constructor taking a + Dimension reference. + \item an intermediate template class "SimpleVector" has been added. All + simple vector classes are now generated from the SimpleVector + template : IntegerVector, NumericVector, RawVector, CharacterVector + LogicalVector. + \item an intermediate template class "SEXP_Vector" has been added to + generate GenericVector and ExpressionVector. + \item the clone template function was introduced to explicitely + clone an RObject by duplicating the SEXP it encapsulates. + \item even smarter wrap programming using traits and template + meta-programming using a private header to be include only + RcppCommon.h + \item the as template is now smarter. The template now attempts to + build an object of the requested template parameter T by using the + constructor for the type taking a SEXP. This allows third party code + to create a class Foo with a constructor Foo(SEXP) to have + as for free. + \item wrap becomes a template. For an object of type T, wrap uses + implicit conversion to SEXP to first convert the object to a SEXP + and then uses the wrap(SEXP) function. This allows third party + code creating a class Bar with an operator SEXP() to have + wrap for free. + \item all specializations of wrap : wrap, wrap< vector > + use coercion to deal with missing values (NA) appropriately. + \item configure has been withdrawn. C++0x features can now be activated + by setting the RCPP_CXX0X environment variable to "yes". + \item new template r_cast to facilitate conversion of one SEXP + type to another. This is mostly intended for internal use and + is used on all vector classes + \item Environment now takes advantage of the augmented smartness + of as and wrap templates. If as makes sense, one can + directly extract a Foo from the environment. If wrap makes + sense then one can insert a Bar directly into the environment. + Foo foo = env["x"] ; /* as is used */ + Bar bar ; + env["y"] = bar ; /* wrap is used */ + \item Environment::assign becomes a template and also uses wrap to + create a suitable SEXP + \item Many more unit tests for the new features; also added unit tests + for older API + } +} +\section{Changes in Rcpp version 0.7.3 (2010-01-21)}{ + \itemize{ + \item New R function Rcpp.package.skeleton, modelled after + utils::package.skeleton to help creating a package with support + for Rcpp use. + \item indexing is now faster for simple vectors due to inlining of + the operator[] and caching the array pointer + \item The class Rcpp::VectorBase was introduced. All vector classes + derive from it. The class handles behaviour that is common + to all vector types: length, names, etc ... + \item exception forwarding is extended to compilers other than GCC + but default values are used for the exception class + and the exception message, because we don't know how to do it. + \item Improved detection of C++0x capabilities + \item Rcpp::Pairlist gains a default constructor + \item Rcpp::Environment gains a new_child method to create a new + environment whose parent is this + \item Rcpp::Environment::Binding gains a templated implicit + conversion operator + \item Rcpp::ExpressionVector gains an eval method to evaluate itself + \item Rcpp::ExpressionVector gains a constructor taking a std::string + representing some R code to parse. + \item Rcpp::GenericVector::Proxy gains an assignment operator to deal + with Environment::Proxy objects + \item Rcpp::LdFlags() now defaults to static linking OS X, as it already + did on Windows; this default can be overridden. + } +} +\section{Changes in Rcpp version 0.7.2 (2010-01-12)}{ + \itemize{ + \item a new benchmark was added to the examples directory + around the classic convolution example from + Writing R extensions to compare C and C++ implementations + \item Rcpp::CharacterVector::StringProxy gains a += operator + \item Rcpp::Environment gains an operator[](string) to get/set + objects from the environment. operator[] returns an object + of class Rcpp::Environment::Binding which implements the proxy + pattern. Inspired from Item 30 of 'More Effective C++' + \item Rcpp::Pairlist and Rcpp::Language gain an operator[](int) + also using the proxy pattern + \item Rcpp::RObject.attr can now be used on the rhs or the lhs, to get + or set an attribute. This also uses the proxy pattern + \item Rcpp::Pairlist and Rcpp::Language gain new methods push_back + replace, length, size, remove, insert + \item wrap now returns an object of a suitable class, not just RObject + anymore. For example wrap( bool ) returns a LogicalVector + \item Rcpp::RObject gains methods to deal with S4 objects : isS4, + slot and hasSlot + \item new class Rcpp::ComplexVector to manage complex vectors (CPLXSXP) + \item new class Rcpp::Promise to manage promises (PROMSXP) + \item new class Rcpp::ExpressionVector to manage expression vectors + (EXPRSXP) + \item new class Rcpp::GenericVector to manage generic vectors, a.k.a + lists (VECSXP) + \item new class Rcpp::IntegerVector to manage integer vectors (INTSXP) + \item new class Rcpp::NumericVector to manage numeric vectors (REALSXP) + \item new class Rcpp::RawVector to manage raw vectors (RAWSXP) + \item new class Rcpp::CharacterVector to manage character vectors (STRSXP) + \item new class Rcpp::Function to manage functions + (CLOSXP, SPECIALSXP, BUILTINSXP) + \item new class Rcpp::Pairlist to manage pair lists (LISTSXP) + \item new class Rcpp::Language to manage calls (LANGSXP) + \item new specializations of wrap to deal with std::initializer lists + only available with GCC >= 4.4 + \item new R function Rcpp:::capabilities that can query if various + features are available : exception handling, variadic templates + initializer lists + \item new set of functions wrap(T) converting from T to RObject + \item new template function as that can be used to convert a SEXP + to type T. Many specializations implemented to deal with + C++ builtin and stl types. Factored out of RObject + \item new class Rcpp::Named to deal with named with named objects + in a pairlist, or a call + \item new class Rcpp::Symbol to manage symbols (SYMSXP) + \item The garbage collection has been improved and is now automatic + and hidden. The user needs not to worry about it at all. + \item Rcpp::Environment(SEXP) uses the as.environment R function + \item Doxygen-generated documentation is no longer included as it is both + too large and too volatile. Zipfiles are provided on the website. + } +} +\section{Changes in Rcpp version 0.7.1 (2010-01-02)}{ + \itemize{ + \item Romain is now a co-author of Rcpp + \item New base class Rcpp::RObject replace RcppSexp (which is provided for + backwards compatibility) + \item RObject has simple wrappers for object creation and conversion to SEXP + \item New classes Rcpp::Evaluator and Rcpp::Environment for expression + evaluation and environment access, respectively + \item New class Rcpp::XPtr for external pointers + \item Enhanced exception handling allows for trapping of exceptions outside + of try/catch blocks + \item Namespace support with a new namespace 'Rcpp' + \item Unit tests for most of the new classes, based on the RUnit package + \item Inline support now provided by the update inline package, so a new + Depends on 'inline (>= 0.3.4)' replaces the code in that was + temporarily in Rcpp + } +} +\section{Changes in Rcpp version 0.7.0 (2009-12-19)}{ + \itemize{ + \item Inline support via a modified version of 'cfunction' from Oleg + Sklyar's 'inline' package: simple C++ programs can now be compiled, + linked and loaded automagically from the R prompt, including support + for external packages. Also works on Windows (with R-tools installed) + \item New examples for the inline support based on 'Intro to HPC' tutorials + \item New type RcppSexp for simple int, double, std::string scalars and vectors + \item Every class is now in its own header and source file + \item Fix to RcppParams.Rd thanks to Frank S. Thomas + \item RcppVersion.R removed as redundant given DESCRIPTION and read.dcf() + \item Switched to R_PreserveObject and R_ReleaseObject for RcppSexp with + thanks to Romain + \item Licensing changed from LGPL 2.1 (or later) to GPL 2 (or later), file + COPYING updated + } +} +\section{Changes in Rcpp version 0.6.8 (2009-11-19)}{ + \itemize{ + \item Several classes now split off into their own header and source files + \item New header file RcppCommon.h regrouping common defines and includes + \item Makevars\{,.win\} updated to reflect src/ reorg + } +} +\section{Changes in Rcpp version 0.6.7 (2009-11-08)}{ + \itemize{ + \item New class RcppList for simple lists and data structures of different + types and dimensions, useful for RProtoBuf project on R-Forge + \item Started to split classes into their own header and source files + \item Added short README file about history and status + \item Small documentation markup fix thanks to Kurt; updated doxygen docs + \item New examples directory functionCallback/ for R function passed to C++ + and being called + } +} +\section{Changes in Rcpp version 0.6.6 (2009-08-03)}{ + \itemize{ + \item Updated Doxygen documentation + \item RcppParams class gains a new exists() member function + } +} +\section{Changes in Rcpp version 0.6.5 (2009-04-01)}{ + \itemize{ + \item Small OS X build correction using R_ARCH variable + \item Include LGPL license as file COPYING + } +} +\section{Changes in Rcpp version 0.6.4 (2009-03-01)}{ + \itemize{ + \item Use std:: namespace throughout instead of 'using namespace std' + \item Define R_NO_REMAP so that R provides Rf_length() etc in lieu of length() + to minimise clashes with other projects having similar functions + \item Include Doxygen documentation, and Doxygen configuration file + \item Minor Windows build fix (with thanks to Uwe and Simon) + } +} +\section{Changes in Rcpp version 0.6.3 (2009-01-09)}{ + \itemize{ + \item OS X build fix with thanks to Simon + \item Added 'view-only' classes for int and double vector and matrix clases + as well as string vector classses, kindly suggsted / provided by + David Reiss + \item Add two shorter helper functions Rcpp:::CxxFlags() and + Rcpp:::LdFlags() for compilation and linker flags + } +} +\section{Changes in Rcpp version 0.6.2 (2008-12-02)}{ + \itemize{ + \item Small but important fix for Linux builds in Rcpp:::RcppLdFlags() + } +} +\section{Changes in Rcpp version 0.6.1 (2008-11-30)}{ + \itemize{ + \item Now src/Makevars replaces src/Makefile, this brings proper OS X + multi-arch support with thanks to Simon + \item Old #ifdef statements related to QuantLib removed; Rcpp is now + decoupled from QuantLib headers yet be used by RQuantLib + \item Added RcppLdPath() to return the lib. directory patch and on Linux + the rpath settings + \item Added new RcppVectorExample() + \item Augmented documentation on usage in Rcpp-package.Rd + } +} +\section{Changes in Rcpp version 0.6.0 (2008-11-05)}{ + \itemize{ + \item New maintainer, taking over RcppTemplate (which has been without an + update since Nov 2006) under its initial name Rcpp + \item New files src/Makefile\{,.win\} including functionality from both + configure and RcppSrc/Makefile; we now build two libraries, one for + use by the package which also runs the example, and one for users to + link against, and removed src/Makevars.in + \item Files src/Rcpp.\{cpp,h\} moved in from ../RcppSrc + \item Added new class RcppDatetime corresponding to POSIXct in with full + support for microsecond time resolution between R and C++ + \item Several new manual pages added + \item Removed configure\{,.in,.win\} as src/Makefile* can handle this more + easily + \item Minor cleanup and reformatting for DESCRIPTION, Date: now uses + svn:keyword Date property + \item Renamed RcppTemplateVersion to RcppVersion, deleted RcppDemo + \item Directory demo/ removed as vignette("RcppAPI") is easier and more + reliable to show vignette documentation + \item RcppTemplateDemo() removed from R/zzz.R, vignette("RcppAPI") is easier; + man/RcppTemplateDemo.Rd removed as well + \item Some more code reindentation and formatting to R default arguments, + some renamed from RcppTemplate* to Rcpp* + \item Added footnote onto titlepage of inst/doc/RcppAPI.\{Rnw,pdf\} about how + this document has not (yet) been updated along with the channges made + } +} diff --git a/revdep/library/sprtt/new/Rcpp/R/Rcpp b/revdep/library/sprtt/new/Rcpp/R/Rcpp new file mode 100644 index 0000000..6686156 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/R/Rcpp @@ -0,0 +1,27 @@ +# File share/R/nspackloader.R +# Part of the R package, https://www.R-project.org +# +# Copyright (C) 1995-2012 The R Core Team +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# A copy of the GNU General Public License is available at +# https://www.r-project.org/Licenses/ + +local({ + info <- loadingNamespaceInfo() + pkg <- info$pkgname + ns <- .getNamespace(as.name(pkg)) + if (is.null(ns)) + stop("cannot find namespace environment for ", pkg, domain = NA); + dbbase <- file.path(info$libname, pkg, "R", pkg) + lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.") +}) diff --git a/revdep/library/sprtt/new/Rcpp/R/Rcpp.rdb b/revdep/library/sprtt/new/Rcpp/R/Rcpp.rdb new file mode 100644 index 0000000..82eb846 Binary files /dev/null and b/revdep/library/sprtt/new/Rcpp/R/Rcpp.rdb differ diff --git a/revdep/library/sprtt/new/Rcpp/R/Rcpp.rdx b/revdep/library/sprtt/new/Rcpp/R/Rcpp.rdx new file mode 100644 index 0000000..fddf1cc Binary files /dev/null and b/revdep/library/sprtt/new/Rcpp/R/Rcpp.rdx differ diff --git a/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.10.0.txt b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.10.0.txt new file mode 100644 index 0000000..6d5beeb --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.10.0.txt @@ -0,0 +1,188 @@ + + +===== Summary ===== + +Version 0.10.0 of the Rcpp package is now on CRAN and its mirrors. + +This new release brings a number of new features, as well as extensions to +existing features, to the package. Several key aspects are highlighted +below, and further details can be found in the NEWS and ChangeLog files which +are included in the package. + + + +===== Overview ===== + +Rcpp is an R package and associated C++ library for seamless integration +between C++ and R. + +It has been described in a recent paper in the Journal of Statistical +Software (Vol 40, Issue 08) which is also included in the package as the +"Rcpp-introduction" pdf vignette. + +As of late 2012, Rcpp is used by over 80 other CRAN packages making it the +most widely-used language interface for R. + +Several key features of the new 0.10.0 release are described below. + + + +===== Rcpp attributes ===== + +Rcpp attributes are a new feature of Rcpp version 0.10.0 that provide +infrastructure for seamless language bindings between R and C++. With +attributes we hope to eliminate the need to write boilerplate conversion +and marshaling code, make it much easier to use C++ within interactive +R sessions, and reduce the learning curve associated with using C++ +and R together. + +Rcpp attributes derive their syntax from C++11 style attributes and +are included in C++ source files using specially formatted comments. +For example, the following source file includes the definition of +a fibonacci function with an Rcpp::export attribute included +immediately above the function definition: + +#include +using namespace Rcpp; + +// [[Rcpp::export]] +int fibonacci(const int x) { + if (x < 2) + return x; + else + return (fibonacci(x - 1)) + fibonacci(x - 2); +} + +The export attribute indicates that we'd like the function to be callable +from R. We can now "source" this C++ file at the R prompt and then call +the function as follows: + +R> sourceCpp("fibonacci.cpp") +R> fibonacci(20) +[1] 6765 + +Rcpp attributes build upon Rcpp modules (described in another vignette in the +package), as well as the automatic type converters Rcpp::as<>() and Rcpp::wrap. +The converters can already be used for a wide variety of standard C and C++ +types, and can also be adapted to other C++ types and libraries as described +in the Rcpp-extending vignette. + +Rcpp attributes and their supporting functions include: + + - Rcpp::export attribute to export a C++ function to R + - sourceCpp function to source exported functions from a file + - cppFunction and evalCpp functions for inline declarations and execution + - Rcpp::depends attribute for specifying additional build dependencies + for sourceCpp + +Attributes can also be used for package development via the `compileAttributes` +function, which generates an Rcpp module for all exported functions within +an R package. + +More details are provided in the new vignette Rcpp-attributes. We also intend +to provide further illustrations via our blogs following the release. + + + +===== Rcpp modules ===== + +Rcpp modules provide an easy way to expose C++ functions and classes to R using +a declarative syntax. We declare which functions and which classes we want to +make available to R and modules takes care of automatically (via the compiler, +through template deduction ...) creating the interface code between the C++ +code and R. + +Rcpp modules have been extended for the new release. A brief +summary of new key features is: + + - inheritance: A class can now declare that it inherits from another class; + the exposed class gains methods and properties (fields) from its parent class. + - Functions and methods can now return objects from classes that are exposed + through modules. The macro RCPP_EXPOSED_CLASS and RCPP_EXPOSED_CLASS_NODECL + can be used to declared the required type traits. + - Classes exposed through modules can also be used as parameters of exposed + functions or methods. + - Exposed classes can declare factories, i.e. a C++ function returning a + pointer to the target class, providing an alternative way to construct + objects. + - "converter" can be used to declare a way to convert ("cast") an object of + a type to another type. This is translated at the R level in terms of an "as" + method. + +We intend to provide example packages using these new features in the near future. + + + +===== New sugar functions ===== + +Rcpp sugar provides "syntactic sugar" familiar to R programmers at the C++ +level, including a large number of vectorised functions. In this release, we +added + - which_min() and which_max() returning the index of the first object + matching the condition + - unique() and sort_unique() + + + +===== New I/O facilities ===== + +The Rcpp::Rcout object now supports the std::flush manipulator, which calls +R_FlushConsole. A new object Rcpp::Rcerr has been added with passes content +for error messages to REprintf(). + + + +===== New namespace "R::" for Rmath functions ===== + +A side-effect of Rcpp sugar providing vectorised d/p/q/r functions for the +various statistical distribution was that the scalar variants of these +functions (available from Rmath.h) were masked behind a Rf_ prefix. +Previously, one had to call ::Rf_pnorm5() to compute pnorm() -- but now a +cleaner interface R::pnorm() is available. Unit tests were added as well. + + + +===== Links ===== + +Rcpp main page: + http://dirk.eddelbuettel.com/code/rcpp.html + +R-forge project page: + http://r-forge.r-project.org/projects/rcpp/ + +Dirk's blog section about Rcpp + Rcpp: http://dirk.eddelbuettel.com/blog/code/rcpp/ + +Romain's blog section about Rcpp: + http://romainfrancois.blog.free.fr/index.php?category/R-package/Rcpp + +RStudio blog: + http://blog.rstudio.org + +Google+: + https://plus.google.com/b/107029540907667241299/107029540907667241299/posts + +Facebook: + http://www.facebook.com/pages/Rcpp/213047595425775 + +Twitter: + https://twitter.com/eddelbuettel + https://twitter.com/romain_francois + + + +===== Support ===== + +Questions about Rcpp should be directed to the Rcpp-devel mailing list + https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel + +While we prefer the mailing list, StackOverflow has also become a frequently +used resource under the [rcpp] tag: + http://stackoverflow.com/questions/tagged/rcpp + + +Dirk Eddelbuettel, Romain Francois, Doug Bates, John Chambers and JJ Allaire +November 2012 + + + diff --git a/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.11.0.txt b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.11.0.txt new file mode 100644 index 0000000..3b0a35e --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.11.0.txt @@ -0,0 +1,136 @@ + + +===== Summary ===== + +Version 0.11.0 of the Rcpp package is now on CRAN and its mirrors. + +This new release brings a number of new features, most noticably a simplified +build system, as well as improvements to existing features and bugfixes. + +Complete details of the changes implemented between the last announcement for +version 0.10.0 and this new can be found in the NEWS and ChangeLog files +which are included in the package. + + + +===== Overview ===== + +Rcpp is an R package and associated C++ library for seamless integration +between C++ and R. + +It has been described in a Journal of Statistical Software (2011, Vol 40, +Issue 08) paper (also included in the package as the "Rcpp-introduction" pdf +vignette) and a book "Seamless R and C++ Integration with Rcpp" (2013, +Springer, useR! Series). + +As of early 2014, Rcpp is used by over 160 other CRAN packages. + +Several key features of the new 0.11.0 release are described below. + + + +===== One-time rebuild required ===== + +Because of the simplified linking scheme detailed in the next section, and +the corresponding removal of the libRcpp.* library, all packages currently +using Rcpp need to be reinstalled. + +We provide a simple helper script at +https://github.com/RcppCore/rcpp-logs/blob/master/scripts/showReverseRcppDepends.r +to identidy which of your currently-installed packages use Rcpp, and need to +be rebuilt / reinstalled. + + + +===== Simpler Building with Rcpp ===== + +Thanks to the 'LinkingTo:' directive, R already instructed the compiler where +to fine header files when writing code with Rcpp. The package now uses the +registration facilities in R (see Section 5.4 in Writing R Extensions). + +With just an 'Imports: Rcpp' in DESCRIPTION along with an explicit import +statement in the NAMESPACE file such 'importFrom(Rcpp, evalCpp)' all required +Rcpp code will be properly instantiated without any explicit linking. [ Note +that just using 'import(Rcpp)' is not sufficient, but any exported C++ +identifier should do -- evalCpp is nice and short. ] + +This means that the package no longer provides a user-facing library +libRcpp.so (or libRcpp.dylib or libRcpp.dll). This also implies that a +one-time rebuild is needed as alluded to in the previous section. + +The key benefit is that many package should no longer require the files +src/Makevars and src/Makevars.win in order to link with Rcpp. Mny packages +will be able to retire these files. The exception, of course, is the case +where a package links against an external library as eg the RcppArmadillo +package> Here, the LAPACK / BLAS / Fortran libraries still need to be +linked. However, the corresponding values are also provided by R and the +expression becomes a simple 'PKG_LIBS=$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)'. + + + +===== Rcpp attributes ===== + +Rcpp attributes were a key innovation in the 0.10.0; they have matured +further and have now become the standard way to build code with Rcpp. See +the dedicated vignette for details. + + + +==== C++11 Support ===== + +R 3.1.0, to be released in a few month, will permit compilation using C++11, +the newest C++ standard -- including for packages going to CRAN. Rcpp had +already supported 'local' builds using C++11 since version 0.10.3, simply add + + [[Rcpp::plugins(cpp11)]] + +and Rcpp attributes takes care of the rest. + + + +===== Memory management ===== + +A number of internal data structures have been rewritten. + + + +===== Links ===== + +Rcpp site: + http://www.rcpp.org + +Rcpp Gallery: + http://gallery.rcpp.org + +Dirk's Rcpp page: + http://dirk.eddelbuettel.com/code/rcpp.html + +GitHub page: + https://github.com/RcppCore/Rcpp + +R-forge project page: + http://r-forge.r-project.org/projects/rcpp/ + +Google+: + https://plus.google.com/b/107029540907667241299/107029540907667241299/posts + + + +===== Support ===== + +Questions about Rcpp should be directed to the Rcpp-devel mailing list + https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel + +While we prefer the mailing list, StackOverflow has also become a frequently +used resource under the [rcpp] tag: + http://stackoverflow.com/questions/tagged/rcpp + + + +On behalf of the Rcpp Core team, + + Dirk Eddelbuettel + February 2014 + + + diff --git a/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.6.0.txt b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.6.0.txt new file mode 100644 index 0000000..b741158 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.6.0.txt @@ -0,0 +1,54 @@ +New Rcpp versions 0.6.0 and 0.6.1 +--------------------------------- + +The Rcpp package provides C++ classes that greatly facilitate interfacing C +or C++ code in R packages using the .Call() interface provided by R. + +Rcpp provides matching C++ classes for a large number of basic R data +types. Hence, a package author can keep his data in normal R data structure +without having to worry about translation or transfer to C++. At the same +time, the data structures can be accessed as easily at the C++ level, and +used in the normal manner. + +The mapping of data types works in both directions. It is as straightforward +to pass data from R to C++, as it is it return data from C++ to R. The +following two sections list supported data types. + +Transfer from R to C++: +Standard R datatypes that are understood in C++ are + o named lists containing numeric (i.e. floating point), integer, + character, logical (i.e. boolean) or Date and Datetime (i.e. POSIXct at + the microsecond granularity) arguments; + o data frames containing numeric, integer, logical, character, + Date, Datetime or Factor columns; + o named vectors containing numeric or integer values, + o vectors and matrices of different values + o character strings + +Transfer from C++ to R: +Standard C++ datatypes can be returned to R in a named list, the most +general data type in R. Permissible components of the returns list +are the following C++ types: + o double (scalar as well as vectors and vectors of vectors), + o int (scalar as well as vectors and vectors of vectors), string, + o STL vector types and vector types of int and double + o STL vector of strings + o internal Rcpp types RcppDate, RcppDateVector, RcppDatetime, + RcppDatetimeVector, RcppStringVector, RcppVector of int or double, + RcppMatrix of int or double, RcppFrame + +Rcpp was initially written by Dominick Samperi as part of his contributions +to RQuantLib, and later released as a standalone package (under both the Rcpp +and RcppTemplate names). Its development had ceased in late 2006. + +As of November 2008, I have made new release with substantially expanded +documentation, simpler yet more comprehensive build structure leading to +easier use of Rcpp from other packages, and support for Windows, Linux and +Mac OS X (with special thanks to Simon for some extended cluebat waving). + +More information for Rcpp can be found at + o the package homepage at http://dirk.eddelbuettel.com/code/rcpp.html + o the R-forge repository at https://r-forge.r-project.org/projects/rcpp/ + o the CRAN page at http://cran.r-project.org/web/packages/Rcpp/index.html + +Regards, Dirk diff --git a/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.7.0.txt b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.7.0.txt new file mode 100644 index 0000000..9b19b7e --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.7.0.txt @@ -0,0 +1,74 @@ +Rcpp version 0.7.0 went onto CRAN this weekend. The key new features are + + o inline support, taken from Oleg Sklyar's neat inline package and + adapted/extented to support Rcpp as well as external libraries + (see below for an example); this even works on Windows (provided you + have Rtools installed and configured); + + o addition of a new simple type RcppSexp for importing or exporting + simple types directly between R and C++ + + o addition of a number of new examples for both these features + + o code reorganisation: every class has in its own header and source file + + o last but not least relicensed from LGPL (>=2.1) to GPL (>= 2) + +My blog (http://dirk.eddelbuettel.com/blog/) has two recent posts with a bit +more details (and colour highlighting of the code below) but let's just look +at one example of using GNU GSL functions for illustrative purposes (as you +wouldn't need this to access random-number generators as R has its own). + +Consider this R code snippet: + + ## use Rcpp to pass down a parameter for the seed, and a vector size + gslrng <- ' + int seed = RcppSexp(s).asInt(); + int len = RcppSexp(n).asInt(); + + gsl_rng *r; + gsl_rng_env_setup(); + std::vector v(len); + + r = gsl_rng_alloc (gsl_rng_default); + + gsl_rng_set (r, (unsigned long) seed); + for (int i=0; i + v which is also converted on the fly. + + 5) The resulting vector is returned and simply printed at the R level. + + +More examples are in the source tarball and in the R-Forge SVN archive. + diff --git a/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.8.0.txt b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.8.0.txt new file mode 100644 index 0000000..467af3c --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.8.0.txt @@ -0,0 +1,297 @@ + +===== Summary ===== + +Version 0.8.0 of the Rcpp package was released to CRAN today. This release +marks another milestone in the ongoing redesign of the package, and +underlying C++ library. + + +===== Overview ===== + +Rcpp is an R package and C++ library that facilitates integration of C++ +code in R packages. + +The package features a set of C++ classes (Rcpp::IntegerVector, +Rcpp::Function, Rcpp::Environment, ...) that makes it easier to manipulate R +objects of matching types (integer vectors, functions, environments, etc +...). + +Rcpp takes advantage of C++ language features such as the explicit +constructor/destructor lifecycle of objects to manage garbage collection +automatically and transparently. We believe this is a major improvement over +PROTECT/UNPROTECT. When an Rcpp object is created, it protects the underlying +SEXP so that the garbage collector does not attempt to reclaim the +memory. This protection is withdrawn when the object goes out of +scope. Moreover, users generally do not need to manage memory directly (via +calls to new / delete or malloc / free) as this is done by the Rcpp classes +or the corresponding STL containers. + + +===== API ===== + +Rcpp provides two APIs: an older set of classes we refer to the classic API +(see below for the section 'Backwards Compatibility) as well as second and +newer set of classes. + +Classes of the new Rcpp API belong to the Rcpp namespace. Each class is +associated to a given SEXP type and exposes an interface that allows +manipulation of the object that may feel more natural than the usual use of +macros and functions provided by the R API. + +---------------------------------------------------------- +SEXP type | Rcpp class +---------------------------------------------------------- +INTSXP | Rcpp::IntegerVector +REALSXP | Rcpp::NumericVector +RAWSXP | Rcpp::RawVector +LGLSXP | Rcpp::LogicalVector +CPLXSXP | Rcpp::ComplexVector +STRSXP | Rcpp::CharacterVector +VECSXP | Rcpp::List +EXPRSXP | Rcpp::ExpressionVector +---------------------------------------------------------- +ENVSXP | Rcpp::Environment +SYMSXP | Rcpp::Symbol +---------------------------------------------------------- +CLOSXP | +BUILTINSXP | Rcpp::Function +SPECIALSXP | +---------------------------------------------------------- +LANGSXP | Rcpp::Language +LISTSXP | Rcpp::Pairlist +---------------------------------------------------------- +S4SXP | Rcpp::S4 +---------------------------------------------------------- +PROMSXP | Rcpp::Promise +WEAKREFSXP | Rcpp::WeakReference +EXTPTRSXP | template Rcpp::XPtr +---------------------------------------------------------- + +Some SEXP types do not have dedicated Rcpp classes : NILSXP, DOTSXP, +ANYSXP, BCODESXP and CHARSXP. + +Still missing are a few convenience classes such as Rcpp::Date or +Rcpp::Datetime which would map useful and frequently used R data types, but +which do not have an underlying SEXP type. + + +===== Data Interchange ===== + +Data interchange between R and C++ is managed by extensible and powerful yet +simple mechanisms. + +Conversion of a C++ object is managed by the template function Rcpp::wrap. +This function currently manages : + - primitive types : int, double, bool, float, Rbyte, ... + - std::string, const char* + - STL containers such as std::vector and STL maps such as + std::map< std::string, T> provided that the template type T is wrappable +- any class that can be implicitely converted to SEXP, through operator SEXP() + +Conversion of an R object to a C++ object is managed by the Rcpp::as +template which can handle: + - primitive types + - std::string, const char* + - STL containers such as std::vector + +Rcpp::wrap and Rcpp::as are often used implicitely. For example, when +assigning objects to an environment: + + // grab the global environment + Rcpp::Environment global = Rcpp::Environment::global_env() ; + std::deque z( 3 ); z[0] = false; z[1] = true; z[3] = false ; + + global["x"] = 2 ; // implicit call of wrap + global["y"] = "foo"; // implicit call of wrap + global["z"] = z ; // impl. call of wrap> + + int x = global["x"] ; // implicit call of as + std::string y = global["y"] // implicit call of as + std::vector z1 = global["z"] ; // impl. call of as> + +Rcpp contains several examples that illustrate wrap and as. The mechanism was +designed to be extensible. We have developped separate packages to illustrate +how to extend Rcpp conversion mechanisms to third party types. + - RcppArmadillo : conversion of types from the Armadillo C++ library. + - RcppGSL : conversion of types from the GNU Scientific Library. + +Rcpp is also used for data interchange by the RInside package which provides +and easy way of embedding an R instance inside of C++ programs. + + +===== inline use ===== + +Rcpp depends on the inline package by Oleg Sklyar et al. Rcpp then uses the +'cfunction' provided by inline (with argument Rcpp=TRUE) to compile, link and +load C++ function from the R session. + +As of version 0.8.0 of Rcpp, we also define an R function cppfunction that +acts as a facade function to the inline::cfuntion, with specialization for +C++ use. + +This allows quick prototyping of compiled code. All our unit tests are based +on cppfunction and can serve as examples of how to use the mechanism. For example +this function (from the runit.GenericVector.R unit test file) defines from +R a C++ (simplified) version of lapply: + + ## create a compiled function cpp_lapply using cppfunction + cpp_lapply <- cppfunction(signature(x = "list", g = "function" ), + 'Function fun(g) ; + List input(x) ; + List output( input.size() ) ; + std::transform( input.begin(), input.end(), output.begin(), fun ) ; + output.names() = input.names() ; + return output ; + ') + ## call cpp_lapply on the iris data with the R function summary + cpp_lapply( iris, summary ) + + +===== Using Rcpp in other packages ===== + +Rcpp is designed so that its classes are used from other packages. Using Rcpp +requires : + - using the header files provided by Rcpp. This is typically done by adding this + line in the package DESRIPTION file: + + LinkingTo: Rcpp + + and add the following line in the package code: + + #include + +- linking against the Rcpp dynamic or static library, which is achieved by + adding this line to the src/Makevars of the package: + + PKG_LIBS = $(shell ${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()" ) + + and this line to the src/Makevars.win file: + + PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()") + +Rcpp contains a function Rcpp.package.skeleton, modelled after +package.skeleton from the utils package in base r, that creates a skeleton of +a package using Rcpp, including example code. + + +===== C++ exceptions ===== + +C++ exceptions are R contexts are both based on non local jumps (at least +on the implementation of exceptions in gcc), so care must be ensure +that one system does not void assumptions of the other. It is therefore +very strongly recommended that each function using C++ catches +C++ exceptions. Rcpp offers the function forward_exception_to_r +to facilitate forwarding the exception to the "R side" as an R condition. +For example : + + SEXP foo( ) { + try { + // user code here + } catch( std::exception& __ex__){ + forward_exception_to_r( __ex__ ) ; + } + // return something here + } + +Alternatively, functions can enclose the user code with the macros BEGIN_RCPP +and END_RCPP, which provides for a more compact way of programming. The +function above could be written as follows using the macros: + + SEXP foo( ) { + BEGIN_RCPP + // user code here + END_RCPP + // return something here + } + +The use of BEGIN_RCPP and END_RCPP is recommended to anticipate future changes +of Rcpp. We might for example decide to install dedicated handlers for specific +exceptions later. + + +===== Experimental code generation macros ===== + +Rcpp contains several macros that can generate repetitive 'boiler plate' code: + RCPP_FUNCTION_0, ..., RCPP_FUNCTION_65 + RCPP_FUNCTION_VOID_0, ..., RCPP_FUNCTION_VOID_65 + RCPP_XP_METHOD_0, ..., RCPP_XP_METHOD_65 + RCPP_XP_METHOD_CAST_0, ..., RCPP_XP_METHOD_CAST_65 + RCPP_XP_METHOD_VOID_0, ..., RCPP_XP_METHOD_VOID_65 + +For example: + + RCPP_FUNCTION_2( int, foobar, int x, int y){ + return x + y ; + } + +This will create a .Call compatible function "foobar" that calls a +c++ function for which we provide the argument list (int x, int y) +and the return type (int). The macro also encloses the call +in BEGIN_RCPP/END_RCPP so that exceptions are properly forwarded to R. + +Examples of the other macros are given in the NEWS file. + +This feature is still experimental, but is being used in packages +highlight and RProtoBuf + + +===== Quality Assurance ===== + +Rcpp uses the RUnit package by Matthias Burger et al and the aforementioned +inline package by Oleg Sklyar et al to provide unit testing. Rcpp currently +has over 500 unit tests (called from more than 230 unit test functions) with +very good coverage of the critical parts of the package and library. + +Source code for unit test functions are stored in the unitTests directory +of the installed package and the results are collected in the "Rcpp-unitTests" +vignette. + +The unit tests can be both during the standard R package build and testing +process, and also when the package is installed. The latter use is helpful +to ensure that no system components have changed in a way that affect the +Rcpp package since it has been installed. To run the tests, execute + + Rcpp:::test() + +where an output directory can be provided as an optional first argument. + + +===== Backwards Compatibility ===== + +We believe the new API is now more complete and useful than the previous set +of classes, which we refer to as the "classic Rcpp API". We would therefore +recommend to package authors using 'classic' Rcpp to move to the new API. +However, the classic API is still maintained and will continue to be +maintained to ensure backwards compatibility for code that uses it. + +Packages uses the 'Classic API' can use features of the new API selectively +and in incremental steps. This provides for a non-disruptive upgrade path. + + +===== Documentation ===== + +The package contains a vignette which provides a short and succinct +introduction to the Rcpp package along with several motivating examples. +Also provided is a vignette containing the regression test summary from +the time the package was built. + + +===== Links ===== + +Rcpp main page: http://dirk.eddelbuettel.com/code/rcpp.html +R-forge project page: http://r-forge.r-project.org/projects/rcpp/ +Dirk's blog section about Rcpp: http://dirk.eddelbuettel.com/blog/code/rcpp/ +Romain's blog section about Rcpp: http://romainfrancois.blog.free.fr/index.php?category/R-package/Rcpp + + +===== Support ===== + +Questions about Rcpp should be directed to the Rcpp-devel mailing list +https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel + + + + -- Dirk Eddelbuettel and Romain Francois + Chicago, IL, USA, and Montpellier, France + May 2010 + diff --git a/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.9.0.txt b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.9.0.txt new file mode 100644 index 0000000..4b99fa8 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/announce/ANNOUNCE-0.9.0.txt @@ -0,0 +1,196 @@ + +===== Summary ===== + +Version 0.9.0 of the Rcpp package is now on CRAN and its mirrors. This +release marks another step in the development of the package, and a few key +points are highlighted below. More details are in the NEWS and ChangeLog +files included in the package. + + +===== Overview ===== + +Rcpp is an R package and associated C++ library that facilitates integration +of C++ code in R packages. + +The package features a complete set of C++ classes (Rcpp::IntegerVector, +Rcpp:NumericVector, Rcpp::Function, Rcpp::Environment, ...) that makes it +easier to manipulate R objects of matching types (integer vectors, functions, +environments, etc ...). + +Rcpp takes advantage of C++ language features such as the explicit +constructor / destructor lifecycle of objects to manage garbage collection +automatically and transparently. We believe this is a major improvement over +use of PROTECT/UNPROTECT. When an Rcpp object is created, it protects the +underlying SEXP so that the garbage collector does not attempt to reclaim the +memory. This protection is withdrawn when the object goes out of +scope. Moreover, users generally do not need to manage memory directly (via +calls to new / delete or malloc / free) as this is done by the Rcpp classes +or the corresponding STL containers. + +A few key points about Rcpp: + + - a rich API covering all core R data types including vectors, matrices, + functions, environments, ... (with the exeception of factors + which are less useful in C++) + + - seamless (bi-directional) data interchange between R and C++ + + - possibility of inline use permitting definition, compilation, linking and + loading of C++ functions directly from R + + - extensive documentation now covering eight vignettes + + - exception handling and error propagation back to R + + - extensive test suite using RUnit covering over 700 tests + + - extension packages RcppArmadillo and RcppGSL provide easy-to-use + integration with the Armadillo (linear algebra) and GNU GSL librasries + + - increasing adoption among R users and package developers with now + twenty packages from CRAN or BioConductor depending on Rcpp + + - support for the legacy 'classic' Rcpp is now provided by the RcppClassic + package which is being released concurrently with Rcpp 0.9.0 + +Several key features were added during the 0.8.* cycles and are described below. + + +===== Rcpp sugar ===== + +Rcpp now provides syntactic sugar: vectorised expressions at the C++ level +which are motivated by the corresponding R expressions. This covers +operators (binary arithmetic, binary logical, unary), functions (producing +single logical results, mathematical functions and d/p/q/r statistical +functions). Examples comprises anything from ifelse() to pmin()/pmax() or + +A really simply example is a function + + SEXP foo( SEXP xx, SEXP yy){ + NumericVector x(xx), y(yy) ; + return ifelse( x < y, x*x, -(y*y) ) ; + } + +which deploys the sugar 'ifelse' function modeled after the corresponding R +function. Another simple example is + + double square( double x){ + return x*x ; + } + + SEXP foo( SEXP xx ){ + NumericVector x(xx) ; + return sapply( x, square ) ; + } + +where use the sugar function 'sapply' to sweep a simple C++ function which +operates elementwise across the supplied vector. + +The Rcpp-sugar vignette describes sugar in more detail. + + +===== Rcpp modules ===== + +Rcpp modules are inspired by Boost.Python and make exposing C++ functions or +classes to R even easier. A first illustration is provided by this simple +C++ code snippet + + const char* hello( const std::string& who ){ + std::string result( "hello " ) ; + result += who ; + return result.c_str() ; + } + + RCPP_MODULE(yada){ + using namespace Rcpp ; + function( "hello", &hello ) ; + } + +which (after compiling and loading) we can access in R as + + yada <- Module( "yada" ) + yada$hello( "world" ) + +In a similar way, C++ classes can be exposed very easily. + +Rcpp modules are also described in more detail in their own vignette. + + +===== Reference Classes ===== + +R release 2.12.0 introduced Reference Classes. These are formal S4 classes +with the corresponding dispatch method, but passed by reference and easy to +use. Reference Classes can also be exposed to R by using Rcpp modules. + + +===== Extension packackages ===== + +The RcppArmadillo package permits use of the advanced C++ library 'Armadillo, +a C++ linear algebra library aiming towards a good balance between speed and +ease of use, providing integer, floating point and complex matrices and +vectors with lapack / blas support via R. Armadillo uses templates for a +delayed evaluation approach is employed (during compile time) to combine +several operations into one and reduce (or eliminate) the need for +temporaries. Armadillo is useful if C++ has been decided as the language of +choice, rather than another language like Matlab ® or Octave, and aims to be +as expressive as the former. Via Rcpp and RcppArmadillo, R users now have +easy access to this functionality. Examples are provided in the RcppArmadillo +package. + +The RcppGSL package permits easy use of the GNU Scientific Library (GSL), a +collection of numerical routines for scientifc computing. It is particularly +useful for C and C++ programs as it provides a standard C interface to a wide +range of mathematical routines such as special functions, permutations, +combinations, fast fourier transforms, eigensystems, random numbers, +quadrature, random distributions, quasi-random sequences, Monte Carlo +integration, N-tuples, differential equations, simulated annealing, numerical +differentiation, interpolation, series acceleration, Chebyshev +approximations, root-finding, discrete Hankel transforms physical constants, +basis splines and wavelets. There are over 1000 functions in total with an +extensive test suite. The RcppGSL package provides an easy-to-use interface +between GSL data structures and R using concepts from Rcpp. The RcppGSL +package also contains a vignette with more documentation. + + +===== Legacy 'classic' API ===== + +Packages still using code interfacing the initial 'classic' Rcpp API are +encouraged to migrate to the new API. Should a code transition not be +possible, backwards compatibility is provided by the RcppClassic package +released alongside Rcpp 0.9.0. By including RcppClassic.h and building +against the RcppClassic package and library, vintage code can remain +operational using the classic API. The short vignette in the RcppClassic +package has more details. + + +===== Documentation ===== + +The package contains a total of eight vignettes the first of which provides a +short and succinct introduction to the Rcpp package along with several +motivating examples. + + +===== Links ===== + +Rcpp main page: + http://dirk.eddelbuettel.com/code/rcpp.html +R-forge project page: + http://r-forge.r-project.org/projects/rcpp/ +Dirk's blog section about + Rcpp: http://dirk.eddelbuettel.com/blog/code/rcpp/ +Romain's blog section about Rcpp: + http://romainfrancois.blog.free.fr/index.php?category/R-package/Rcpp + + +===== Support ===== + +Questions about Rcpp should be directed to the Rcpp-devel mailing list + https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel + + + + -- Dirk Eddelbuettel, Romain Francois, Doug Bates and John Chambers + December 2010 + + + diff --git a/revdep/library/sprtt/new/Rcpp/bib/Rcpp.bib b/revdep/library/sprtt/new/Rcpp/bib/Rcpp.bib new file mode 100644 index 0000000..dfbbe86 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/bib/Rcpp.bib @@ -0,0 +1,959 @@ +@String{CRAN = "https://CRAN.R-Project.org/" } +@String{manuals = CRAN # "doc/manuals/" } +@String{RCoreTeam = "{R Core Team}" } +@String{RFoundation = "R Foundation for Statistical Computing" } +@String{R-Forge = "https://R-Forge.R-Project.org/" } + +@manual{Abrahams+Grosse-Kunstleve:2003:Boost.Python, + author = { David Abrahams and Ralf W. Grosse-Kunstleve }, + organization = "Boost Consulting", + title = "Building Hybrid Systems with Boost.Python", + year = 2003, + url = "https://www.boostpro.com/writing/bpl.pdf" +} + +@Book{Abrahams+Gurtovoy:2004:TemplateMetaprogramming, + author = {David Abrahams and Aleksey Gurtovoy}, + title = {{C++} {T}emplate {M}etaprogramming: Concepts, Tools + and Techniques from {B}oost and Beyond}, + publisher = {Addison-Wesley}, + year = 2004, + address = {Boston} +} + +@book{Anderson:1990:UGLAPACK, + author = {Anderson, E. and Bai, Z. and Bischof, C. and + Blackford, S. and Demmel, J. and Dongarra, J. and Du + Croz, J. and Greenbaum, A. and Hammarling, S. and + McKenney, A. and Sorensen, D.}, + title = {{LAPACK} Users' Guide}, + edition = {Third}, + publisher = {Society for Industrial and Applied Mathematics}, + year = 1999, + address = {Philadelphia, PA}, + isbn = {0-89871-447-8 (paperback)} +} + +@Manual{Armstrong:2009:RAbstraction, + title = {{RAbstraction}: {C++} abstraction for {R} objects}, + author = {Whit Armstrong}, + year = 2009, + note = {Code repository last updated 2009-07-22.}, + url = {https://github.com/armstrtw/rabstraction} +} + +@Manual{Armstrong:2009:RObjects, + title = {{RObjects}: {C++} wrapper for R objects (a better + implementation of {RAbstraction}}, + author = {Whit Armstrong}, + year = 2009, + note = {Code repository last updated 2009-11-28.}, + url = {https://github.com/armstrtw/RObjects} +} + +@InProceedings{Bates+DebRoy:2001:C++Classes, + author = {Douglas M. Bates and Saikat DebRoy}, + title = {{C++} Classes for {R} Objects}, + booktitle = {Proceedings of the 2nd International Workshop on Distributed + Statistical Computing, March 15--17, 2001, Technische + Universit\"at Wien, Vienna, Austria}, + editor = {Kurt Hornik and Friedrich Leisch}, + year = {2001}, + url = {https://www.ci.tuwien.ac.at/Conferences/DSC-2001/Proceedings/}, + note = {ISSN 1609-395X} +} + + +@Misc{Brokken:2011:Cpp, + author = {Frank B. Brokken}, + title = {C++ Annotations}, + howpublished = {Electronic book, University of Groningen}, + year = 2011, + url = {https://www.icce.rug.nl/documents/cplusplus/} +} + +@Manual{CRAN:anytime, + title = {anytime: Anything to 'POSIXct' or 'Date' Converter}, + author = {Dirk Eddelbuettel}, + year = {2021}, + note = {R package version 0.3.9}, + url = CRAN # "package=anytime" +} + +@Manual{CRAN:BH, + title = {BH: Boost C++ Header Files}, + author = {Dirk Eddelbuettel and John W. Emerson and Michael + J. Kane}, + year = {2021}, + note = {R package version 1.78.0-0}, + url = CRAN # "package=BH" +} + +@Manual{CRAN:Matrix, + title = {\pkg{Matrix}: Sparse and Dense Matrix Classes and Methods}, + author = {Douglas Bates and Martin Maechler}, + year = 2021, + note = {R package version 1.4-0}, + url = CRAN # "package=Matrix" +} + +@Manual{CRAN:RInside, + title = {RInside: C++ classes to embed R in C++ applications}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, + year = 2020, + note = {R package version 0.2.16}, + url = CRAN # "package=RInside" +} + +@Manual{CRAN:RProtoBuf, + title = {RProtoBuf: R Interface to the Protocol Buffers API}, + author = {Romain Fran\c{c}ois and Dirk Eddelbuettel and Murray Stokely and Jeroen Ooms}, + year = 2021, + note = {R package version 0.4.18}, + url = CRAN # "package=RProtoBuf" +} + +@Manual{CRAN:RQuantLib, + title = {RQuantLib: {R} interface to the {QuantLib} library}, + author = {Dirk Eddelbuettel and Khanh Nguyen and Terry Leitch}, + year = 2021, + note = {R package version 0.4.14}, + url = CRAN # "package=RQuantLib" +} + +@Manual{CRAN:RUnit, + title = {RUnit: R Unit Test Framework}, + author = {Matthias Burger and Klaus Juenemann and Thomas + Koenig}, + year = 2018, + note = {R package version 0.4.32}, + url = CRAN # "package=RUnit" +} + +@Manual{CRAN:Rcpp, + title = {{Rcpp}: Seamless {R} and {C++} Integration}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois and JJ + Allaire and Kevin Ushey and Qiang Kou and + Nathan Russel and John Chambers and Douglas Bates}, + year = 2022, + note = {R package version 1.0.9}, + url = CRAN # "package=Rcpp" +} + +@Manual{CRAN:Rcpp:Attributes, + crossref = {CRAN:Rcpp}, + author = {J. J. Allaire and Dirk Eddelbuettel and Romain + Fran\c{c}ois}, + title = {{Rcpp} Attributes}, + year = 2022, + note = {Vignette included in R package Rcpp}, + url = CRAN # "package=Rcpp" +} + +@Manual{CRAN:Rcpp:FAQ, + crossref = {CRAN:Rcpp}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, + title = {Frequently Asked Questions About {Rcpp}}, + year = 2022, + note = {Vignette included in R package {Rcpp}}, + url = CRAN # "package=Rcpp" +} + +@Manual{CRAN:Rcpp:Modules, + crossref = {CRAN:Rcpp}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, + title = {Exposing {C++} functions and classes with {Rcpp} modules}, + year = 2022, + note = {Vignette included in R package Rcpp}, + url = CRAN # "package=Rcpp" +} + +@Manual{CRAN:Rcpp:Package, + crossref = {CRAN:Rcpp}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, + title = {Writing a package that uses {Rcpp}}, + year = 2022, + note = {Vignette included in R package {Rcpp}}, + url = CRAN # "package=Rcpp" +} + +@Manual{CRAN:Rcpp:Sugar, + crossref = {CRAN:Rcpp}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, + title = {Rcpp syntactic sugar}, + year = 2022, + note = {Vignette included in R package {Rcpp}}, + url = CRAN # "package=Rcpp" +} + +@Manual{CRAN:RcppArmadillo, + title = {RcppArmadillo: Rcpp integration for Armadillo + templated linear algebra library}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois and + Douglas Bates and Binxiang Ni}, + year = 2021, + note = {R package version 0.10.7.5.0}, + url = CRAN # "package=RcppArmadillo" +} + +@Manual{CRAN:RcppCCTZ, + title = {RcppCCTZ: Rcpp Bindings for the CCTZ Library}, + author = {Dirk Eddelbuettel}, + year = 2021, + note = {R package version 0.2.10}, + url = CRAN # "package=RcppCCTZ" +} + +@Manual{CRAN:RcppClassic, + title = {RcppClassic: Deprecated 'classic' Rcpp API}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, + year = 2019, + note = {R package version 0.9.12}, + url = CRAN # "package=RcppClassic" +} + +@Manual{CRAN:RcppDate, + title = {RcppDate: 'date' C++ Header Libary for Date and Time Functionality}, + author = {Dirk Eddelbuettel}, + year = 2021, + note = {R package version 0.0.3}, + url = CRAN # "package=RcppDate" +} + +@Manual{CRAN:RcppDE, + title = {RcppDE: Global optimization by differential evolution in C++}, + author = {Dirk Eddelbuettel}, + year = 2018, + note = {R package version 0.1.6}, + url = CRAN # "package=RcppDE" +} + +@Manual{CRAN:RcppEigen, + title = {RcppEigen: Rcpp integration for the Eigen templated linear + algebra library}, + author = {Douglas Bates and Dirk Eddelbuettel and Romain Fran\c{c}ois and Yixuan Qiu}, + year = 2020, + note = {{R} package version 0.3.3.9.1}, + url = CRAN # "package=RcppEigen" +} + +@Manual{CRAN:RcppExamples, + title = {RcppExamples: Examples using {Rcpp} to interface {R} + and {C++}}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, + year = 2019, + note = {R package version 0.1.9}, + url = CRAN # "package=RcppExamples" +} + +@Manual{CRAN:RcppGSL, + title = {RcppGSL: Rcpp integration for GNU GSL vectors and matrices}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, + year = 2021, + note = {R package version 0.3.10}, + url = CRAN # "package=RcppGSL" +} + +@Manual{CRAN:RcppZiggurat, + title = {RcppZiggurat: Rcpp Integration of Different Ziggurat Normal RNG Implementations}, + author = {Dirk Eddelbuettel}, + year = 2020, + note = {R package version 0.1.6}, + url = CRAN # "package=RcppZiggurat" +} + +@Manual{CRAN:Rserve, + title = {Rserve: Binary R server}, + author = {Simon Urbanek}, + year = 2021, + note = {R package version 1.8-10}, + url = CRAN # "package=Rserve" +} + +@Manual{CRAN:cxxPack, + title = {cxxpack: {R/C++} Tools for Literate Statistical + Practice}, + author = {Dominick Samperi}, + year = 2010, + note = {R package version 7.0.6}, + url = CRAN # "package=cxxPack" +} + +@Manual{CRAN:devtools, + title = {devtools: Tools to Make Developing R Packages + Easier}, + author = {Hadley Wickham and Jim Hester and Winston Chang}, + year = 2021, + note = {R package version 2.4.3}, + url = CRAN # "package=devtools" +} + +@Manual{CRAN:highlight, + title = {highlight: Syntax highlighter}, + author = {Hadley Wickham and Romain Fran\c{c}ois and Andre Simon}, + year = 2019, + note = {R package with version 0.5.0}, + url = CRAN # "package=highlight" +} + +@Manual{CRAN:inline, + title = {inline: Inline C, C++, Fortran function calls from + R}, + author = {Oleg Sklyar and Duncan Murdoch and Mike Smith and + Dirk Eddelbuettel and Romain Fran\c{c}ois and + Karline Soetaert and Johannes Ranke}, + year = 2021, + note = {R package version 0.3.19}, + url = CRAN # "package=inline" +} + +@Manual{CRAN:littler, + title = {littler: {R} at the {Command-Line} via r}, + author = {Dirk Eddelbuettel and Jeffrey Horner}, + year = 2021, + note = {R package version 0.3.15}, + url = CRAN # "package=littler" +} + +@Manual{CRAN:microbenchmark, + title = {microbenchmark: Accurate Timing Functions}, + author = {Olaf Mersmann}, + year = 2021, + note = {R package version 1.4-9}, + url = CRAN # "package=microbenchmark" +} + +@Manual{CRAN:minqa, + title = {minqa: Derivative-free optimization algorithms by + quadratic approximation}, + author = {Douglas Bates and Katharine M. Mullen and John + C. Nash and Ravi Varadhan}, + year = 2014, + note = {R package version 1.2.4}, + url = CRAN # "package=minqa" +} + +@Manual{CRAN:pkgKitten, + title = {pkgKitten: Create Simple Packages Which Do not Upset + R Package Checks}, + author = {Dirk Eddelbuettel}, + year = {2021}, + note = {R package version 0.2.2}, + url = CRAN # "package=pkgKitten" +} + +@Manual{CRAN:profvis, + title = {profvis: Interactive Visualizations for Profiling R Code}, + author = {Winston Chang and Javier Luraschi and and Timothy Mastny}, + year = 2020, + note = {R package version 0.3.7}, + url = CRAN # "package=profvis" +} + +@Manual{CRAN:rbenchmark, + title = {\pkg{rbenchmark}: Benchmarking routine for R}, + author = {Wacek Kusnierczyk}, + year = 2012, + note = {R package version 1.0.0}, + url = CRAN # "package=rbenchmark" +} + +@Manual{CRAN:roxygen2, + title = {roxygen2: In-source documentation for R}, + author = {Hadley Wickham and Peter Danenberg and G\a'bor Cs\a'rdi and Manuel Eugster}, + year = 2021, + note = {R package version 7.1.2}, + url = CRAN # "package=roxygen2" +} + +@Article{CRAN:testthat, + author = {Hadley Wickham}, + title = {testthat: Get Started with Testing}, + journal = {The R Journal}, + year = 2011, + volume = 3, + pages = {5--10}, +} + +@Book{Chambers:1998:PwD, + author = {John M. Chambers}, + title = {Programming with Data: {A} Guide to the {S} Language}, + publisher = {Springer-Verlag}, + year = 1998, + address = {Heidelberg}, + note = {{ISBN} 978-0387985039} +} + +@Book{Chambers:2008:SoDA, + author = {John M. Chambers}, + title = {Software for Data Analysis: Programming with {R}}, + publisher = {Springer-Verlag}, + year = 2008, + series = {Statistics and Computing}, + address = {Heidelberg}, + note = {{ISBN} 978-0-387-75935-7} +} + +@Book{Chambers:2016:ExtR, + author = {John M. Chambers}, + title = {Extending R}, + publisher = {Chapman and Hall/CRC}, + year = 2016, + series = {{The R Series}}, + address = {London}, + note = {{ISBN} 9781498775717} +} + +@Article{Chambers:2020:S+R+DS, + author = {Chambers, John M.}, + title = {S, R, and Data Science}, + year = 2020, + issue_date = {June 2020}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + volume = 4, + number = {HOPL}, + url = {https://doi.org/10.1145/3386334}, + doi = {10.1145/3386334}, + journal = {Proceeding of the ACM on Programming Languages}, + month = jun, + articleno = 84, + numpages = 17, + keywords = {data science, statistical computing, scientific + computing} +} + +@Misc{Cpp11, + author = "ISO/IEC", + organization = "{International Organization for Standardization}", + title = "\proglang{C++} 2011 Standard Document 14882:2011", + howpublished = {ISO/IEC Standard Group for Information Technology / Programming Languages / C++}, + year = 2011, + url = "https://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372", + urlansi = "https://webstore.ansi.org/RecordDetail.aspx?sku=ISO/IEC%2014882:2011" +} + +@book{Dongarra:1979:UGLINPACK, + title = {LINPACK users' guide}, + author = {Dongarra, Jack J and Moler, Cleve B and Bunch, James + R and Stewart, Gilbert W}, + year = 1979, + publisher = {SIAM} +} + +@Article{Eddelbuettel+Sanderson:2013:RcppArmadillo, + title = {{RcppArmadillo}: Accelerating {R} with High-Performance {C++} Linear Algebra}, + author = {Dirk Eddelbuettel and Conrad Sanderson}, + journal = {Computational Statistics and Data Analysis}, + year = 2014, + volume = 71, + month = {March}, + pages = {1054--1063}, + doi = {10.1016/j.csda.2013.02.005}, + url = {https://dx.doi.org/10.1016/j.csda.2013.02.005} +} + +@Article{Eddelbuettel+Sanderson:2014:RcppArmadillo, + title = {{RcppArmadillo}: Accelerating {R} with High-Performance {C++} Linear Algebra}, + author = {Dirk Eddelbuettel and Conrad Sanderson}, + journal = {Computational Statistics and Data Analysis}, + year = 2014, + volume = 71, + month = {March}, + pages = {1054--1063}, + doi = {10.1016/j.csda.2013.02.005}, + url = {https://dx.doi.org/10.1016/j.csda.2013.02.005} +} + +@Book{Eddelbuettel:2013:Rcpp, + author = {Dirk Eddelbuettel}, + title = {Seamless R and C++ Integration with Rcpp}, + publisher = {Springer}, + series = {Use R!}, + year = 2013, + address = {New York}, + isbn = {978-1-4614-6867-7} +} + +@article{Efron:1979:Bootstrap, + URL = {https://www.jstor.org/stable/2958830}, + author = {Efron, B.}, + journal = {The Annals of Statistics}, + number = {1}, + pages = {1-26}, + publisher = {Institute of Mathematical Statistics}, + title = {Bootstrap Methods: Another Look at the Jackknife}, + volume = {7}, + year = {1979} +} + +@MISC{Eigen:Web, + author = {Ga\"{e}l Guennebaud and Beno\^{i}t Jacob and others}, + title = {Eigen v3}, + year = 2012, + url = {https://eigen.tuxfamily.org} +} + +@Manual{GSL, + title = {{GNU} {S}cientific {L}ibrary {R}eference {M}anual}, + author = {Mark Galassi and Jim Davies and James Theiler and Brian Gough and Gerard Jungman and Patrick Alken and Michael Booth and Fabrice Rossi}, + year = {2010}, + edition = {3rd}, + note = {Version 1.14. {ISBN} 0954612078}, + url = {https://www.gnu.org/software/gsl} +} + +@Book{Gentleman:2009:RProgramming, + author = {Robert Gentleman}, + title = {R Programming for Bioinformatics}, + publisher = {Chapman \& Hall/CRC}, + year = 2009, + series = {Computer Science and Data Analysis}, + address = {Boca Raton, FL} +} + +@Manual{GitHub:Rperform, + title = {Rperform: Rperform - Performance testing for R packages}, + author = {Akash Tandon and Toby Dylan Hocking}, + year = {2015}, + note = {R package version 0.0.0.9000}, +} + +@Article{Gropp+Lusk+Doss+Skjellum:1996:MPI, + author = {William Gropp and Ewing Lusk and Nathan Doss and Anthony Skjellum}, + title = {A high-performance, portable implementation of the {MPI} message passing interface standard}, + journal = {Parallel Computing}, + year = 1996, + url = {https://dx.doi.org/10.1016/0167-8191(96)00024-5}, + doi = {10.1016/0167-8191(96)00024-5}, + volume = 22, + number = 6, + pages = {789--828} +} + +@Book{Gropp+Lusk+Skjellum:1999:MPI, + author = {William Gropp and Ewing Lusk and Anthony Skjellum}, + title = {Using {MPI}: Portable Parallel Programming with the Message Passing Interface}, + publisher = {MIT Press}, + year = 1999, + series = {Scientific and Engineering Computation Series}, + edition = {2nd}, + month = {November}, + note = {{ISBN} 978-0-262-57132-6} +} + +@article{Ihaka:1996, + Author = {Ihaka, Ross and Gentleman, Robert}, + Journal = {Journal of Computational and Graphical Statistics}, + Number = 3, + Pages = {299--314}, + Title = {R: A Language for Data Analysis and Graphics}, + Volume = 5, + Year = 1996 +} + +@article{JOSS:RcppCNPy, + doi = {10.21105/joss.00055}, + url = {https://doi.org/10.21105/joss.00055}, + year = {2016}, + month = {sep}, + publisher = {The Open Journal}, + volume = {1}, + number = {5}, + author = {Dirk Eddelbuettel and Wush Wu}, + title = {{RcppCNPy}: Read-Write Support for {NumPy} Files in R}, + journal = {The Journal of Open Source Software} +} + +@Article{JSS:RProtoBuf, + title = {{RProtoBuf}: Efficient Cross-Language Data Serialization in + {R}}, + author = {Dirk Eddelbuettel and Murray Stokely and Jeroen Ooms}, + journal = {Journal of Statistical Software}, + year = {2016}, + volume = {71}, + number = {2}, + pages = {1--24}, + url = {https://doi.org/10.18637/jss.v071.i02}, + doi = {10.18637/jss.v071.i02} +} + +@Article{JSS:Rcpp, + title = {{Rcpp}: Seamless {R} and {C++} Integration}, + author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, + journal = {Journal of Statistical Software}, + year = 2011, + volume = 40, + number = 8, + pages = {1--18}, + url = {https://doi.org/10.18637/jss.v040.i08}, + doi = {10.18637/jss.v040.i08} +} + +@Article{JSS:RcppEigen, + title = {Fast and Elegant Numerical Linear Algebra Using the + {RcppEigen} Package}, + author = {Douglas Bates and Dirk Eddelbuettel}, + journal = {Journal of Statistical Software}, + year = {2013}, + volume = {52}, + number = {5}, + pages = {1--24}, + url = {https://doi.org/10.18637/jss.v052.i05}, + doi = {10.18637/jss.v052.i05} +} + +@Unpublished{Java+Gaile+Manly:2007:RCpp, + author = {James J. Java and Daniel P. Gaile and Kenneth + E. Manly}, + title = {{R/Cpp}: Interface Classes to Simplify Using {R} + Objects in {C++} Extensions}, + note = {Unpublished manuscript, University at Buffalo}, + url = + {https://sphhp.buffalo.edu/biostat/research/techreports/UB_Biostatistics_TR0702.pdf}, + month = {July}, + year = 2007 +} + +@misc{KDE-TechBase:2012, + author = {KDE-TechBase}, + title = {Binary Compatibility Issues With {C++}}, + url = "https://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++", + year = 2012, + note = "[Online; accessed 24-November-2012]" +} + +@InProceedings{Leisch:2008:Tutorial, + author = {Friedrich Leisch}, + title = {Tutorial on {C}reating \proglang{R} {P}ackages}, + booktitle = {COMPSTAT 2008 -- Proceedings in Computational + Statistics}, + year = 2008, + editor = {Paula Brito}, + address = {Heidelberg}, + publisher = {Physica Verlag}, + url = CRAN # "doc/contrib/Leisch-CreatingPackages.pdf" +} + +@Manual{Liang:2008:rcppbind, + title = {rcppbind: {A} template library for R/C++ developers}, + author = {Gang Liang}, + year = 2008, + note = {R package version 1.0}, + url = R-Forge # "projects/rcppbind" +} + +@Book{Lippman+Lajoie+Moo:2005:Cpp_Primer, + author = {Stanley B. Lippman and Jos\'{e}e Lajoie and Barbara E. Moo}, + title = {The C++ Primer}, + publisher = {Addison-Wesley}, + address = {Boston}, + year = 2005, + edition = {4th} +} + +@Book{Matloff:2011:ArtOfR, + author = {Norman Matloff}, + title = {The Art of R Programming: A Tour of Statistical Software Design}, + publisher = {No Starch Press}, + address = {San Francisco, CA}, + year = 2011 +} + +@InProceedings{Maurer+Wong:2008:AttributesInC++, + author = {Jens Maurer and Michael Wong}, + title = {Towards support for attributes in {C++} (Revision + 6)}, + booktitle = {JTC1/SC22/WG21 - The C++ Standards Committee}, + year = {2008}, + url = + {https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}, + note = {{N2761=08-0271}} +} + +@book{Meyers:1995:MoreEffectiveC++, + author = {Scott Meyers}, + title = {More Effective C++: 35 New Ways to Improve Your + Programs and Designs}, + year = 1995, + note = {{ISBN} 020163371X}, + publisher = {Addison-Wesley}, + address = {Boston} +} + +@book{Meyers:2001:EffectiveSTL, + author = {Scott Meyers}, + title = {Effective STL: 50 specific ways to improve your use + of the standard template library}, + year = 2001, + note = {{ISBN} 0-201-74962-9}, + publisher = {Addison-Wesley}, + address = {Essex} +} + +@book{Meyers:2005:EffectiveC++, + author = {Scott Meyers}, + title = {Effective C++: 55 Specific Ways to Improve Your + Programs and Designs}, + year = 2005, + note = {{ISBN} 978-0321334879}, + publisher = {Addison-Wesley}, + address = {Boston}, + edition = {3rd}, +} + +@Article{PeerJ:Rcpp, + author = {Dirk Eddelbuettel and James Joseph Balamuta}, + title = {Extending R with C++: A Brief Introduction to Rcpp}, + journal = {PeerJ Preprints}, + volume = 5, + issue = {e3188v1}, + year = 2017, + month = {August}, + url = {https://doi.org/10.7287/peerj.preprints.3188v1/}, + doi = {10.7287/peerj.preprints.3188v1/} +} + +@Book{Plauger+Et+Al:2000:STL, + author = {P.J. Plauger and Alexander Stepanov and Meng Lee and + David R. Musser}, + title = {The {C++} Standard Template Library}, + publisher = {Prentice Hall PTR}, + year = 2000, + note = {{ISBN} 978-0134376332} +} + +@manual{QuantLib, + author = {{QuantLib Core Team}}, + year = 2021, + title = {QuantLib: a free/open-source library for quantitative finance}, + url = {https://quantlib.org} +} + +@manual{R:Administration, + author = RCoreTeam, + organization = RFoundation, + address = {Vienna, Austria}, + year = 2018, + title = "R Installation and Administration", + annote = {{ISBN} 3-900051-09-7}, + url = manuals # "R-admin.html" +} + +@manual{R:Extensions, + author = RCoreTeam, + organization = RFoundation, + address = {Vienna, Austria}, + year = 2021, + title = "Writing R extensions", + annote = {{ISBN} 3-900051-11-9}, + url = manuals # "R-exts.html" +} + +@manual{R:Internals, + author = RCoreTeam, + organization = RFoundation, + address = {Vienna, Austria}, + year = 2021, + title = "R internals", + annote = {{ISBN} 3-900051-14-3}, + url = manuals # "R-ints.html" +} + +@manual{R:Language, + author = RCoreTeam, + organization = RFoundation, + address = {Vienna, Austria}, + year = 2021, + title = "R language", + annote = {{ISBN} 3-900051-13-5}, + url = manuals # "R-lang.html" +} + +@Manual{R:Main, + title = {R: A Language and Environment for Statistical + Computing}, + author = RCoreTeam, + organization = RFoundation, + address = {Vienna, Austria}, + year = 2021, + url = {https://www.R-project.org/} +} + +@InProceedings{Runnalls:2009:CXXR, + author = {Andrew Runnalls}, + title = {Aspects of {CXXR} internals}, + booktitle = {Directions in Statistical Computing}, + address = {University of Copenhagen, Denmark}, + year = 2009 +} + +@Manual{Samperi:2009:RcppTemplate, + title = {RcppTemplate: Rcpp {R/C++} Object Mapping Library + and Package Template}, + author = {Dominick Samperi}, + year = 2009, + note = {(Archived) R package version 6.1}, + url = CRAN # "/src/contrib/Archive/RcppTemplate" +} + +@article{Sanderson+Curtin:2016, + doi = {10.21105/joss.00026}, + url = {https://dx.doi.org/10.21105/joss.00026}, + year = 2016, + month = {{June}}, + publisher = {The Open Journal}, + volume = 1, + number = 2, + author = {Conrad Sanderson and Ryan Curtin}, + title = {Armadillo: {A Template-Based C++ Library for Linear + Algebra}}, + journal = {{JOSS}} +} + +@TechReport{Sanderson:2010:Armadillo, + author = {Conrad Sanderson}, + title = {{Armadillo}: {An} open source {C++} Algebra Library + for Fast Prototyping and Computationally Intensive + Experiments }, + institution = {{NICTA}}, + year = 2010, + url = "https://arma.sf.net" +} + +@Book{Stroustrup:1997:Cpp, + author = {Bjarne Stroustrup}, + title = {The C++ Programming Language}, + publisher = {Addison-Wesley}, + address = {Boston}, + year = 1997, + edition = {3rd} +} + +@Book{Stroustrup:2013:Cpp, + author = {Bjarne Stroustrup}, + title = {The C++ Programming Language}, + publisher = {Addison-Wesley}, + address = {Boston}, + year = 2013, + pages = 1368, + edition = {4th} +} + +@Article{TAS:Rcpp, + author = {Dirk Eddelbuettel and James Joseph Balamuta}, + title = {Extending R with C++: A Brief Introduction to Rcpp}, + journal = {The American Statistician}, + volume = 72, + number = 1, + year = 2018, + month = {August}, + url = {https://doi.org/10.1080/00031305.2017.1375990}, + doi = {10.1080/00031305.2017.1375990} +} + +@Article{TempleLang:2009:ModestProposal, + author = {Duncan {Temple Lang}}, + title = {A modest proposal: an approach to making the + internal {R} system extensible}, + journal = {Computational Statistics}, + year = 2009, + volume = 24, + number = 2, + pages = {271-281}, + month = {May} +} + +@Article{TempleLang:2009:RGCCTranslationUnit, + author = {Duncan {Temple Lang}}, + title = {Working with meta-data from {C/C++} code in {R}: the + {RGCCTranslationUnit} package}, + journal = {Computational Statistics}, + year = 2009, + volume = 24, + number = 2, + pages = {283-293}, + month = {May} +} + +@InProceedings{Urbanek:2003:Rserve, + author = {Simon Urbanek}, + title = {{Rserve}: A Fast Way to Provide {R} Functionality to + Applications}, + booktitle = {Proceedings of the 3rd International Workshop on Distributed + Statistical Computing, Vienna, Austria}, + editor = {Kurt Hornik and Friedrich Leisch and Achim Zeileis}, + year = {2003}, + url = {https://www.ci.tuwien.ac.at/Conferences/DSC-2003/Proceedings/}, + note = {{ISSN 1609-395X}} +} + +@Book{Vandevoorde+Josuttis:2003:Templates, + author = {David Vandevoorde and Nicolai M. Josuttis}, + title = {{C++} {T}emplates: The Complete Guide}, + publisher = {Addison-Wesley}, + year = 2003, + address = {Boston} +} + +@inproceedings{Veldhuizen:1998:Blitz, + author = {Todd L. Veldhuizen}, + title = {Arrays in {Blitz++}}, + booktitle = {ISCOPE '98: Proceedings of the Second International + Symposium on Computing in Object-Oriented Parallel + Environments}, + note = {{ISBN} 3-540-65387-2}, + year = 1998, + pages = {223--230}, + publisher = {Springer-Verlag}, + address = {London}, +} + + +@Book{Venables+Ripley:2000:SProgramming, + author = {Willian N. Venables and Brian D. Ripley}, + title = {S Programming}, + publisher = {Springer-Verlag}, + year = 2000, + series = {Statistics and Computing}, + address = {New York} +} + + +@Book{Venables+Ripley:2002:MASS, + title = {Modern Applied Statistics with S}, + author = {W. N. Venables and B. D. Ripley}, + publisher = {Springer}, + edition = {Fourth}, + address = {New York}, + year = 2002, + note = {ISBN 0-387-95457-0}, + url = {https://www.stats.ox.ac.uk/pub/MASS4}, +} + +@misc{arxiv:corels, + title = {Learning Certifiably Optimal Rule Lists for + Categorical Data}, + author = {Elaine Angelino and Nicholas Larus-Stone and Daniel + Alabi and Margo Seltzer and Cynthia Rudin}, + year = 2017, + howpublished = {\href{https://www.arxiv.org/1704.01701}{arXiv:1704.01701}}, + archivePrefix ={arXiv}, + primaryClass = {stat.ML} +} + +@Misc{github:corels, + author = {Nicholas Laurus-Stone}, + title = {corels: {Learning Certifiably Optimal Rule Lists}}, + howpublished = {\url{https://github.com/nlarusstone/corels}. Also online at \url{https://corels.eecs.harvard.edu/corels/}}, + month = 06, + year = 2019 +} + +@Misc{github:rcppcorels, + author = {Dirk Eddelbuettel}, + title = {RcppCorels: R binding for the 'Certifiably Optimal RulE ListS (Corels)' Learner}, + howpublished = {\url{https://github.com/eddelbuettel/rcppcorels}}, + month = 11, + year = 2019 +} diff --git a/revdep/library/sprtt/new/Rcpp/discovery/cxx0x.R b/revdep/library/sprtt/new/Rcpp/discovery/cxx0x.R new file mode 100644 index 0000000..5cc3da4 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/discovery/cxx0x.R @@ -0,0 +1,60 @@ +#!/bin/env Rscript + +# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois +# +# This file is part of Rcpp. +# +# Rcpp is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Rcpp is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Rcpp. If not, see . + +# This script is used by the Rcpp::RcppCxx0xFlags function to +# generate the "-std=c++0x" flag when the compiler in use is GCC >= 4.3 + +local({ + flag <- function(){ + + cxx0x.code <- ' + #include + #include + + extern "C" SEXP cxx0x(){ + + #ifdef __GNUC__ + #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) + #if GCC_VERSION >= 40300 + return mkString( "-std=c++0x" ) ; + #endif + #endif + return mkString( "" ) ; + } + ' + td <- tempfile() + dir.create( td ) + here <- getwd() + setwd(td) + dll <- sprintf( "cxx0x%s", .Platform$dynlib.ext ) + on.exit( { + dyn.unload( dll ) + setwd(here) ; + unlink( td, recursive = TRUE ) + } ) + writeLines( cxx0x.code, "cxx0x.cpp" ) + cmd <- sprintf( "%s/R CMD SHLIB cxx0x.cpp", R.home(component="bin") ) + system( cmd, intern = TRUE ) + dyn.load( dll ) + res <- tryCatch( .Call( "cxx0x" ), error = "" ) + res + } + cat( flag() ) +}) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/Attributes/Depends.cpp b/revdep/library/sprtt/new/Rcpp/examples/Attributes/Depends.cpp new file mode 100644 index 0000000..228b4e3 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/Attributes/Depends.cpp @@ -0,0 +1,28 @@ + +// [[Rcpp::depends(RcppArmadillo)]] + +#include + +using namespace Rcpp; + +// [[Rcpp::export]] +List fastLm(NumericVector yr, NumericMatrix Xr) { + + int n = Xr.nrow(), k = Xr.ncol(); + + arma::mat X(Xr.begin(), n, k, false); // reuses memory and avoids extra copy + arma::colvec y(yr.begin(), yr.size(), false); + + arma::colvec coef = arma::solve(X, y); // fit model y ~ X + arma::colvec resid = y - X*coef; // residuals + + double sig2 = arma::as_scalar( arma::trans(resid)*resid/(n-k) ); + // std.error of estimate + arma::colvec stderrest = arma::sqrt( + sig2 * arma::diagvec( arma::inv(arma::trans(X)*X)) ); + + return List::create(Named("coefficients") = coef, + Named("stderr") = stderrest + ); +} + diff --git a/revdep/library/sprtt/new/Rcpp/examples/Attributes/Export.cpp b/revdep/library/sprtt/new/Rcpp/examples/Attributes/Export.cpp new file mode 100644 index 0000000..7252630 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/Attributes/Export.cpp @@ -0,0 +1,40 @@ + +#include + +using namespace Rcpp; + +// [[Rcpp::export]] +int fibonacci(const int x) { + + if (x == 0) return(0); + if (x == 1) return(1); + + return (fibonacci(x - 1)) + fibonacci(x - 2); +} + + +// [[Rcpp::export("convolveCpp")]] +NumericVector convolve(NumericVector a, NumericVector b) { + + int na = a.size(), nb = b.size(); + int nab = na + nb - 1; + NumericVector xab(nab); + + for (int i = 0; i < na; i++) + for (int j = 0; j < nb; j++) + xab[i + j] += a[i] * b[j]; + + return xab; +} + + +// [[Rcpp::export]] +List lapplyCpp(List input, Function f) { + + List output(input.size()); + + std::transform(input.begin(), input.end(), output.begin(), f); + output.names() = input.names(); + + return output; +} diff --git a/revdep/library/sprtt/new/Rcpp/examples/Attributes/cppFunction.R b/revdep/library/sprtt/new/Rcpp/examples/Attributes/cppFunction.R new file mode 100644 index 0000000..15d13b4 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/Attributes/cppFunction.R @@ -0,0 +1,43 @@ + +library(Rcpp) + +cppFunction(' + NumericVector convolveCpp(NumericVector a, NumericVector b) { + + int na = a.size(), nb = b.size(); + int nab = na + nb - 1; + NumericVector xab(nab); + + for (int i = 0; i < na; i++) + for (int j = 0; j < nb; j++) + xab[i + j] += a[i] * b[j]; + + return xab; + } +') + +convolveCpp(c(1,2,3), matrix(3,3)) + + +cppFunction(depends='RcppArmadillo', code=' + List fastLm(NumericVector yr, NumericMatrix Xr) { + + int n = Xr.nrow(), k = Xr.ncol(); + + arma::mat X(Xr.begin(), n, k, false); // reuses memory and avoids copy + arma::colvec y(yr.begin(), yr.size(), false); + + arma::colvec coef = arma::solve(X, y); // fit model y ~ X + arma::colvec resid = y - X*coef; // residuals + + double sig2 = arma::as_scalar( arma::trans(resid)*resid/(n-k) ); + // std.error of estimate + arma::colvec stderrest = arma::sqrt( + sig2 * arma::diagvec( arma::inv(arma::trans(X)*X)) ); + + return List::create(Named("coefficients") = coef, + Named("stderr") = stderrest + ); +} +') + diff --git a/revdep/library/sprtt/new/Rcpp/examples/Attributes/sourceCpp.R b/revdep/library/sprtt/new/Rcpp/examples/Attributes/sourceCpp.R new file mode 100644 index 0000000..ec25c17 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/Attributes/sourceCpp.R @@ -0,0 +1,10 @@ + +library(Rcpp) + +sourceCpp("Export.cpp") +fibonacci(5) + + +sourceCpp("Depends.cpp") +fastLm(c(1,2,3), matrix(3,3)) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/GNUmakefile b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/GNUmakefile new file mode 100644 index 0000000..9033f4e --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/GNUmakefile @@ -0,0 +1,29 @@ + +## comment this out if you need a different version of R, +## and set set R_HOME accordingly as an environment variable +R_HOME := $(shell R RHOME) + +## include headers and libraries for R +RCPPFLAGS := $(shell $(R_HOME)/bin/R CMD config --cppflags) +RLDFLAGS := $(shell $(R_HOME)/bin/R CMD config --ldflags) + +## include headers and libraries for Rcpp interface classes +RCPPINCL := $(shell echo 'Rcpp:::CxxFlags()' | $(R_HOME)/bin/R --vanilla --slave) +RCPPLIBS := $(shell echo 'Rcpp:::LdFlags()' | $(R_HOME)/bin/R --vanilla --slave) + +c_sources := $(wildcard *.c) +c_sharedlibs := $(patsubst %.c,%.o,$(c_sources)) + +cpp_sources := $(wildcard *.cpp) +cpp_sharedlibs := $(patsubst %.cpp,%.o,$(cpp_sources)) + +all : $(c_sharedlibs) $(cpp_sharedlibs) + +%.o : %.c + R CMD SHLIB $< + +%.o : %.cpp + PKG_CPPFLAGS="$(RCPPFLAGS) $(RCPPINCL)" PKG_LIBS="$(RLDFLAGS) $(RCPPLIBS)" R CMD SHLIB $< + +run : $(c_sharedlibs) $(cpp_sharedlibs) + Rscript exampleRCode.r diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/buildAndRun.sh b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/buildAndRun.sh new file mode 100644 index 0000000..473c49a --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/buildAndRun.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +rm -f *.o *.so + +# build the shared library for the C variant +R CMD SHLIB convolve2_c.c +R CMD SHLIB convolve7_c.c + +# build the shared library for the C++ variant +# we have to let R know where the Rcpp header and library are +export PKG_CPPFLAGS=`Rscript -e "Rcpp:::CxxFlags()"` +export PKG_LIBS=`Rscript -e "Rcpp:::LdFlags()"` +R CMD SHLIB convolve3_cpp.cpp +R CMD SHLIB convolve4_cpp.cpp +R CMD SHLIB convolve5_cpp.cpp +R CMD SHLIB convolve8_cpp.cpp +R CMD SHLIB convolve9_cpp.cpp +R CMD SHLIB convolve10_cpp.cpp +R CMD SHLIB convolve11_cpp.cpp +R CMD SHLIB convolve12_cpp.cpp +R CMD SHLIB convolve14_cpp.cpp + +# call R so that we get an interactive session +Rscript exampleRCode.r + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.cpp b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.cpp new file mode 100644 index 0000000..d21b4f0 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.cpp @@ -0,0 +1,36 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// this version expands convolve8_cpp by making Vec mimic the structure of +// NumericVector. It peforms well, so this is is not the structure of +// NumericVector that is the problem. So what is it then ? +// +// could it be because NumericVector is in a different library than +// this code, so that operator[] is not inlined ? +// +// clues: +// - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3538.html + +#include + +#include "convolve10_cpp.h" + +RcppExport SEXP convolve10cpp(SEXP a, SEXP b){ + Rcpp::NumericVector xa(a); + Rcpp::NumericVector xb(b); + int n_xa = xa.size() ; + int n_xb = xb.size() ; + int nab = n_xa + n_xb - 1; + Rcpp::NumericVector xab(nab); + + Vec vab(xab.begin()), va(xa.begin()), vb(xb.begin()) ; + + for (int i = 0; i < n_xa; i++) + for (int j = 0; j < n_xb; j++) + vab[i + j] += va[i] * vb[j]; + + return xab ; +} + +#include "loopmacro.h" +LOOPMACRO_CPP(convolve10cpp) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.h b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.h new file mode 100644 index 0000000..53f93bd --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.h @@ -0,0 +1,27 @@ + +class Cache{ +public: + typedef double& proxy ; + typedef double* iterator ; + + Cache( iterator data_) : data(data_){} + + inline proxy ref(int i){ return data[i] ; } + inline proxy ref(int i) const { return data[i] ; } + +private: + iterator data ; +} ; + +class Vec { +public: + typedef double& proxy ; + + Vec( double* data_ ) : cache(data_){} + inline proxy operator[]( int i){ return cache.ref(i) ; } + inline proxy operator[]( int i) const { return cache.ref(i) ; } + +private: + Cache cache ; +} ; + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve11_cpp.cpp b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve11_cpp.cpp new file mode 100644 index 0000000..b1f39da --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve11_cpp.cpp @@ -0,0 +1,24 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// This version uses nona to indicate that xb does not contain any missing +// value. This is the assumption that all other versions do. + +#include +using namespace Rcpp ; + + +RcppExport SEXP convolve11cpp(SEXP a, SEXP b) { + NumericVector xa(a); int n_xa = xa.size() ; + NumericVector xb(b); int n_xb = xb.size() ; + NumericVector xab(n_xa + n_xb - 1,0.0); + + Range r( 0, n_xb-1 ); + for(int i=0; i + +RcppExport SEXP convolve12cpp(SEXP a, SEXP b){ + Rcpp::NumericVector xa(a), xb(b); + int n_xa = xa.size(), n_xb = xb.size(); + Rcpp::NumericVector xab(n_xa + n_xb - 1); + + typedef Rcpp::NumericVector::iterator vec_iterator ; + vec_iterator ia = xa.begin(), ib = xb.begin(); + vec_iterator iab = xab.begin(); + for (int i = 0; i < n_xa; i++) + for (int j = 0; j < n_xb; j++) + iab[i + j] += ia[i] * ib[j]; + + return xab; +} + +#include "loopmacro.h" +LOOPMACRO_CPP(convolve12cpp) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve13_cpp.cpp b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve13_cpp.cpp new file mode 100644 index 0000000..cff5bc8 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve13_cpp.cpp @@ -0,0 +1,27 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example + +#include + +template +T convolve( const T& a, const T& b ){ + int na = a.size() ; int nb = b.size() ; + T out(na + nb - 1); + typename T::iterator iter_a(a.begin()), iter_b(b.begin()), iter_ab( out.begin() ) ; + + for (int i = 0; i < na; i++) + for (int j = 0; j < nb; j++) + iter_ab[i + j] += iter_a[i] * iter_b[j]; + + return out ; +} + + +RcppExport SEXP convolve13cpp(SEXP a, SEXP b){ + return convolve( Rcpp::NumericVector(a), Rcpp::NumericVector(b) ) ; +} + +#include "loopmacro.h" +LOOPMACRO_CPP(convolve13cpp) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve14_cpp.cpp b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve14_cpp.cpp new file mode 100644 index 0000000..0c74ff6 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve14_cpp.cpp @@ -0,0 +1,25 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example + +#include + +using namespace Rcpp ; +RcppExport SEXP convolve14cpp(SEXP a, SEXP b){ + NumericVector xa(a), xb(b); + int n_xa = xa.size() ; + int n_xb = xb.size() ; + int nab = n_xa + n_xb - 1; + NumericVector xab(nab); + Fast fa(xa), fb(xb), fab(xab) ; + + for (int i = 0; i < n_xa; i++) + for (int j = 0; j < n_xb; j++) + fab[i + j] += fa[i] * fb[j]; + + return xab ; +} + +#include "loopmacro.h" +LOOPMACRO_CPP(convolve14cpp) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve2_c.c b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve2_c.c new file mode 100644 index 0000000..5d84038 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve2_c.c @@ -0,0 +1,28 @@ + +/* This is from 'Writing R Extensions' section 5.10.1 */ + +#include +#include + +SEXP convolve2(SEXP a, SEXP b) +{ + int i, j, na, nb, nab; + double *xa, *xb, *xab; + SEXP ab; + + PROTECT(a = AS_NUMERIC(a)); + PROTECT(b = AS_NUMERIC(b)); + na = LENGTH(a); nb = LENGTH(b); nab = na + nb - 1; + PROTECT(ab = NEW_NUMERIC(nab)); + xa = NUMERIC_POINTER(a); xb = NUMERIC_POINTER(b); + xab = NUMERIC_POINTER(ab); + for(i = 0; i < nab; i++) xab[i] = 0.0; + for(i = 0; i < na; i++) + for(j = 0; j < nb; j++) xab[i + j] += xa[i] * xb[j]; + UNPROTECT(3); + return(ab); +} + +#include "loopmacro.h" +LOOPMACRO_C(convolve2) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve3_cpp.cpp b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve3_cpp.cpp new file mode 100644 index 0000000..173d921 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve3_cpp.cpp @@ -0,0 +1,24 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example + +#include + +RcppExport SEXP convolve3cpp(SEXP a, SEXP b){ + Rcpp::NumericVector xa(a); + Rcpp::NumericVector xb(b); + int n_xa = xa.size() ; + int n_xb = xb.size() ; + int nab = n_xa + n_xb - 1; + Rcpp::NumericVector xab(nab); + + for (int i = 0; i < n_xa; i++) + for (int j = 0; j < n_xb; j++) + xab[i + j] += xa[i] * xb[j]; + + return xab ; +} + +#include "loopmacro.h" +LOOPMACRO_CPP(convolve3cpp) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve4_cpp.cpp b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve4_cpp.cpp new file mode 100644 index 0000000..b853fff --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve4_cpp.cpp @@ -0,0 +1,29 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example + +#include + +RcppExport SEXP convolve4cpp(SEXP a, SEXP b) { + Rcpp::NumericVector xa(a); + Rcpp::NumericVector xb(b); + int n_xa = xa.size() ; + int n_xb = xb.size() ; + int nab = n_xa + n_xb - 1; + Rcpp::NumericVector xab(nab,0.0); + + double* pa = xa.begin() ; + double* pb = xb.begin() ; + double* pab = xab.begin() ; + int i,j=0; + for (i = 0; i < n_xa; i++) + for (j = 0; j < n_xb; j++) + pab[i + j] += pa[i] * pb[j]; + + return xab ; +} + +#include "loopmacro.h" +LOOPMACRO_CPP(convolve4cpp) + + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve5_cpp.cpp b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve5_cpp.cpp new file mode 100644 index 0000000..6499ac6 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve5_cpp.cpp @@ -0,0 +1,23 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example + +#include +using namespace Rcpp ; + + +RcppExport SEXP convolve5cpp(SEXP a, SEXP b) { + NumericVector xa(a); int n_xa = xa.size() ; + NumericVector xb(b); int n_xb = xb.size() ; + NumericVector xab(n_xa + n_xb - 1,0.0); + + Range r( 0, n_xb-1 ); + for(int i=0; i +#include + +SEXP convolve7(SEXP a, SEXP b) +{ + int i, j, na, nb, nab; + SEXP ab; + + PROTECT(a = AS_NUMERIC(a)); + PROTECT(b = AS_NUMERIC(b)); + na = LENGTH(a); nb = LENGTH(b); nab = na + nb - 1; + PROTECT(ab = NEW_NUMERIC(nab)); + for(i = 0; i < nab; i++) REAL(ab)[i] = 0.0; + for(i = 0; i < na; i++) + for(j = 0; j < nb; j++) REAL(ab)[i + j] += REAL(a)[i] * REAL(b)[j]; + UNPROTECT(3); + return(ab); + +} + + +#include "loopmacro.h" +LOOPMACRO_C(convolve7) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve8_cpp.cpp b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve8_cpp.cpp new file mode 100644 index 0000000..ee7c95e --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve8_cpp.cpp @@ -0,0 +1,43 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// this version is between the Rcpp_New_ptr and the Rcpp_New_std version +// test elapsed relative user.self sys.self +// 5 Rcpp_New_ptr(REPS, a, b) 0.214 1.000000 0.213 0.001 +// 7 Rcpp_New_std_2(REPS, a, b) 0.223 1.042056 0.216 0.006 +// 4 Rcpp_New_std(REPS, a, b) 0.524 2.448598 0.523 0.001 +// +// so there is some overhead due to creating Vec objects and indexing them +// but much less than when we index the NumericVector + +#include + +class Vec { +public: + Vec( double* data_ ) : data(data_){} + inline double& operator[]( int i){ return data[i] ; } + +private: + double* data ; +} ; + + +RcppExport SEXP convolve8cpp(SEXP a, SEXP b){ + Rcpp::NumericVector xa(a); + Rcpp::NumericVector xb(b); + int n_xa = xa.size() ; + int n_xb = xb.size() ; + int nab = n_xa + n_xb - 1; + Rcpp::NumericVector xab(nab); + + Vec vab(xab.begin()), va(xa.begin()), vb(xb.begin()) ; + + for (int i = 0; i < n_xa; i++) + for (int j = 0; j < n_xb; j++) + vab[i + j] += va[i] * vb[j]; + + return xab ; +} + +#include "loopmacro.h" +LOOPMACRO_CPP(convolve8cpp) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve9_cpp.cpp b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve9_cpp.cpp new file mode 100644 index 0000000..7b7d1b7 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/convolve9_cpp.cpp @@ -0,0 +1,61 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// this version expands convolve8_cpp by making Vec mimic the structure of +// NumericVector. It peforms well, so this is is not the structure of +// NumericVector that is the problem. So what is it then ? +// +// could it be because NumericVector is in a different library than +// this code, so that operator[] is not inlined ? +// +// clues: +// - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3538.html + +#include + +class Cache{ +public: + typedef double& proxy ; + typedef double* iterator ; + + Cache( iterator data_) : data(data_){} + + inline proxy ref(int i){ return data[i] ; } + inline proxy ref(int i) const { return data[i] ; } + +private: + iterator data ; +} ; + +class Vec { +public: + typedef double& proxy ; + + Vec( double* data_ ) : cache(data_){} + inline proxy operator[]( int i){ return cache.ref(i) ; } + inline proxy operator[]( int i) const { return cache.ref(i) ; } + +private: + Cache cache ; +} ; + + +RcppExport SEXP convolve9cpp(SEXP a, SEXP b){ + Rcpp::NumericVector xa(a); + Rcpp::NumericVector xb(b); + int n_xa = xa.size() ; + int n_xb = xb.size() ; + int nab = n_xa + n_xb - 1; + Rcpp::NumericVector xab(nab); + + Vec vab(xab.begin()), va(xa.begin()), vb(xb.begin()) ; + + for (int i = 0; i < n_xa; i++) + for (int j = 0; j < n_xb; j++) + vab[i + j] += va[i] * vb[j]; + + return xab ; +} + +#include "loopmacro.h" +LOOPMACRO_CPP(convolve9cpp) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/exampleRCode.r b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/exampleRCode.r new file mode 100644 index 0000000..47605ef --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/exampleRCode.r @@ -0,0 +1,107 @@ +#!/usr/bin/env r + +suppressMessages(require(Rcpp)) +set.seed(42) +n <- 200 +a <- rnorm(n) +b <- rnorm(n) + +## load shared libraries with wrapper code +dyn.load("convolve2_c.so") +dyn.load("convolve3_cpp.so") +dyn.load("convolve4_cpp.so") +dyn.load("convolve5_cpp.so") +dyn.load("convolve7_c.so") + +dyn.load("convolve8_cpp.so") +dyn.load("convolve9_cpp.so") +dyn.load("convolve10_cpp.so") +dyn.load("convolve11_cpp.so") +dyn.load("convolve12_cpp.so" ) +dyn.load("convolve14_cpp.so" ) + +## now run each one once for comparison of results, +## and define test functions + +R_API_optimised <- function(n,a,b) .Call("convolve2__loop", n, a, b) +Rcpp_New_std <- function(n,a,b) .Call("convolve3cpp__loop", n, a, b) +#Rcpp_New_std_inside <- function(n,a,b) .Call("convolve3cpp__loop", n, a, b, PACKAGE = "Rcpp" ) +Rcpp_New_ptr <- function(n,a,b) .Call("convolve4cpp__loop", n, a, b) +Rcpp_New_sugar <- function(n,a,b) .Call("convolve5cpp__loop", n, a, b) +Rcpp_New_sugar_noNA <- function(n,a,b) .Call("convolve11cpp__loop", n, a, b) +R_API_naive <- function(n,a,b) .Call("convolve7__loop", n, a, b) +Rcpp_New_std_2 <- function(n,a,b) .Call("convolve8cpp__loop", n, a, b) +#Rcpp_New_std_3 <- function(n,a,b) .Call("convolve9cpp__loop", n, a, b) +#Rcpp_New_std_4 <- function(n,a,b) .Call("convolve10cpp__loop", n, a, b) +Rcpp_New_std_it <- function(n,a,b) .Call("convolve12cpp__loop", n, a, b ) +Rcpp_New_std_Fast <- function(n,a,b) .Call("convolve14cpp__loop", n, a, b ) + + +v1 <- R_API_optimised(1L, a, b ) +v3 <- Rcpp_New_std(1L, a, b) +v4 <- Rcpp_New_ptr(1L, a, b) +v5 <- Rcpp_New_sugar(1L, a, b ) +v7 <- R_API_naive(1L, a, b) +v11 <- Rcpp_New_sugar_noNA(1L, a, b) + +stopifnot(all.equal(v1, v3)) +stopifnot(all.equal(v1, v4)) +stopifnot(all.equal(v1, v5)) +stopifnot(all.equal(v1, v7)) +stopifnot(all.equal(v1, v11)) + +## load benchmarkin helper function +suppressMessages(library(rbenchmark)) +REPS <- 5000L +bm <- benchmark(R_API_optimised(REPS,a,b), + R_API_naive(REPS,a,b), + Rcpp_New_std(REPS,a,b), +# Rcpp_New_std_inside(REPS,a,b), + Rcpp_New_ptr(REPS,a,b), + Rcpp_New_sugar(REPS,a,b), + Rcpp_New_sugar_noNA(REPS,a,b), + Rcpp_New_std_2(REPS,a,b), +# Rcpp_New_std_3(REPS,a,b), +# Rcpp_New_std_4(REPS,a,b), + Rcpp_New_std_it(REPS,a,b), + Rcpp_New_std_Fast(REPS,a,b), + columns=c("test", "elapsed", "relative", "user.self", "sys.self"), + order="relative", + replications=1) +print(bm) + +cat("All results are equal\n") # as we didn't get stopped +q("no") + + +sizes <- 1:10*100 +REPS <- 5000L +timings <- lapply( sizes, function(size){ + cat( "size = ", size, "..." ) + a <- rnorm(size); b <- rnorm(size) + bm <- benchmark(R_API_optimised(REPS,a,b), + R_API_naive(REPS,a,b), + Rcpp_New_std(REPS,a,b), + Rcpp_New_ptr(REPS,a,b), + Rcpp_New_sugar(REPS,a,b), + Rcpp_New_sugar_noNA(REPS,a,b), + columns=c("test", "elapsed", "relative", "user.self", "sys.self"), + order="relative", + replications=1) + + cat( " done\n" ) + bm +} ) +for( i in seq_along(sizes)){ + timings[[i]]$size <- sizes[i] +} +timings <- do.call( rbind, timings ) + +require( lattice ) +png( "elapsed.png", width = 800, height = 600 ) +xyplot( elapsed ~ size, groups = test, data = timings, auto.key = TRUE, type = "l", lwd = 2 ) +dev.off() +png( "relative.png", width = 800, height = 600 ) +xyplot( relative ~ size, groups = test, data = timings, auto.key = TRUE, type = "l", lwd = 2 ) +dev.off() + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/loopmacro.h b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/loopmacro.h new file mode 100644 index 0000000..c8c3631 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/loopmacro.h @@ -0,0 +1,13 @@ + +#define LOOPMACRO_C(name) \ +SEXP name##__loop(SEXP n_, SEXP a, SEXP b){ \ + int n = INTEGER(n_)[0] ; \ + SEXP res = R_NilValue ; \ + for( int i=0; i +// using namespace Rcpp ; + +SEXP overhead_cpp(SEXP a, SEXP b) { + return R_NilValue ; +} + +extern "C" void R_init_overhead_1(DllInfo *info){ + + R_CallMethodDef callMethods[] = { + {"overhead_cpp", (DL_FUNC) &overhead_cpp, 2}, + {NULL, NULL, 0} + }; + + R_registerRoutines(info, NULL, callMethods, NULL, NULL); +} + diff --git a/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/overhead_2.c b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/overhead_2.c new file mode 100644 index 0000000..e59bab1 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/ConvolveBenchmarks/overhead_2.c @@ -0,0 +1,21 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example +#include +#include +#include + +SEXP overhead_c(SEXP a, SEXP b) { + return R_NilValue ; +} + +void R_init_overhead_2(DllInfo *info){ + + R_CallMethodDef callMethods[] = { + {"overhead_c", (DL_FUNC) &overhead_c, 2}, + {NULL, NULL, 0} + }; + + R_registerRoutines(info, NULL, callMethods, NULL, NULL); +} + diff --git a/revdep/library/sprtt/new/Rcpp/examples/FastLM/benchmark.r b/revdep/library/sprtt/new/Rcpp/examples/FastLM/benchmark.r new file mode 100644 index 0000000..f994b35 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/FastLM/benchmark.r @@ -0,0 +1,54 @@ +#!/usr/bin/env r +# +# Comparison benchmark +# +# This shows how Armadillo improves on the previous version using GNU GSL, +# and how both are doing better than lm.fit() +# +# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois +# +# This file is part of Rcpp. +# +# Rcpp is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Rcpp is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Rcpp. If not, see . + +suppressMessages(library(RcppGSL)) +suppressMessages(library(RcppArmadillo)) + +source("lmArmadillo.R") +source("lmGSL.R") + +set.seed(42) +n <- 5000 +k <- 9 +X <- cbind( rep(1,n), matrix(rnorm(n*k), ncol=k) ) +truecoef <- 1:(k+1) +y <- as.numeric(X %*% truecoef + rnorm(n)) + +N <- 100 + +lmgsl <- lmGSL() +lmarma <- lmArmadillo() + +tlm <- mean(replicate(N, system.time( lmfit <- lm(y ~ X - 1) )["elapsed"]), trim=0.05) +tlmfit <- mean(replicate(N, system.time(lmfitfit <- lm.fit(X, y))["elapsed"]), trim=0.05) +tlmgsl <- mean(replicate(N, system.time(lmgsl(y, X))["elapsed"]), trim=0.05) +tlmarma <- mean(replicate(N, system.time(lmarma(y, X))["elapsed"]), trim=0.05) + +res <- c(tlm, tlmfit, tlmgsl, tlmarma) +data <- data.frame(results=res, ratios=tlm/res) +rownames(data) <- c("lm", "lm.fit", "lmGSL", "lmArma") +cat("For n=", n, " and k=", k, "\n", sep="") +print(t(data)) +print(t(1/data[,1,drop=FALSE])) # regressions per second + diff --git a/revdep/library/sprtt/new/Rcpp/examples/FastLM/benchmarkLongley.r b/revdep/library/sprtt/new/Rcpp/examples/FastLM/benchmarkLongley.r new file mode 100644 index 0000000..9d50447 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/FastLM/benchmarkLongley.r @@ -0,0 +1,55 @@ +#!/usr/bin/env r +# +# Comparison benchmark -- using old and small Longley data set +# +# This shows how Armadillo improves on the previous version using GNU GSL, +# and how both are doing better than lm.fit() +# +# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois +# +# This file is part of Rcpp. +# +# Rcpp is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Rcpp is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Rcpp. If not, see . + +suppressMessages(library(utils)) +suppressMessages(library(Rcpp)) +suppressMessages(library(inline)) +suppressMessages(library(datasets)) + +source("lmArmadillo.R") +source("lmGSL.R") + +data(longley) + +longleydm <- data.matrix(data.frame(intcp=1, longley)) +X <- longleydm[,-8] +y <- as.numeric(longleydm[,8]) + +N <- 1000 + +lmgsl <- lmGSL() +lmarma <- lmArmadillo() + +tlm <- mean(replicate(N, system.time( lmfit <- lm(y ~ X - 1) )["elapsed"]), trim=0.05) +tlmfit <- mean(replicate(N, system.time(lmfitfit <- lm.fit(X, y))["elapsed"]), trim=0.05) +tlmgsl <- mean(replicate(N, system.time(lmgsl(y, X))["elapsed"]), trim=0.05) +tlmarma <- mean(replicate(N, system.time(lmarma(y, X))["elapsed"]), trim=0.05) + +res <- c(tlm, tlmfit, tlmgsl, tlmarma) +data <- data.frame(results=res, ratios=tlm/res) +rownames(data) <- c("lm", "lm.fit", "lmGSL", "lmArma") +cat("For Longley\n") +print(t(data)) +print(t(1/data[,1,drop=FALSE])) # regressions per second + diff --git a/revdep/library/sprtt/new/Rcpp/examples/FastLM/fastLMviaArmadillo.r b/revdep/library/sprtt/new/Rcpp/examples/FastLM/fastLMviaArmadillo.r new file mode 100644 index 0000000..628ebe4 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/FastLM/fastLMviaArmadillo.r @@ -0,0 +1,51 @@ +#!/usr/bin/env r +# +# A faster lm() replacement based on Armadillo +# +# This improves on the previous version using GNU GSL +# +# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois +# +# This file is part of Rcpp. +# +# Rcpp is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Rcpp is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Rcpp. If not, see . + +source("lmArmadillo.R") + +checkLmArmadillo <- function(y, X) { + fun <- lmArmadillo() + res <- fun(y, X) + fit <- lm(y ~ X - 1) + rc <- all.equal( as.numeric(res[[1]]), as.numeric(coef(fit))) & + all.equal( as.numeric(res[[2]]), as.numeric(coef(summary(fit))[,2])) + invisible(rc) +} + +timeLmArmadillo <- function(y, X, N) { + fun <- lmArmadillo(); + meantime <- mean(replicate(N, system.time(fun(y, X))["elapsed"]), trim=0.05) +} + +set.seed(42) +n <- 5000 +k <- 9 +X <- cbind( rep(1,n), matrix(rnorm(n*k), ncol=k) ) +truecoef <- 1:(k+1) +y <- as.numeric(X %*% truecoef + rnorm(n)) + +N <- 100 + +stopifnot(checkLmArmadillo(y, X)) +mt <- timeLmArmadillo(y, X, N) +cat("Armadillo: Running", N, "simulations yields (trimmed) mean time", mt, "\n") diff --git a/revdep/library/sprtt/new/Rcpp/examples/FastLM/fastLMviaGSL.r b/revdep/library/sprtt/new/Rcpp/examples/FastLM/fastLMviaGSL.r new file mode 100644 index 0000000..24262f9 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/FastLM/fastLMviaGSL.r @@ -0,0 +1,52 @@ +#!/usr/bin/env r +# +# A faster lm() replacement based on GNU GSL +# +# This first appeared in the 'Intro to HPC tutorials' +# but has been wrapped in inline::cfunction() here +# +# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois +# +# This file is part of Rcpp. +# +# Rcpp is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Rcpp is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Rcpp. If not, see . + +source("lmGSL.R") + +checkLmGSL <- function(y, X) { + fun <- lmGSL() + res <- fun(y, X) + fit <- lm(y ~ X - 1) + rc <- all.equal( res[[1]], as.numeric(coef(fit))) & + all.equal( res[[2]], as.numeric(coef(summary(fit))[,2])) + invisible(rc) +} + +timeLmGSL <- function(y, X, N) { + fun <- lmGSL(); + meantime <- mean(replicate(N, system.time(fun(y, X))["elapsed"]), trim=0.05) +} + +set.seed(42) +n <- 5000 +k <- 9 +X <- cbind( rep(1,n), matrix(rnorm(n*k), ncol=k) ) +truecoef <- 1:(k+1) +y <- as.numeric(X %*% truecoef + rnorm(n)) + +N <- 100 + +stopifnot(checkLmGSL(y, X)) +mt <- timeLmGSL(y, X, N) +cat("GSL: Running", N, "simulations yields (trimmed) mean time", mt, "\n") diff --git a/revdep/library/sprtt/new/Rcpp/examples/FastLM/lmArmadillo.R b/revdep/library/sprtt/new/Rcpp/examples/FastLM/lmArmadillo.R new file mode 100644 index 0000000..35db589 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/FastLM/lmArmadillo.R @@ -0,0 +1,89 @@ +# +# lm() via Armadillo -- improving on the previous GSL solution +# +# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois +# +# This file is part of Rcpp. +# +# Rcpp is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Rcpp is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Rcpp. If not, see . + +suppressMessages(require(Rcpp)) + +## NOTE: This is the old way to compile Rcpp code inline. +## The code here has left as a historical artifact and tribute to the old way. +## Please use the code under the "new" inline compilation section. + +suppressMessages(require(inline)) + +lmArmadillo_old <- function() { + src <- ' + + Rcpp::NumericVector yr(Ysexp); + Rcpp::NumericVector Xr(Xsexp); + std::vector dims = Xr.attr("dim") ; + int n = dims[0], k = dims[1]; + + arma::mat X(Xr.begin(), n, k, false); // use advanced armadillo constructors + arma::colvec y(yr.begin(), yr.size()); + + arma::colvec coef = solve(X, y); // fit model y ~ X + + arma::colvec resid = y - X*coef; // to compute std. error of the coefficients + double sig2 = arma::as_scalar(trans(resid)*resid)/(n-k); // requires Armadillo 0.8.2 or later + arma::mat covmat = sig2 * arma::inv(arma::trans(X)*X); + + Rcpp::NumericVector coefr(k), stderrestr(k); + for (int i=0; i. + +suppressMessages(require(Rcpp)) + +## NOTE: This is the old way to compile Rcpp code inline. +## The code here has left as a historical artifact and tribute to the old way. +## Please use the code under the "new" inline compilation section. + +suppressMessages(require(inline)) + +lmGSL_old <- function() { + + src <- ' + + Rcpp::NumericVector Yr(Ysexp); + Rcpp::NumericMatrix Xr(Xsexp); + + int i,j,n = Xr.nrow(), k = Xr.ncol(); + double chisq; + + gsl_matrix *X = gsl_matrix_alloc (n, k); + gsl_vector *y = gsl_vector_alloc (n); + gsl_vector *c = gsl_vector_alloc (k); + gsl_matrix *cov = gsl_matrix_alloc (k, k); + for (i = 0; i < n; i++) { + for (j = 0; j < k; j++) + gsl_matrix_set (X, i, j, Xr(i,j)); + gsl_vector_set (y, i, Yr(i)); + } + + gsl_multifit_linear_workspace *work = gsl_multifit_linear_alloc (n, k); + gsl_multifit_linear (X, y, c, cov, &chisq, work); + gsl_multifit_linear_free (work); + + Rcpp::NumericVector coefr(k), stderrestr(k); + for (i = 0; i < k; i++) { + coefr(i) = gsl_vector_get(c,i); + stderrestr(i) = sqrt(gsl_matrix_get(cov,i,i)); + } + gsl_matrix_free (X); + gsl_vector_free (y); + gsl_vector_free (c); + gsl_matrix_free (cov); + + + return Rcpp::List::create( Rcpp::Named( "coef", coefr), + Rcpp::Named( "stderr", stderrestr)); + ' + + ## turn into a function that R can call + ## compileargs redundant on Debian/Ubuntu as gsl headers are found anyway + fun_old <- cxxfunction(signature(Ysexp="numeric", Xsexp="numeric"), + src, + includes="#include ", + plugin="RcppGSL") +} + +## NOTE: Within this section, the new way to compile Rcpp code inline has been +## written. Please use the code next as a template for your own project. + +lmGSL <- function() { + +sourceCpp(code=' +#include +#include +// [[Rcpp::depends(RcppGSL)]] + +// [[Rcpp::export]] +Rcpp::List fun(Rcpp::NumericVector Yr, Rcpp::NumericMatrix Xr){ + + int i, j, n = Xr.nrow(), k = Xr.ncol(); + double chisq; + + RcppGSL::Matrix X(n, k); // allocate a gsl_matrix of dim n, k + RcppGSL::Vector y(n); // allocate a gsl_vector of length n + RcppGSL::Vector c(k); // allocate a gsl_vector of length k + RcppGSL::Matrix cov(k, k); // allocate a gsl_matrix of dim k, k + + for (i = 0; i < n; i++) { + for (j = 0; j < k; j++) + X(i, j) = Xr(i, j); + y[i] = Yr(i); // Note vector requires [] not () + } + + gsl_multifit_linear_workspace *work = gsl_multifit_linear_alloc (n, k); + gsl_multifit_linear (X, y, c, cov, &chisq, work); + gsl_multifit_linear_free (work); + + Rcpp::NumericVector coefr(k), stderrestr(k); + for (i = 0; i < k; i++) { + coefr(i) = c[i]; + stderrestr(i) = sqrt(cov(i,i)); + } + + + return Rcpp::List::create( Rcpp::Named("coef") = coefr, + Rcpp::Named("stderr") = stderrestr); +}') +fun +} diff --git a/revdep/library/sprtt/new/Rcpp/examples/Misc/fibonacci.r b/revdep/library/sprtt/new/Rcpp/examples/Misc/fibonacci.r new file mode 100644 index 0000000..6ae402f --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/Misc/fibonacci.r @@ -0,0 +1,46 @@ +#!/usr/bin/env r + +## this short example was provided in response to this StackOverflow questions: +## http://stackoverflow.com/questions/6807068/why-is-my-recursive-function-so-slow-in-r +## and illustrates that recursive function calls are a) really expensive in R and b) not +## all expensive in C++ (my machine sees a 700-fold speed increase) and c) the byte +## compiler in R does not help here. + +suppressMessages(library(Rcpp)) + +## byte compiler +require(compiler) + +## A C++ version compile with cppFunction +fibRcpp <- cppFunction( ' +int fibonacci(const int x) { + if (x == 0) return(0); + if (x == 1) return(1); + return (fibonacci(x - 1)) + fibonacci(x - 2); +} +' ) + + +## for comparison, the original (but repaired with 0/1 offsets) +fibR <- function(seq) { + if (seq == 0) return(0); + if (seq == 1) return(1); + return (fibR(seq - 1) + fibR(seq - 2)); +} + +## also use byte-compiled R function +fibRC <- cmpfun(fibR) + +## load rbenchmark to compare +library(rbenchmark) + +N <- 35 ## same parameter as original post +res <- benchmark(fibR(N), + fibRC(N), + fibRcpp(N), + columns=c("test", "replications", "elapsed", + "relative", "user.self", "sys.self"), + order="relative", + replications=1) +print(res) ## show result + diff --git a/revdep/library/sprtt/new/Rcpp/examples/Misc/ifelseLooped.r b/revdep/library/sprtt/new/Rcpp/examples/Misc/ifelseLooped.r new file mode 100644 index 0000000..c63bad8 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/Misc/ifelseLooped.r @@ -0,0 +1,101 @@ +#!/usr/bin/env r +## +## This example goes back to the following StackOverflow questions: +## http://stackoverflow.com/questions/7153586/can-i-vectorize-a-calculation-which-depends-on-previous-elements +## and provides a nice example of how to accelerate path-dependent +## loops which are harder to vectorise. It lead to the following blog +## post: +## http://dirk.eddelbuettel.com/blog/2011/08/23#rcpp_for_path_dependent_loops +## +## Thanks to Josh Ulrich for provided a first nice (R-based) answer on +## StackOverflow and for also catching a small oversight in my posted answer. +## +## Dirk Eddelbuettel, 23 Aug 2011 +## +## Copyrighted but of course GPL'ed + + +library(inline) +library(rbenchmark) +library(compiler) + +fun1 <- function(z) { + for(i in 2:NROW(z)) { + z[i] <- ifelse(z[i-1]==1, 1, 0) + } + z +} +fun1c <- cmpfun(fun1) + + +fun2 <- function(z) { + for(i in 2:NROW(z)) { + z[i] <- if(z[i-1]==1) 1 else 0 + } + z +} +fun2c <- cmpfun(fun2) + + +funRcpp <- cxxfunction(signature(zs="numeric"), plugin="Rcpp", body=" + Rcpp::NumericVector z = Rcpp::NumericVector(zs); + int n = z.size(); + for (int i=1; i + +using namespace Rcpp; + +// [[Rcpp::export]] +double piSugar(const int N) { + NumericVector x = runif(N); + NumericVector y = runif(N); + NumericVector d = sqrt(x*x + y*y); + return 4.0 * sum(d < 1.0) / N; +} diff --git a/revdep/library/sprtt/new/Rcpp/examples/OpenMP/GNUmakefile b/revdep/library/sprtt/new/Rcpp/examples/OpenMP/GNUmakefile new file mode 100644 index 0000000..1e2ac14 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/OpenMP/GNUmakefile @@ -0,0 +1,30 @@ + +## comment this out if you need a different version of R, +## and set set R_HOME accordingly as an environment variable +R_HOME := $(shell R RHOME) + +## include headers and libraries for R +RCPPFLAGS := $(shell $(R_HOME)/bin/R CMD config --cppflags) +RLDFLAGS := $(shell $(R_HOME)/bin/R CMD config --ldflags) + +## include headers and libraries for Rcpp interface classes +RCPPINCL := $(shell echo 'Rcpp:::CxxFlags()' | $(R_HOME)/bin/R --vanilla --slave) +RCPPLIBS := $(shell echo 'Rcpp:::LdFlags()' | $(R_HOME)/bin/R --vanilla --slave) + +## OpenMP +OPENMPFLAGS := -fopenmp + +c_sources := $(wildcard *.c) +c_sharedlibs := $(patsubst %.c,%.o,$(c_sources)) + +cpp_sources := $(wildcard *.cpp) +cpp_sharedlibs := $(patsubst %.cpp,%.o,$(cpp_sources)) + +all : $(c_sharedlibs) $(cpp_sharedlibs) + +%.o : %.c + R CMD SHLIB $< + +%.o : %.cpp + PKG_CPPFLAGS="$(RCPPFLAGS) $(RCPPINCL) $(OPENMPFLAGS)" PKG_LIBS="$(RLDFLAGS) $(RCPPLIBS) $(OPENMPFLAGS)" R CMD SHLIB $< + diff --git a/revdep/library/sprtt/new/Rcpp/examples/OpenMP/OpenMPandInline.r b/revdep/library/sprtt/new/Rcpp/examples/OpenMP/OpenMPandInline.r new file mode 100644 index 0000000..31f6e83 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/OpenMP/OpenMPandInline.r @@ -0,0 +1,88 @@ +#!/usr/bin/env r + +library(inline) +library(rbenchmark) + +serialCode <- ' + // assign to C++ vector + std::vector x = Rcpp::as >(xs); + size_t n = x.size(); + for (size_t i=0; i x = Rcpp::as >(xs); + std::transform(x.begin(), x.end(), x.begin(), ::log); + return Rcpp::wrap(x); +' +funSerialStdAlg <- cxxfunction(signature(xs="numeric"), body=serialStdAlgCode, plugin="Rcpp") + +## same, but with Rcpp vector just to see if there is measurable difference +serialRcppCode <- ' + // assign to C++ vector + Rcpp::NumericVector x = Rcpp::NumericVector(xs); + size_t n = x.size(); + for (size_t i=0; i x = Rcpp::as >(xs); + size_t n = x.size(); +#pragma omp parallel for shared(x, n) + for (size_t i=0; i + +#ifdef _OPENMP +#include +#endif + +#include + +/** + * Base class for interrupt exceptions thrown when user + * interrupts are detected. + */ +class interrupt_exception : public std::exception { +public: + /** + * Constructor. + * @param[in] message A description of event that + * caused this exception. + */ + interrupt_exception(std::string message) + : detailed_message(message) + {}; + + /** + * Virtual destructor. Needed to avoid "looser throw specification" errors. + */ + virtual ~interrupt_exception() throw() {}; + + /** + * Obtain a description of the exception. + * @return Description. + */ + virtual const char* what() const throw() { + return detailed_message.c_str(); + } + + /** + * String with details on the error. + */ + std::string detailed_message; +}; + +/** + * Do the actual check for an interrupt. + * @attention This method should never be called directly. + * @param[in] dummy Dummy argument. + */ +static inline void check_interrupt_impl(void* /*dummy*/) { + R_CheckUserInterrupt(); +} + +/** + * Call this method to check for user interrupts. + * This is based on the results of a discussion on the + * R-devel mailing list, suggested by Simon Urbanek. + * @attention This method must not be called by any other + * thread than the master thread. If called from within + * an OpenMP parallel for loop, make sure to check + * for omp_get_thread_num()==0 before calling this method! + * @return True, if a user interrupt has been detected. + */ +inline bool check_interrupt() { + return (R_ToplevelExec(check_interrupt_impl, NULL) == FALSE); +} + +/** + * Compute pi using the Leibniz formula + * (a very inefficient approach). + * @param[in] n Number of summands + * @param[in] frequency Check for interrupts after + * every @p frequency loop cycles. + */ +RcppExport SEXP PiLeibniz(SEXP n, SEXP frequency) +{ + BEGIN_RCPP + + // cast parameters + int n_cycles = Rcpp::as(n); + int interrupt_check_frequency = Rcpp::as(frequency); + + // user interrupt flag + bool interrupt = false; + + double pi = 0; +#ifdef _OPENMP +#pragma omp parallel for \ + shared(interrupt_check_frequency, n_cycles, interrupt) \ + reduction(+:pi) +#endif + for (int i=0; i(n); + int thn = as(thin); + + int i,j; + NumericMatrix mat(N, 2); + + RNGScope scope; // Initialize Random number generator. Not needed when Attributes used. + + // The rest of the code follows the R version + double x=0, y=0; + + for (i=0; i + #include + + using namespace Rcpp; // just to be explicit +' + +gslgibbscode <- ' + int N = as(ns); + int thin = as(thns); + int i, j; + gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937); + double x=0, y=0; + NumericMatrix mat(N, 2); + for (i=0; i. + +## NB This file is mostly historic and predates the unit tests. +## Yet it still provides useful examples -- but the unitTests/ +## for vastly larger coverage + +suppressMessages(library(Rcpp)) +suppressMessages(library(inline)) + +cat("===Doubles\n") +foo <- ' + double d = Rcpp::as(x); + std::cout << "Returning twice the value of " << d << " : "; + return(Rcpp::wrap( 2*d ) ); + ' +funx <- cfunction(signature(x="numeric"), foo, Rcpp=TRUE, verbose=FALSE) +cat(funx(x=2.123), "\n") +cat(funx(x=2), "\n") +##funx(x='2') ## throws as expected +##funx(x=2:3) ## throws as expected + + +cat("\n===Int\n") +foo <- ' + int i = Rcpp::as(x); + std::cout << "Returning twice the value of " << i << " : "; + return(Rcpp::wrap( 2*i ) ); + ' +funx <- cfunction(signature(x="numeric"), foo, Rcpp=TRUE, verbose=FALSE) +cat(funx(x=2), "\n") +cat(funx(x=2.2), "\n") +funx <- cfunction(signature(x="raw"), foo, Rcpp=TRUE, verbose=FALSE) +cat(funx(x=as.raw(2)), "\n") + +cat("\n===String\n") +foo <- ' + std::string s = Rcpp::as(x); + std::cout << "Returning twice the value of " << s << " : "; + return(Rcpp::wrap( s+s ) ); + ' +funx <- cfunction(signature(x="character"), foo, Rcpp=TRUE, verbose=FALSE) +cat(funx(x="abc"), "\n") + +cat("\n===Raw (bytes)\n") +foo <- ' + Rbyte i = Rcpp::as(x) ; + std::cout << "Returning twice the value of " << (int)i << " : "; + return(Rcpp::wrap( (Rbyte)(2*i) ) ); + ' +funx <- cfunction(signature(x="numeric"), foo, Rcpp=TRUE, verbose=FALSE) +cat( funx(x=2), "\n") +funx <- cfunction(signature(x="integer"), foo, Rcpp=TRUE, verbose=FALSE) +cat( funx(x=2L), "\n") +funx <- cfunction(signature(x="raw"), foo, Rcpp=TRUE, verbose=FALSE) +cat( funx(x=as.raw(2)), "\n") + +cat("\n=== logical \n") +foo <- ' +bool b = Rcpp::as(x); +std::cout << "flip " << ( b ? "TRUE" : "FALSE" ) << " : "; +return(Rcpp::wrap( !b )); +' +funx <- cfunction(signature(x="logical"), foo, Rcpp=TRUE, verbose=FALSE) +cat( res <- funx(x=TRUE) , "\n") ; stopifnot( !res ) +cat( res <- funx(x=FALSE), "\n" ) ; stopifnot( res) +funx <- cfunction(signature(x="numeric"), foo, Rcpp=TRUE, verbose=FALSE) +cat( res <- funx(x=2) , "\n") ; stopifnot( !res ) +cat( res <- funx(x=0.0), "\n") ; stopifnot( res) +funx <- cfunction(signature(x="integer"), foo, Rcpp=TRUE, verbose=FALSE) +cat( res <- funx(x=2L), "\n") ; stopifnot( !res ) +cat( res <- funx(x=0L), "\n") ; stopifnot( res) +funx <- cfunction(signature(x="raw"), foo, Rcpp=TRUE, verbose=FALSE) +cat( res <- funx(x=as.raw(2)), "\n") ; stopifnot( !res ) +cat( res <- funx(x=as.raw(0)), "\n") ; stopifnot( res) + +### vectors + +cat("\n===Int Vector via wrap\n") +foo <- ' + std::vector iv = Rcpp::as< std::vector >(x) ; + std::cout << "Returning twice the value of vector : "; + for (size_t i=0; i iv = Rcpp::as< std::vector >(x) ; + std::cout << "Returning twice the value of vector : "; + for (size_t i=0; i iv = Rcpp::as< std::vector >(x) ; + std::cout << "Returning twice the value of vector : "; + for (size_t i=0; i iv = Rcpp::as< std::vector >(x) ; + std::cout << "Returning twice the value of vector : "; + for (size_t i=0; i\n") +foo <- ' +std::vector bv = Rcpp::as< std::vector >(x) ; +std::cout << "Flip the value of vector : "; +for (size_t i=0; i iv = Rcpp::as< std::vector >(x); + std::cout << "Returning twice the value of vector : "; + for (size_t i=0; i\n") +foo <- ' +std::set iv ; +iv.insert( 0 ) ; +iv.insert( 1 ) ; +iv.insert( 0 ) ; +return Rcpp::wrap( iv );' +funx <- cfunction(signature(), foo, Rcpp=TRUE, verbose=FALSE, includes = "#include " ) +print(res <- funx()) +stopifnot( identical( res, 0:1 ) ) + +cat("\n=== set\n") +foo <- ' +std::set ds; +ds.insert( 0.0 ); +ds.insert( 1.0 ); +ds.insert( 0.0 ); +return(Rcpp::wrap( ds )); ' +funx <- cfunction(signature(), foo, Rcpp=TRUE, verbose=FALSE, includes = "#include ") +print( res <- funx() ) +stopifnot( identical( res, as.numeric(0:1))) + +cat("\n=== set\n") +foo <- ' +std::set bs ; +bs.insert( (Rbyte)0 ) ; +bs.insert( (Rbyte)1 ) ; +bs.insert( (Rbyte)0 ) ; +return(Rcpp::wrap( bs )); ' +funx <- cfunction(signature(), foo, Rcpp=TRUE, verbose=FALSE, includes = "#include ") +print( res <- funx() ) +stopifnot( identical( res, as.raw(0:1))) + +cat("\n=== set \n") +foo <- ' +std::set ss ; +ss.insert( "foo" ) ; +ss.insert( "bar" ) ; +ss.insert( "foo" ) ; +return(Rcpp::wrap( ss )); ' +funx <- cfunction(signature(), foo, Rcpp=TRUE, verbose=FALSE, include = "#include " ) +print( res <- funx() ) +stopifnot( identical( res, c("bar","foo")) ) + + +#========= attributes + +funx <- cfunction( + signature(x="data.frame"), ' +std::vector iv = Rcpp::RObject(x).attributeNames(); +return(Rcpp::wrap( iv )); +', Rcpp=TRUE, verbose=FALSE) +res <- funx( iris ) +stopifnot( all( c("names", "row.names", "class" ) %in% res ) ) + +funx <- cfunction(signature(x="data.frame"), ' +bool has_class = Rcpp::RObject(x).hasAttribute( "class" ) ; +return Rcpp::wrap( has_class ) ; +', Rcpp=TRUE, verbose=FALSE) +res <- funx( iris ) +stopifnot( res ) + +funx <- cfunction(signature(x="data.frame"), ' +return Rcpp::RObject(x).attr( "row.names" ) ; +', Rcpp=TRUE, verbose=FALSE) +res <- funx( iris ) +stopifnot( identical(res, 1:150) ) + +#============ NULL +funx <- cfunction(signature(x="ANY"), ' +bool is_null = Rcpp::RObject(x).isNULL() ; +return Rcpp::wrap( is_null ) ; +', Rcpp=TRUE, verbose=FALSE) +res <- funx( iris ) +stopifnot( !res ) +res <- funx( NULL ) +stopifnot( res ) + + + diff --git a/revdep/library/sprtt/new/Rcpp/examples/RcppInline/RcppInlineExample.r b/revdep/library/sprtt/new/Rcpp/examples/RcppInline/RcppInlineExample.r new file mode 100644 index 0000000..52dd500 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/RcppInline/RcppInlineExample.r @@ -0,0 +1,47 @@ +#!/usr/bin/env r + +suppressMessages(library(Rcpp)) + +## NOTE: This is the old way to compile Rcpp code inline. +## The code here has left as a historical artifact and tribute to the old way. +## Please use the code under the "new" inline compilation section. + +suppressMessages(library(inline)) + +foo <- ' + IntegerVector vec(10000); // vec parameter viewed as vector of ints. + int i = 0; + for (int a = 0; a < 9; a++) + for (int b = 0; b < 9; b++) + for (int c = 0; c < 9; c++) + for (int d = 0; d < 9; d++) + vec(i++) = a*b - c*d; + + return vec; +' + +funx_old <- cxxfunction(signature(), foo, plugin = "Rcpp" ) + +## NOTE: Within this section, the new way to compile Rcpp code inline has been +## written. Please use the code next as a template for your own project. + +cppFunction('IntegerVector funx(){ + IntegerVector vec(10000); // vec parameter viewed as vector of ints. + int i = 0; + for (int a = 0; a < 9; a++) + for (int b = 0; b < 9; b++) + for (int c = 0; c < 9; c++) + for (int d = 0; d < 9; d++) + vec(i++) = a*b - c*d; + + return vec; +}') + +dd.inline.rcpp <- function() { + res <- funx() + tabulate(res) +} + +print(mean(replicate(100,system.time(dd.inline.rcpp())["elapsed"]),trim=0.05)) + + diff --git a/revdep/library/sprtt/new/Rcpp/examples/RcppInline/RcppInlineWithLibsExamples.r b/revdep/library/sprtt/new/Rcpp/examples/RcppInline/RcppInlineWithLibsExamples.r new file mode 100644 index 0000000..e4a6fae --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/RcppInline/RcppInlineWithLibsExamples.r @@ -0,0 +1,351 @@ +#!/usr/bin/env r +# +# Copyright (C) 2009 - 2016 Dirk Eddelbuettel and Romain Francois +# +# This file is part of Rcpp. +# +# Rcpp is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Rcpp is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Rcpp. If not, see . + +suppressMessages(library(Rcpp)) +suppressMessages(library(RcppGSL)) + +## NOTE: This is the old way to compile Rcpp code inline. +## The code here has left as a historical artifact and tribute to the old way. +## Please use the code under the "new" inline compilation section. + +suppressMessages(library(inline)) + +firstExample_old <- function() { + ## a really simple C program calling three functions from the GSL + gslrng <- ' + gsl_rng *r; + gsl_rng_env_setup(); + double v; + + r = gsl_rng_alloc (gsl_rng_default); + + printf(" generator type: %s\\n", gsl_rng_name (r)); + printf(" seed = %lu\\n", gsl_rng_default_seed); + v = gsl_rng_get (r); + printf(" first value = %.0f\\n", v); + + gsl_rng_free(r); + return R_NilValue; + ' + + ## turn into a function that R can call + ## compileargs redundant on Debian/Ubuntu as gsl headers are found anyway + funx_old <- cxxfunction(signature(), gslrng, + includes="#include ", + plugin="RcppGSL") + + cat("Calling first example\n") + funx_old() + invisible(NULL) +} + +secondExample_old <- function() { + + ## now use Rcpp to pass down a parameter for the seed + gslrng <- ' + int seed = Rcpp::as(par) ; + + gsl_rng *r; + gsl_rng_env_setup(); + double v; + + r = gsl_rng_alloc (gsl_rng_default); + + gsl_rng_set (r, (unsigned long) seed); + v = gsl_rng_get (r); + + #ifndef BeSilent + printf(" generator type: %s\\n", gsl_rng_name (r)); + printf(" seed = %d\\n", seed); + printf(" first value = %.0f\\n", v); + #endif + + gsl_rng_free(r); + return Rcpp::wrap(v) ; + ' + + ## turn into a function that R can call + ## compileargs redundant on Debian/Ubuntu as gsl headers are found anyway + ## use additional define for compile to suppress output + funx_old <- cxxfunction(signature(par="numeric"), gslrng, + includes="#include ", + plugin="RcppGSL") + cat("\n\nCalling second example without -DBeSilent set\n") + print(funx_old(0)) + + + ## now override settings to add -D flag + settings <- getPlugin("RcppGSL") + settings$env$PKG_CPPFLAGS <- paste(settings$PKG_CPPFLAGS, "-DBeSilent") + + funx_old <- cxxfunction(signature(par="numeric"), gslrng, + includes="#include ", + settings=settings) + cat("\n\nCalling second example with -DBeSilent set\n") + print(funx_old(0)) + + invisible(NULL) +} + +thirdExample_old <- function() { + + ## now use Rcpp to pass down a parameter for the seed, and a vector size + gslrng <- ' + int seed = Rcpp::as(s) ; + int len = Rcpp::as(n); + + gsl_rng *r; + gsl_rng_env_setup(); + std::vector v(len); + + r = gsl_rng_alloc (gsl_rng_default); + + gsl_rng_set (r, (unsigned long) seed); + for (int i=0; i(s); + int len = Rcpp::as(n); + + gsl_rng *r; + gsl_rng_env_setup(); + std::vector v(len); + + r = gsl_rng_alloc (gsl_rng_default); + + gsl_rng_set (r, (unsigned long) seed); + for (int i=0; i", + "using namespace Rcpp;", + "using namespace std;"), + plugin="RcppGSL") + cat("\n\nCalling fourth example with seed, length and namespaces\n") + print(funx_old(0, 5)) + + invisible(NULL) +} + +## NOTE: Within this section, the new way to compile Rcpp code inline has been +## written. Please use the code next as a template for your own project. + +firstExample <- function() { + ## a really simple C program calling three functions from the GSL + + sourceCpp(code=' +#include +#include + +// [[Rcpp::depends(RcppGSL)]] + +// [[Rcpp::export]] +SEXP funx(){ + gsl_rng *r; + gsl_rng_env_setup(); + double v; + + r = gsl_rng_alloc (gsl_rng_default); + + printf(" generator type: %s\\n", gsl_rng_name (r)); + printf(" seed = %lu\\n", gsl_rng_default_seed); + v = gsl_rng_get (r); + printf(" first value = %.0f\\n", v); + + gsl_rng_free(r); + return R_NilValue; +}') + + cat("Calling first example\n") + funx() + invisible(NULL) +} + +secondExample <- function() { + + ## now use Rcpp to pass down a parameter for the seed + + ## turn into a function that R can call + ## compileargs redundant on Debian/Ubuntu as gsl headers are found anyway + ## use additional define for compile to suppress output + + gslrng <- ' + #include + #include + + // [[Rcpp::depends(RcppGSL)]] + + // [[Rcpp::export]] + double funx(int seed){ + + gsl_rng *r; + gsl_rng_env_setup(); + double v; + + r = gsl_rng_alloc (gsl_rng_default); + + gsl_rng_set (r, (unsigned long) seed); + v = gsl_rng_get (r); + + #ifndef BeSilent + printf(" generator type: %s\\n", gsl_rng_name (r)); + printf(" seed = %d\\n", seed); + printf(" first value = %.0f\\n", v); + #endif + + gsl_rng_free(r); + return v; + }' + + sourceCpp(code=gslrng, rebuild = TRUE) + + cat("\n\nCalling second example without -DBeSilent set\n") + print(funx(0)) + + + ## now override settings to add -D flag + o = Sys.getenv("PKG_CPPFLAGS") + Sys.setenv("PKG_CPPFLAGS" = paste(o, "-DBeSilent")) + + sourceCpp(code=gslrng, rebuild = TRUE) + + # Restore environment flags + Sys.setenv("PKG_CPPFLAGS" = o ) + + cat("\n\nCalling second example with -DBeSilent set\n") + print(funx(0)) + + invisible(NULL) +} + +thirdExample <- function() { + + ## now use Rcpp to pass down a parameter for the seed, and a vector size + + ## turn into a function that R can call + ## compileargs redundant on Debian/Ubuntu as gsl headers are found anyway + ## use additional define for compile to suppress output + + sourceCpp(code=' + #include + #include + + // [[Rcpp::depends(RcppGSL)]] + + // [[Rcpp::export]] + std::vector funx(int seed, int len){ + + gsl_rng *r; + gsl_rng_env_setup(); + std::vector v(len); + + r = gsl_rng_alloc (gsl_rng_default); + + gsl_rng_set (r, (unsigned long) seed); + for (int i=0; i. + +require(Rcpp) + + +## NOTE: This is the old way to compile Rcpp code inline. +## The code here has left as a historical artifact and tribute to the old way. +## Please use the code under the "new" inline compilation section. + +require(inline) +funx_old <- cxxfunction( + signature(), + 'throw std::range_error("boom"); return R_NilValue ; ', + plugin = "Rcpp" ) + +## NOTE: Within this section, the new way to compile Rcpp code inline has been +## written. Please use the code next as a template for your own project. + +cppFunction(' +SEXP funx(){ + throw std::range_error("boom"); return R_NilValue ; +}') + +tryCatch( funx(), "C++Error" = function(e){ + cat( sprintf( "C++ exception of class '%s' : %s\n", class(e)[1L], e$message ) ) +} ) +# or using a direct handler +tryCatch( funx(), "std::range_error" = function(e){ + cat( sprintf( "C++ exception of class '%s' : %s\n", class(e)[1L], e$message ) ) +} ) +# just to check things carry on +print( rnorm(10) ) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/RcppInline/external_pointer.r b/revdep/library/sprtt/new/Rcpp/examples/RcppInline/external_pointer.r new file mode 100644 index 0000000..2874ba7 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/RcppInline/external_pointer.r @@ -0,0 +1,113 @@ +#!/usr/bin/env r +# +# Copyright (C) 2009 - 2010 Romain Francois +# +# This file is part of Rcpp. +# +# Rcpp is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Rcpp is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Rcpp. If not, see . + +require(Rcpp) +require(inline) + + +## NOTE: This is the old way to compile Rcpp code inline. +## The code here has left as a historical artifact and tribute to the old way. +## Please use the code under the "new" inline compilation section. + +funx_old <- cxxfunction(signature(), ' + /* creating a pointer to a vector */ + std::vector* v = new std::vector ; + v->push_back( 1 ) ; + v->push_back( 2 ) ; + + /* wrap the pointer as an external pointer */ + /* this automatically protected the external pointer from R garbage + collection until p goes out of scope. */ + Rcpp::XPtr< std::vector > p(v) ; + + /* return it back to R, since p goes out of scope after the return + the external pointer is no more protected by p, but it gets + protected by being on the R side */ + return( p ) ; +', plugin = "Rcpp" ) +xp <- funx_old() +stopifnot( identical( typeof( xp ), "externalptr" ) ) + +# passing the pointer back to C++ +funx_old <- cxxfunction(signature(x = "externalptr" ), ' + /* wrapping x as smart external pointer */ + /* The SEXP based constructor does not protect the SEXP from + garbage collection automatically, it is already protected + because it comes from the R side, however if you want to keep + the Rcpp::XPtr object on the C(++) side + and return something else to R, you need to protect the external + pointer, by using the protect member function */ + Rcpp::XPtr< std::vector > p(x) ; + + /* just return the front of the vector as a SEXP */ + return( Rcpp::wrap( p->front() ) ) ; +', plugin = "Rcpp" ) +front <- funx_old(xp) +stopifnot( identical( front, 1L ) ) + + +## NOTE: Within this section, the new way to compile Rcpp code inline has been +## written. Please use the code next as a template for your own project. + +## Use of the cppFunction() gives the ability to immediately compile embedded +## C++ directly within R without having to worry about header specification or +## Rcpp attributes. + +cppFunction(' +Rcpp::XPtr< std::vector > funx(){ + /* creating a pointer to a vector */ + std::vector* v = new std::vector ; + v->push_back( 1 ) ; + v->push_back( 2 ) ; + + /* wrap the pointer as an external pointer */ + /* this automatically protected the external pointer from R garbage + * collection until p goes out of scope. + */ + Rcpp::XPtr< std::vector > p(v) ; + + /* return it back to R, since p goes out of scope after the return + * the external pointer is no more protected by p, but it gets + * protected by being on the R side + */ + return( p ) ; +}') + +xp <- funx() +stopifnot( identical( typeof( xp ), "externalptr" ) ) + +# passing the pointer back to C++ +cppFunction(' +SEXP funx_pt(Rcpp::XPtr< std::vector > p){ + /* Wrapping x as smart external pointer */ + + /* The SEXP based constructor does not protect the SEXP from + * garbage collection automatically, it is already protected + * because it comes from the R side, however if you want to keep + * the Rcpp::XPtr object on the C(++) side + * and return something else to R, you need to protect the external + * pointer, by using the protect member function + */ + + /* Just return the front of the vector as a SEXP */ + return Rcpp::wrap(p->front()); +}') +front <- funx_pt(xp) +stopifnot( identical( front, 1L ) ) + diff --git a/revdep/library/sprtt/new/Rcpp/examples/SugarPerformance/Timer.h b/revdep/library/sprtt/new/Rcpp/examples/SugarPerformance/Timer.h new file mode 100644 index 0000000..656fc8d --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/SugarPerformance/Timer.h @@ -0,0 +1,55 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- +// +// Timer.h: Rcpp R/C++ interface class library -- simple timer class +// +// Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois +// +// This file is part of Rcpp. +// +// Rcpp is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// Rcpp is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Rcpp. If not, see . + + +// Simple timer class based on on ideas in atimer.h / atimer.cxx found a few years ago at +// http://www.cs.uiowa.edu/~sriram/30/fall03/ +// and attributed to Amir Elaguizy while under GPL +// but converted to using gettimeofday/GetSystemTime instead + +#ifndef TIMER_H +#define TIMER_H + +class Timer { +public: + Timer() : sys_time("Sys.time") { Reset(); } + void Start() { start_t = getFractionalSeconds() ; } + void Stop() { + end_t = getFractionalSeconds(); + elapsed = end_t - start_t; // Calculate elapsed time in seconds + cumul += elapsed; + } + void Reset() { end_t = start_t = elapsed = cumul = 0.0; } + double ElapsedTime() { return elapsed; } + double CumulativeTime() { return cumul; } + + +private: + Function sys_time ; + double start_t, end_t, elapsed, cumul; + + double getFractionalSeconds(void) { + return as( sys_time() ) ; + } +}; + +#endif + diff --git a/revdep/library/sprtt/new/Rcpp/examples/SugarPerformance/Timertest.cpp b/revdep/library/sprtt/new/Rcpp/examples/SugarPerformance/Timertest.cpp new file mode 100644 index 0000000..6cf06b2 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/SugarPerformance/Timertest.cpp @@ -0,0 +1,31 @@ +// -*- mode: c++; compile-command: "g++ -Wall -O3 -o Timertest Timertest.cpp"; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- + +// from http://www.cs.uiowa.edu/~sriram/30/fall03/ + +#include +#include +#include "Timer.h" + +int main() { + Timer test; + + std::cout << "Sleeping 2 seconds" << std::endl; + test.Start(); + sleep(2); + test.Stop(); + std::cout << "Sleep lasted for " << test.ElapsedTime() << " seconds." << std::endl; + std::cout << "Sleeping 1 second" << std::endl; + test.Start(); + sleep(1); + test.Stop(); + std::cout << "Sleep lasted for " << test.ElapsedTime() << " seconds." << std::endl; + std::cout << "Cumulative time is " << test.CumulativeTime() << " seconds." << std::endl; + std::cout << "Reseting" << std::endl; + test.Reset(); + std::cout << "Sleeping 2 seconds" << std::endl; + test.Start(); + sleep(2); + test.Stop(); + std::cout << "Sleep lasted for " << test.ElapsedTime() << " seconds." << std::endl; + std::cout << "Cumulative time is " << test.CumulativeTime() << " seconds." << std::endl; +} diff --git a/revdep/library/sprtt/new/Rcpp/examples/SugarPerformance/sugarBenchmarks.R b/revdep/library/sprtt/new/Rcpp/examples/SugarPerformance/sugarBenchmarks.R new file mode 100644 index 0000000..27de7d1 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/examples/SugarPerformance/sugarBenchmarks.R @@ -0,0 +1,226 @@ +#!/usr/bin/env r + +suppressMessages(library(inline)) +suppressMessages(library(Rcpp)) + +benchmark <- function(start = settings$start, + hand.written = settings$hand.written, + sugar = settings$sugar, + expr = settings$expr, + runs = settings$runs, + data = settings$data, + end = settings$end, + inc = settings$inc, + + settings = list( + start = "", hand.written = "", + sugar = "", expr = NULL, + runs = 500, + data = NULL , + end = "", + inc = "" + ) + ) { + +expr <- force(expr) +inc <- force( inc ) + +src <- sprintf( ' + unsigned int runs = as(runss); + Environment e(env) ; + + %s + + Timer timer; + + // approach one + timer.Start(); + for (unsigned int i=0; i(N); + NumericVector numvec(xvec) ; + Function f(fun) ; + for( int i=0; i fx(x), fy(y), fz(z) ; + int n = x.size() ; + for( int i=0; i nx(x), ny(y) ; + NumericVector z = nx * ny ; + return z ; + } +' + + +fx <- cxxfunction( + list( + direct = signature( x_ = "numeric", y_ = "numeric" ), + extractor = signature( x_ = "numeric", y_ = "numeric" ), + sugar_nona = signature( x_ = "numeric", y_ = "numeric" ), + + assign_direct = signature( x_ = "numeric", y_ = "numeric" ), + assign_extractor = signature( x_ = "numeric", y_ = "numeric" ), + assign_sugar_nona = signature( x_ = "numeric", y_ = "numeric" ) + + ) , + list( + direct = ' + SEXP res = R_NilValue ; + for( int j=0; j<1000; j++) + res = direct__( x_, y_ ) ; + return res ; + ', + extractor = ' + SEXP res = R_NilValue ; + for( int j=0; j<1000; j++) + res = extractors__( x_, y_ ) ; + return res ; + ', + sugar_nona = ' + SEXP res = R_NilValue ; + for( int j=0; j<1000; j++) + res = sugar_nona__( x_, y_ ) ; + return res ; + ', + + assign_direct = ' + NumericVector x( x_ ), y( y_ ), z( x.size() ) ; + int n = x.size() ; + for( int j=0; j<1000; j++) + for( int i=0; i( n_ ) ; + NumericVector x(x_), y(y_), z(x.size()) ; + for( int i=0; i + +R: Seamless R and C++ Integration + + + +
+

Seamless R and C++ Integration + +

+
+
+[Up] +[Top] +

Documentation for package ‘Rcpp’ version 1.0.10

+ + + +

Help Pages

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rcpp-packageR / C++ interface
$-methodReflection information for an internal c++ class
$-methodc++ internal objects
$-methodRcpp modules
$<--methodc++ internal objects
.DollarNames-methodcompletion
.DollarNames-methodscompletion
areMacrosDefinedEvaluate a C++ Expression
C++Class-classReflection information for an internal c++ class
C++Constructor-classClass "C++Constructor"
C++Field-classClass "C++Field"
C++Function-classClass "C++Function"
C++Object-classc++ internal objects
C++OverloadedMethods-classClass "C++OverloadedMethods"
compileAttributesCompile Rcpp Attributes for a Package
compilerCheckCheck for Minimal (g++) Compiler Version
cppFunctionDefine an R Function with a C++ Implementation
demanglec++ type information
dependsAttributeRcpp::depends Attribute
evalCppEvaluate a C++ Expression
exportAttributeRcpp::export Attribute
exposeClassCreate an Rcpp Module to Expose a C++ Class in R
formals<--methodSet the formal arguments of a C++ function
formals<--methodsSet the formal arguments of a C++ function
getRcppVersionExport the Rcpp (API) Package Version
initialize-methodRcpp modules
interfacesAttributeRcpp::interfaces Attribute
LdFlagsDeprecated Rcpp Linker Flags
loadModuleLoad an Rcpp Module into a Package
loadRcppClassCreate a Class Extending a C++ Class
loadRcppModulesLoads Rcpp modules on package startup
ModuleRetrieves an Rcpp module
Module-classRcpp modules
pluginsAttributeRcpp::plugins Attribute
populatePopulates a namespace or an environment with the content of a module
print.bytesc++ type information
prompt-methodRcpp modules
RcppR / C++ interface
Rcpp-deprecatedDeprecated Functions in the Rcpp Package
Rcpp.package.skeletonCreate a skeleton for a new package depending on Rcpp
Rcpp.plugin.makerFacilitating making package plugins
RcppClass-classCreate a Class Extending a C++ Class
RcppLdFlagsDeprecated Rcpp Linker Flags
RcppUnitTestsRcpp : unit tests results
registerPluginRegister an inline plugin
setRcppClassCreate a Class Extending a C++ Class
show-methodReflection information for an internal c++ class
show-methodClass "C++Function"
show-methodc++ internal objects
show-methodRcpp modules
sizeofc++ type information
sourceCppSource C++ Code from a File or String
+
diff --git a/revdep/library/sprtt/new/Rcpp/html/R.css b/revdep/library/sprtt/new/Rcpp/html/R.css new file mode 100644 index 0000000..c228909 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/html/R.css @@ -0,0 +1,130 @@ +@media screen { + .container { + padding-right: 10px; + padding-left: 10px; + margin-right: auto; + margin-left: auto; + max-width: 900px; + } +} + +.rimage img { /* from knitr - for examples and demos */ + width: 96%; + margin-left: 2%; +} + +.katex { font-size: 1.1em; } + +code { + color: inherit; + background: inherit; +} + +body { + line-height: 1.4; + background: white; + color: black; +} + +a:link { + background: white; + color: blue; +} + +a:visited { + background: white; + color: rgb(50%, 0%, 50%); +} + +h1 { + background: white; + color: rgb(55%, 55%, 55%); + font-family: monospace; + font-size: 1.4em; /* x-large; */ + text-align: center; +} + +h2 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; + font-size: 1.2em; /* large; */ + text-align: center; +} + +h3 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; + font-size: 1.2em; /* large; */ +} + +h4 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; + font-style: italic; + font-size: 1.2em; /* large; */ +} + +h5 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; +} + +h6 { + background: white; + color: rgb(40%, 40%, 40%); + font-family: monospace; + font-style: italic; +} + +img.toplogo { + width: 4em; + vertical-align: middle; +} + +img.arrow { + width: 30px; + height: 30px; + border: 0; +} + +span.acronym { + font-size: small; +} + +span.env { + font-family: monospace; +} + +span.file { + font-family: monospace; +} + +span.option{ + font-family: monospace; +} + +span.pkg { + font-weight: bold; +} + +span.samp{ + font-family: monospace; +} + +div.vignettes a:hover { + background: rgb(85%, 85%, 85%); +} + +tr { + vertical-align: top; +} + +span.rlang { + font-family: Courier New, Courier; + color: #666666; +} + diff --git a/revdep/library/sprtt/new/Rcpp/include/Rcpp.h b/revdep/library/sprtt/new/Rcpp/include/Rcpp.h new file mode 100644 index 0000000..e518a70 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/include/Rcpp.h @@ -0,0 +1,93 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- +// +// Rcpp.h: R/C++ interface class library +// +// Copyright (C) 2008 - 2009 Dirk Eddelbuettel +// Copyright (C) 2009 - 2015 Dirk Eddelbuettel and Romain Francois +// +// This file is part of Rcpp. +// +// Rcpp is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// Rcpp is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Rcpp. If not, see . + +#ifndef Rcpp_hpp +#define Rcpp_hpp + +/* it is important that this comes first */ +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#if !defined(RCPP_FORCE_OLD_DATE_DATETIME_VECTORS) + #define RCPP_NEW_DATE_DATETIME_VECTORS 1 +#endif +#include + +#include + +#ifndef RCPP_NO_MODULES +#include +#include +#endif + +#include + +#include + +#ifndef RCPP_NO_SUGAR +#include +#include +#endif + +// wrappers for R API 'scalar' functions +#include + +// this stays at the very end, because it needs to +// 'see' all versions of wrap +#include + +#include +#include + +#include +#endif diff --git a/revdep/library/sprtt/new/Rcpp/include/Rcpp/Benchmark/Timer.h b/revdep/library/sprtt/new/Rcpp/include/Rcpp/Benchmark/Timer.h new file mode 100644 index 0000000..d8e3ea7 --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/include/Rcpp/Benchmark/Timer.h @@ -0,0 +1,150 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- +// +// Timer.h: Rcpp R/C++ interface class library -- Rcpp benchmark utility +// +// Copyright (C) 2012 - 2014 JJ Allaire, Dirk Eddelbuettel and Romain Francois +// +// This file is part of Rcpp. +// +// Rcpp is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// Rcpp is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Rcpp. If not, see . + +#ifndef RCPP_BENCHMARH_TIMER_H +#define RCPP_BENCHMARH_TIMER_H + +#include +#include +#include + +#define R_NO_REMAP +#include + +#if defined(_WIN32) + #define WIN32_LEAN_AND_MEAN + #include +#elif defined(__APPLE__) + #include +#elif defined(linux) || defined(__linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__) + #include +#elif defined(sun) || defined(__sun) || defined(_AIX) + #include +#else /* Unsupported OS */ + #error "Rcpp::Timer not supported by your OS." +#endif + +namespace Rcpp{ + + typedef uint64_t nanotime_t; + +#if defined(_WIN32) + + inline nanotime_t get_nanotime(void) { + LARGE_INTEGER time_var, frequency; + QueryPerformanceCounter(&time_var); + QueryPerformanceFrequency(&frequency); + + /* Convert to nanoseconds */ + return 1.0e9 * time_var.QuadPart / frequency.QuadPart; + } + +#elif defined(__APPLE__) + + inline nanotime_t get_nanotime(void) { + nanotime_t time; + mach_timebase_info_data_t info; + + time = mach_absolute_time(); + mach_timebase_info(&info); + + /* Convert to nanoseconds */ + return time * (info.numer / info.denom); + } + +#elif defined(linux) || defined(__linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__) + + static const nanotime_t nanoseconds_in_second = static_cast(1000000000.0); + + inline nanotime_t get_nanotime(void) { + struct timespec time_var; + + /* Possible other values we could have used are CLOCK_MONOTONIC, + * which is takes longer to retrieve and CLOCK_PROCESS_CPUTIME_ID + * which, if I understand it correctly, would require the R + * process to be bound to one core. + */ + clock_gettime(CLOCK_REALTIME, &time_var); + + nanotime_t sec = time_var.tv_sec; + nanotime_t nsec = time_var.tv_nsec; + + /* Combine both values to one nanoseconds value */ + return (nanoseconds_in_second * sec) + nsec; + } + +#elif defined(sun) || defined(__sun) || defined(_AIX) + + /* short an sweet! */ + inline nanotime_t get_nanotime(void) { + return gethrtime(); + } + +#endif + + class Timer { + public: + Timer() : data(), start_time( get_nanotime() ){} + Timer(nanotime_t start_time_) : data(), start_time(start_time_){} + + void step( const std::string& name){ + data.push_back(std::make_pair(name, now())); + } + + operator SEXP() const { + size_t n = data.size(); + NumericVector out(n); + CharacterVector names(n); + for (size_t i=0; i get_timers(int n){ + return std::vector( n, Timer() ) ; + } + + inline nanotime_t now() const { + return get_nanotime() ; + } + + inline nanotime_t origin() const { + return start_time ; + } + + private: + typedef std::pair Step; + typedef std::vector Steps; + + Steps data; + const nanotime_t start_time; + }; + +} + +#ifdef FALSE + #undef FALSE +#endif + +#endif diff --git a/revdep/library/sprtt/new/Rcpp/include/Rcpp/DataFrame.h b/revdep/library/sprtt/new/Rcpp/include/Rcpp/DataFrame.h new file mode 100644 index 0000000..b76facf --- /dev/null +++ b/revdep/library/sprtt/new/Rcpp/include/Rcpp/DataFrame.h @@ -0,0 +1,195 @@ +// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- +// +// DataFrame.h: Rcpp R/C++ interface class library -- data frames +// +// Copyright (C) 2010 - 2021 Dirk Eddelbuettel and Romain Francois +// +// This file is part of Rcpp. +// +// Rcpp is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// Rcpp is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Rcpp. If not, see . + +#ifndef Rcpp__DataFrame_h +#define Rcpp__DataFrame_h + +namespace Rcpp{ + + namespace internal{ + inline SEXP empty_data_frame(){ + Shield df( Rf_allocVector(VECSXP, 0) ); + Rf_setAttrib(df, R_NamesSymbol, Rf_allocVector(STRSXP, 0)); + Rf_setAttrib(df, R_RowNamesSymbol, Rf_allocVector(INTSXP, 0)); + Rf_setAttrib(df, R_ClassSymbol, Rf_mkString("data.frame")); + return df; + } + } + + template