From 4874d604399e6abcbea8742b9e16f094dd39540b Mon Sep 17 00:00:00 2001 From: Mauricio 'Pacha' Vargas Sepulveda Date: Sat, 2 Nov 2024 05:42:37 -0400 Subject: [PATCH 1/4] USE CPP11 !!!!!! --- .Rbuildignore | 2 ++ .gitignore | 1 + DESCRIPTION | 9 ++++-- NAMESPACE | 1 + R/cpp11.R | 5 ++++ R/pkgload-package.R | 1 + R/side-effects.R | 3 ++ man/pkgload-package.Rd | 1 + src/.gitignore | 3 ++ src/code.cpp | 6 ++++ src/cpp11.cpp | 28 +++++++++++++++++++ tests/testthat/test-dll.R | 14 +++++----- tests/testthat/test-side-effect-decor.R | 3 ++ tests/testthat/testDllRcpp/DESCRIPTION | 9 ------ tests/testthat/testDllRcpp/NAMESPACE | 3 -- tests/testthat/testDllRcpp/R/.gitignore | 1 - tests/testthat/testDllRcpp/src/.gitignore | 3 -- .../testDllRcpp/src/rcpp_hello_world.cpp | 15 ---------- tests/testthat/testDllcpp11/.Rbuildignore | 1 + tests/testthat/testDllcpp11/DESCRIPTION | 16 +++++++++++ tests/testthat/testDllcpp11/LICENSE | 2 ++ tests/testthat/testDllcpp11/LICENSE.md | 21 ++++++++++++++ tests/testthat/testDllcpp11/NAMESPACE | 3 ++ tests/testthat/testDllcpp11/R/.gitignore | 1 + .../testDllcpp11/R/testDllcpp11-package.R | 14 ++++++++++ .../testDllcpp11/man/testDllcpp11-package.Rd | 19 +++++++++++++ tests/testthat/testDllcpp11/src/.gitignore | 4 +++ .../testDllcpp11/src/cpp11_hello_world.cpp | 14 ++++++++++ 28 files changed, 163 insertions(+), 40 deletions(-) create mode 100644 R/cpp11.R create mode 100644 R/side-effects.R create mode 100644 src/.gitignore create mode 100644 src/code.cpp create mode 100644 src/cpp11.cpp create mode 100644 tests/testthat/test-side-effect-decor.R delete mode 100644 tests/testthat/testDllRcpp/DESCRIPTION delete mode 100644 tests/testthat/testDllRcpp/NAMESPACE delete mode 100644 tests/testthat/testDllRcpp/R/.gitignore delete mode 100644 tests/testthat/testDllRcpp/src/.gitignore delete mode 100644 tests/testthat/testDllRcpp/src/rcpp_hello_world.cpp create mode 100644 tests/testthat/testDllcpp11/.Rbuildignore create mode 100644 tests/testthat/testDllcpp11/DESCRIPTION create mode 100644 tests/testthat/testDllcpp11/LICENSE create mode 100644 tests/testthat/testDllcpp11/LICENSE.md create mode 100644 tests/testthat/testDllcpp11/NAMESPACE create mode 100644 tests/testthat/testDllcpp11/R/.gitignore create mode 100644 tests/testthat/testDllcpp11/R/testDllcpp11-package.R create mode 100644 tests/testthat/testDllcpp11/man/testDllcpp11-package.Rd create mode 100644 tests/testthat/testDllcpp11/src/.gitignore create mode 100644 tests/testthat/testDllcpp11/src/cpp11_hello_world.cpp diff --git a/.Rbuildignore b/.Rbuildignore index 485da9a2..2919b678 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -13,3 +13,5 @@ ^docs$ ^pkgdown$ ^CRAN-SUBMISSION$ +^\.vscode$ +^tests/testthat/testDllcpp11/\.Rbuildignore$ diff --git a/.gitignore b/.gitignore index a54c159a..64c0f93c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ NEWS.html script.R revdep/cloud.noindex docs +.vscode diff --git a/DESCRIPTION b/DESCRIPTION index 41f2d7ec..c71e25ad 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,13 @@ Package: pkgload Title: Simulate Package Installation and Attach -Version: 1.4.0.9000 +Version: 1.4.0.9001 Authors@R: c( person("Hadley", "Wickham", role = "aut"), person("Winston", "Chang", role = "aut"), person("Jim", "Hester", role = "aut"), person("Lionel", "Henry", , "lionel@posit.co", role = c("aut", "cre")), + person("Mauricio", "Vargas Sepulveda", role = "ctb", + comment = c(ORCID = "0000-0003-1017-7574")), person("Posit Software, PBC", role = c("cph", "fnd")), person("R Core team", role = "ctb", comment = "Some namespace and vignette code extracted from base R") @@ -20,6 +22,7 @@ Depends: R (>= 3.4.0) Imports: cli (>= 3.3.0), + decor, desc, fs, glue, @@ -35,7 +38,7 @@ Suggests: jsonlite, mathjaxr, pak, - Rcpp, + cpp11, remotes, rstudioapi, testthat (>= 3.2.1.1), @@ -48,3 +51,5 @@ Config/testthat/start-first: dll Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 +LinkingTo: + cpp11 diff --git a/NAMESPACE b/NAMESPACE index cc2a17b5..9f34189f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -34,3 +34,4 @@ export(run_example) export(unload) export(unregister) import(rlang) +useDynLib(pkgload, .registration = TRUE) diff --git a/R/cpp11.R b/R/cpp11.R new file mode 100644 index 00000000..2f8b9f12 --- /dev/null +++ b/R/cpp11.R @@ -0,0 +1,5 @@ +# Generated by cpp11: do not edit by hand + +fun <- function() { + invisible(.Call(`_pkgload_fun`)) +} diff --git a/R/pkgload-package.R b/R/pkgload-package.R index a65cf643..0238c5d9 100644 --- a/R/pkgload-package.R +++ b/R/pkgload-package.R @@ -2,5 +2,6 @@ "_PACKAGE" ## usethis namespace: start +#' @useDynLib pkgload, .registration = TRUE ## usethis namespace: end NULL diff --git a/R/side-effects.R b/R/side-effects.R new file mode 100644 index 00000000..1942d3f8 --- /dev/null +++ b/R/side-effects.R @@ -0,0 +1,3 @@ +side_effect_decor <- function() { + decor::parse_cpp_function("void fun() {}") +} \ No newline at end of file diff --git a/man/pkgload-package.Rd b/man/pkgload-package.Rd index 6f9a366d..261a43f5 100644 --- a/man/pkgload-package.Rd +++ b/man/pkgload-package.Rd @@ -29,6 +29,7 @@ Authors: Other contributors: \itemize{ + \item Mauricio Vargas Sepulveda (\href{https://orcid.org/0000-0003-1017-7574}{ORCID}) [contributor] \item Posit Software, PBC [copyright holder, funder] \item R Core team (Some namespace and vignette code extracted from base R) [contributor] } diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 00000000..22034c46 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,3 @@ +*.o +*.so +*.dll diff --git a/src/code.cpp b/src/code.cpp new file mode 100644 index 00000000..24637257 --- /dev/null +++ b/src/code.cpp @@ -0,0 +1,6 @@ +#include +using namespace cpp11; + +// just for the side effect of registering the function +[[cpp11::register]] +void fun() {} diff --git a/src/cpp11.cpp b/src/cpp11.cpp new file mode 100644 index 00000000..2da69d07 --- /dev/null +++ b/src/cpp11.cpp @@ -0,0 +1,28 @@ +// Generated by cpp11: do not edit by hand +// clang-format off + + +#include "cpp11/declarations.hpp" +#include + +// code.cpp +void fun(); +extern "C" SEXP _pkgload_fun() { + BEGIN_CPP11 + fun(); + return R_NilValue; + END_CPP11 +} + +extern "C" { +static const R_CallMethodDef CallEntries[] = { + {"_pkgload_fun", (DL_FUNC) &_pkgload_fun, 0}, + {NULL, NULL, 0} +}; +} + +extern "C" attribute_visible void R_init_pkgload(DllInfo* dll){ + R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); + R_useDynamicSymbols(dll, FALSE); + R_forceSymbols(dll, TRUE); +} diff --git a/tests/testthat/test-dll.R b/tests/testthat/test-dll.R index d2d1d1bf..f223cb91 100644 --- a/tests/testthat/test-dll.R +++ b/tests/testthat/test-dll.R @@ -101,21 +101,21 @@ test_that("Specific functions from DLLs listed in NAMESPACE can be called", { }) -test_that("load_all() can compile and load DLLs linked to Rcpp", { +test_that("load_all() can compile and load DLLs linked to cpp11", { - pkgbuild::clean_dll("testDllRcpp") + pkgbuild::clean_dll("testDllcpp11") - load_all("testDllRcpp", reset = TRUE, quiet = TRUE) + load_all("testDllcpp11", reset = TRUE, quiet = TRUE) # Check that it's loaded properly by calling the hello world function # which returns a list - expect_type(rcpp_hello_world(), "list") + expect_type(cpp11_hello_world(), "list") # Check whether attribute compilation occurred and that exported # names are available from load_all - expect_true(rcpp_test_attributes()) + expect_true(cpp11_test_attributes()) # Unload and clean out compiled objects - unload("testDllRcpp") - pkgbuild::clean_dll("testDllRcpp") + unload("testDllcpp11") + pkgbuild::clean_dll("testDllcpp11") }) diff --git a/tests/testthat/test-side-effect-decor.R b/tests/testthat/test-side-effect-decor.R new file mode 100644 index 00000000..fe90b494 --- /dev/null +++ b/tests/testthat/test-side-effect-decor.R @@ -0,0 +1,3 @@ +test_that("side effect decor", { + expect_type(side_effect_decor(), "list") +}) diff --git a/tests/testthat/testDllRcpp/DESCRIPTION b/tests/testthat/testDllRcpp/DESCRIPTION deleted file mode 100644 index b218be52..00000000 --- a/tests/testthat/testDllRcpp/DESCRIPTION +++ /dev/null @@ -1,9 +0,0 @@ -Package: testDllRcpp -Title: Test package for compiling DLLs that link to Rcpp -License: GPL-2 -Description: -Author: Hadley -Maintainer: Hadley -Version: 0.1 -Depends: Rcpp (>= 0.10.0) -LinkingTo: Rcpp diff --git a/tests/testthat/testDllRcpp/NAMESPACE b/tests/testthat/testDllRcpp/NAMESPACE deleted file mode 100644 index 49939634..00000000 --- a/tests/testthat/testDllRcpp/NAMESPACE +++ /dev/null @@ -1,3 +0,0 @@ -useDynLib(testDllRcpp, .registration = TRUE) -export(rcpp_hello_world) -export(rcpp_test_attributes) diff --git a/tests/testthat/testDllRcpp/R/.gitignore b/tests/testthat/testDllRcpp/R/.gitignore deleted file mode 100644 index b1f3275a..00000000 --- a/tests/testthat/testDllRcpp/R/.gitignore +++ /dev/null @@ -1 +0,0 @@ -RcppExports.R diff --git a/tests/testthat/testDllRcpp/src/.gitignore b/tests/testthat/testDllRcpp/src/.gitignore deleted file mode 100644 index 48efaf8d..00000000 --- a/tests/testthat/testDllRcpp/src/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -RcppExports.cpp -*.o -*.so diff --git a/tests/testthat/testDllRcpp/src/rcpp_hello_world.cpp b/tests/testthat/testDllRcpp/src/rcpp_hello_world.cpp deleted file mode 100644 index e77afd3a..00000000 --- a/tests/testthat/testDllRcpp/src/rcpp_hello_world.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include - -// [[Rcpp::export]] -SEXP rcpp_hello_world() { - using namespace Rcpp; - - CharacterVector x = CharacterVector::create("foo", "bar"); - NumericVector y = NumericVector::create(0.0, 1.0); - List z = List::create(x, y); - - return z; -} - -// [[Rcpp::export]] -bool rcpp_test_attributes() { return true; } diff --git a/tests/testthat/testDllcpp11/.Rbuildignore b/tests/testthat/testDllcpp11/.Rbuildignore new file mode 100644 index 00000000..5163d0b5 --- /dev/null +++ b/tests/testthat/testDllcpp11/.Rbuildignore @@ -0,0 +1 @@ +^LICENSE\.md$ diff --git a/tests/testthat/testDllcpp11/DESCRIPTION b/tests/testthat/testDllcpp11/DESCRIPTION new file mode 100644 index 00000000..0569da0c --- /dev/null +++ b/tests/testthat/testDllcpp11/DESCRIPTION @@ -0,0 +1,16 @@ +Package: testDllcpp11 +Title: Test package for compiling DLLs that link to cpp11 +License: MIT + file LICENSE +Description: Test package for compiling DLLs that link to cpp11. + Just for testing purposes. +Authors@R: c( + person("Hadley", "Wickham", role = c("aut", "cre"), + email = "hadley@posit.co"), + person("Mauricio", "Vargas Sepulveda", role = "aut") + ) +Version: 0.1 +LinkingTo: + cpp11 +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.3.2 +Encoding: UTF-8 diff --git a/tests/testthat/testDllcpp11/LICENSE b/tests/testthat/testDllcpp11/LICENSE new file mode 100644 index 00000000..fb557e5e --- /dev/null +++ b/tests/testthat/testDllcpp11/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2024 +COPYRIGHT HOLDER: testDllcpp11 authors diff --git a/tests/testthat/testDllcpp11/LICENSE.md b/tests/testthat/testDllcpp11/LICENSE.md new file mode 100644 index 00000000..caadcad6 --- /dev/null +++ b/tests/testthat/testDllcpp11/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +Copyright (c) 2024 testDllcpp11 authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tests/testthat/testDllcpp11/NAMESPACE b/tests/testthat/testDllcpp11/NAMESPACE new file mode 100644 index 00000000..f8242617 --- /dev/null +++ b/tests/testthat/testDllcpp11/NAMESPACE @@ -0,0 +1,3 @@ +# Generated by roxygen2: do not edit by hand + +useDynLib(testDllcpp11, .registration = TRUE) diff --git a/tests/testthat/testDllcpp11/R/.gitignore b/tests/testthat/testDllcpp11/R/.gitignore new file mode 100644 index 00000000..96dae645 --- /dev/null +++ b/tests/testthat/testDllcpp11/R/.gitignore @@ -0,0 +1 @@ +cpp11.R diff --git a/tests/testthat/testDllcpp11/R/testDllcpp11-package.R b/tests/testthat/testDllcpp11/R/testDllcpp11-package.R new file mode 100644 index 00000000..258b7bbb --- /dev/null +++ b/tests/testthat/testDllcpp11/R/testDllcpp11-package.R @@ -0,0 +1,14 @@ +#' @useDynLib testDllcpp11, .registration = TRUE +"_PACKAGE" + +#' Hello World +#' @export +cpp11_hello_world <- function() { + cpp11_hello_world_() +} + +#' Test Attributes +#' @export +cpp11_test_attributes <- function() { + cpp11_test_attributes_() +} diff --git a/tests/testthat/testDllcpp11/man/testDllcpp11-package.Rd b/tests/testthat/testDllcpp11/man/testDllcpp11-package.Rd new file mode 100644 index 00000000..3a87af12 --- /dev/null +++ b/tests/testthat/testDllcpp11/man/testDllcpp11-package.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/testDllcpp11-package.R +\docType{package} +\name{testDllcpp11-package} +\alias{testDllcpp11} +\alias{testDllcpp11-package} +\title{testDllcpp11: Test package for compiling DLLs that link to cpp11} +\description{ +Test package for compiling DLLs that link to cpp11. Just for testing purposes. +} +\author{ +\strong{Maintainer}: Hadley Wickham \email{hadley@posit.co} + +Authors: +\itemize{ + \item Mauricio Vargas Sepulveda +} + +} diff --git a/tests/testthat/testDllcpp11/src/.gitignore b/tests/testthat/testDllcpp11/src/.gitignore new file mode 100644 index 00000000..32523300 --- /dev/null +++ b/tests/testthat/testDllcpp11/src/.gitignore @@ -0,0 +1,4 @@ +cpp11.cpp +*.o +*.so +*.dll diff --git a/tests/testthat/testDllcpp11/src/cpp11_hello_world.cpp b/tests/testthat/testDllcpp11/src/cpp11_hello_world.cpp new file mode 100644 index 00000000..edab927d --- /dev/null +++ b/tests/testthat/testDllcpp11/src/cpp11_hello_world.cpp @@ -0,0 +1,14 @@ +#include +using namespace cpp11; + +[[cpp11::register]] sexp cpp11_hello_world_() { + writable::strings x = {"foo", "bar"}; + writable::doubles y = {0.0, 1.0}; + writable::list z = {x, y}; + + return z; +} + +[[cpp11::register]] bool cpp11_test_attributes_() { + return true; +} From 9f2d48fc2daaef9dd8bf6546d24a2c4f4f0cea5b Mon Sep 17 00:00:00 2001 From: Mauricio 'Pacha' Vargas Sepulveda Date: Sat, 2 Nov 2024 18:00:52 -0400 Subject: [PATCH 2/4] keep GPL License --- .Rbuildignore | 1 - tests/testthat/testDllcpp11/.Rbuildignore | 1 - tests/testthat/testDllcpp11/DESCRIPTION | 2 +- tests/testthat/testDllcpp11/LICENSE | 2 -- tests/testthat/testDllcpp11/LICENSE.md | 21 --------------------- 5 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 tests/testthat/testDllcpp11/.Rbuildignore delete mode 100644 tests/testthat/testDllcpp11/LICENSE delete mode 100644 tests/testthat/testDllcpp11/LICENSE.md diff --git a/.Rbuildignore b/.Rbuildignore index 2919b678..39a6934c 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -14,4 +14,3 @@ ^pkgdown$ ^CRAN-SUBMISSION$ ^\.vscode$ -^tests/testthat/testDllcpp11/\.Rbuildignore$ diff --git a/tests/testthat/testDllcpp11/.Rbuildignore b/tests/testthat/testDllcpp11/.Rbuildignore deleted file mode 100644 index 5163d0b5..00000000 --- a/tests/testthat/testDllcpp11/.Rbuildignore +++ /dev/null @@ -1 +0,0 @@ -^LICENSE\.md$ diff --git a/tests/testthat/testDllcpp11/DESCRIPTION b/tests/testthat/testDllcpp11/DESCRIPTION index 0569da0c..34e422b7 100644 --- a/tests/testthat/testDllcpp11/DESCRIPTION +++ b/tests/testthat/testDllcpp11/DESCRIPTION @@ -1,6 +1,6 @@ Package: testDllcpp11 Title: Test package for compiling DLLs that link to cpp11 -License: MIT + file LICENSE +License: GPL (>= 3) Description: Test package for compiling DLLs that link to cpp11. Just for testing purposes. Authors@R: c( diff --git a/tests/testthat/testDllcpp11/LICENSE b/tests/testthat/testDllcpp11/LICENSE deleted file mode 100644 index fb557e5e..00000000 --- a/tests/testthat/testDllcpp11/LICENSE +++ /dev/null @@ -1,2 +0,0 @@ -YEAR: 2024 -COPYRIGHT HOLDER: testDllcpp11 authors diff --git a/tests/testthat/testDllcpp11/LICENSE.md b/tests/testthat/testDllcpp11/LICENSE.md deleted file mode 100644 index caadcad6..00000000 --- a/tests/testthat/testDllcpp11/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# MIT License - -Copyright (c) 2024 testDllcpp11 authors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. From b525551b6b231bdb06ef45b92f9c1220f05a9f47 Mon Sep 17 00:00:00 2001 From: Mauricio 'Pacha' Vargas Sepulveda Date: Sun, 3 Nov 2024 12:31:48 -0500 Subject: [PATCH 3/4] update news --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index b14601e0..4f381442 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ * The generator of `compile_commands.json` is now more reliable in the presence of extra whitespace in `make`'s output (#288, @TimTaylor). +* Refactored to use the "cpp11" package for C++ code instead of "Rcpp". (@pachadotdev, #299) # pkgload 1.4.0 From f1eb1a4074c832553fa60e240fe32f376a69512b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauricio=20=22Pach=C3=A1=22=20Vargas=20Sep=C3=BAlveda?= Date: Mon, 4 Nov 2024 09:40:48 -0500 Subject: [PATCH 4/4] Update DESCRIPTION Co-authored-by: Lionel Henry --- DESCRIPTION | 2 -- 1 file changed, 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c71e25ad..2ae38764 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,8 +6,6 @@ Authors@R: c( person("Winston", "Chang", role = "aut"), person("Jim", "Hester", role = "aut"), person("Lionel", "Henry", , "lionel@posit.co", role = c("aut", "cre")), - person("Mauricio", "Vargas Sepulveda", role = "ctb", - comment = c(ORCID = "0000-0003-1017-7574")), person("Posit Software, PBC", role = c("cph", "fnd")), person("R Core team", role = "ctb", comment = "Some namespace and vignette code extracted from base R")