rcpp-0.11.0/0000755000000000000000000000000012273705472007434 5ustar rcpp-0.11.0/cleanup0000755000000000000000000000250312253723677011016 0ustar #cd inst/doc && rm -f index.html *.tex *.bbl *.blg *.aux *.out *.log && cd - rm -f confdefs.h config.log config.status \ src/*.o src/*.so src/*.a src/*.d src/*.dll src/*.rc \ RcppSrc/*.o RcppSrc/*.a inst/Rcpp-version.txt \ inst/lib/libRcpp.so inst/lib/Rcpp*.h inst/lib/libRcpp.a \ inst/doc/*.cpp inst/doc/*.hpp \ inst/doc/*.out \ inst/doc/.build.timestamp \ inst/doc/*.Rd inst/doc/*.aux inst/doc/*.log inst/doc/*.tex \ inst/doc/latex/*.aux inst/doc/latex/*.log \ inst/examples/ConvolveBenchmarks/*.o \ inst/examples/ConvolveBenchmarks/*.so \ inst/examples/functionCallback/*.so \ inst/examples/functionCallback/*.o \ inst/examples/OpenMP/piWithInterrupts.o \ inst/examples/OpenMP/piWithInterrupts.so \ inst/discovery/cxx0x.Rout \ inst/unitTests/testRcppModule/src/*.o \ inst/unitTests/testRcppModule/src/*.so \ inst/unitTests/testRcppClass/src/*.o \ inst/unitTests/testRcppClass/src/*.so \ src/Makedeps libRcpp.a \ build/Rcpp.pdf \ src/symbols.rds \ inst/unitTests/testRcppClass/src/symbols.rds \ vignettes/*.aux vignettes/*.log vignettes/*.out \ vignettes/*.tex vignettes/*.bbl vignettes/*.blg rm -rf autom4te.cache inst/lib/ inst/doc/man/ inst/doc/html/ inst/doc/latex/ \ inst/doc/auto inst/doc/Rcpp-*/auto/ src-* vignettes/auto find . -name \*~ -exec rm {} \; find . -name \*.flc -exec rm {} \; rcpp-0.11.0/R/0000755000000000000000000000000012273452010007620 5ustar rcpp-0.11.0/R/00_classes.R0000644000000000000000000000632512253723677011727 0ustar # Copyright (C) 2010 - 2012 John Chambers, 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 . # anticipating a change in R 2.16.0 setClass( "refClassGeneratorFunction" ) setClassUnion("refGenerator", c("refObjectGenerator", "refClassGeneratorFunction")) ## "Module" class as an environment with "pointer", "moduleName", ## "packageName" and "refClassGenerators" ## Stands in for a reference class with those fields. setClass( "Module", contains = "environment" ) setRefClass( "C++Field", fields = list( pointer = "externalptr", cpp_class = "character", read_only = "logical", class_pointer = "externalptr", docstring = "character" ) ) setRefClass( "C++OverloadedMethods", fields = list( pointer = "externalptr", class_pointer = "externalptr", size = "integer", void = "logical", const = "logical", docstrings = "character", signatures = "character", nargs = "integer" ), methods = list( info = function(prefix = " " ){ paste( paste( prefix, signatures, ifelse(const, " const", "" ), "\n", prefix, prefix, ifelse( nchar(docstrings), paste( "docstring :", docstrings) , "" ) ) , collapse = "\n" ) } ) ) setRefClass( "C++Constructor", fields = list( pointer = "externalptr", class_pointer = "externalptr", nargs = "integer", signature = "character", docstring = "character" ) ) setClass( "C++Class", representation( pointer = "externalptr", module = "externalptr", fields = "list", methods = "list", constructors = "list", generator = "refGenerator", docstring = "character", typeid = "character", enums = "list", parents = "character" ), contains = "character" ) setClass( "C++Object") setClass( "C++Function", representation( pointer = "externalptr", docstring = "character", signature = "character" ), contains = "function" ) .cppfunction_formals_gets <- function (fun, envir = environment(fun), value) { bd <- body(fun) b2 <- bd[[2L]] for( i in seq_along(value) ){ b2[[3L+i]] <- as.name( names(value)[i] ) } bd[[2]] <- b2 f <- fun@.Data formals(f) <- value body(f) <- bd fun@.Data <- f fun } setGeneric( "formals<-" ) setMethod( "formals<-", "C++Function", .cppfunction_formals_gets ) rcpp-0.11.0/R/populate.R0000644000000000000000000000205612253723677011621 0ustar # Copyright (C) 2010 - 2011 John Chambers, 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 . populate <- function( module, env ){ # make sure the module is loaded module <- Module( module, mustStart = TRUE ) storage <- get( "storage", as.environment(module ) ) symbols <- ls( storage ) is_ns <- isNamespace( env ) for( x in symbols ){ forceAssignInNamespace( x, storage[[x]], env ) } } rcpp-0.11.0/R/loadModule.R0000644000000000000000000001060312253723677012052 0ustar # Copyright (C) 2010 - 2012 John Chambers, 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 . ## the following items are to get around some insanity in the ## CMD check of packages using Rcpp that dies in loadModule() ## because some code somewhere can't find the methods package isBotchedSession <- function() ! ("package:methods" %in% search()) .moduleNames <- function(what) { assignAs <- allNames(what) sameNames <- !nzchar(assignAs) assignAs[sameNames] <- what[sameNames] assignAs } .DummyModule <- function(name, what) { value <- new.env() storage <- new.env() assign("storage", storage, envir = value) assign("moduleName", name, envir = value) allNames <- names(.moduleNames(what)) for(el in allNames) assign(el, NULL, envir = storage) value } .moduleMetaName <- function(name) methods::methodsPackageMetaName("Mod",name) moduleIsLoaded <- function(name, env) exists(.moduleMetaName(name), envir = env, inherits = FALSE) loadModule <- function( module, what = character(), loadNow, env = topenv(parent.frame())) { if(is(module, "character")) { loadM <- NULL metaName <- .moduleMetaName(module) if(exists(metaName, envir = env, inherits = FALSE)) loadM <- get(metaName, envir = env) } else if(is(module, "Module")) { loadM <- as.environment(module) module <- get(loadM, "moduleName") } else stop(gettextf("Argument \"module\" should be a module or the name of a module: got an object of class \"%s\"", class(module))) if(missing(loadNow)) { # test it if(is.null(loadM)) loadM <- tryCatch(Module( module, mustStart = TRUE, where = env ), error = function(e)e) loadNow <- !is(loadM, "error") } if(loadNow) { .botched <- isBotchedSession() if(is.null(loadM)) loadM <- tryCatch(Module( module, mustStart = TRUE, where = env ), error = function(e)e) if(is(loadM, "error")) { if(.botched) return(.DummyModule(module, what)) stop(gettextf("Unable to load module \"%s\": %s", as(module, "character"), loadM$message)) } if(!exists(metaName, envir = env, inherits =FALSE)) assign(metaName, loadM, envir = env) if(!length(what)) # no assignments return(loadM) env <- as.environment(env) ## get the storage environment, for what=TRUE storage <- as.environment(get( "storage", as.environment(loadM ) )) if(identical(what, TRUE)) what <- objects(storage) missingObjs <- !sapply(what, function(symb) exists(symb, envir = storage, inherits = FALSE)) if(any(missingObjs)) { if(.botched) { for(el in what[missingObjs]) assign(el, NULL, envir = storage) } else { warning(gettextf("%s not found in module \"%s\"", paste0('"', what[missingObjs], '"', collapse = ", "), as.character(module))) what <- what[!missingObjs] } } assignAs <- .moduleNames(what) for( i in seq_along(what) ) { if(.botched) assign(assignAs[[i]], NULL, envir = storage) else assign(assignAs[[i]], get(what[[i]], envir = storage), envir = env) } loadM } else { # create a load action to recall this function myCall <- match.call() f <- function(ns) NULL myCall$env <- as.name("ns") myCall$loadNow <- TRUE body(f, envir = env) <- myCall setLoadAction(f, where = env) invisible(myCall) } } rcpp-0.11.0/R/RcppLdpath.R0000644000000000000000000000543412266347221012023 0ustar # Copyright (C) 2010 - 2013 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 . ## make sure system.file returns an absolute path Rcpp.system.file <- function(...){ tools::file_path_as_absolute( base::system.file( ..., package = "Rcpp" ) ) } ## Use R's internal knowledge of path settings to find the lib/ directory ## plus optinally an arch-specific directory on system building multi-arch RcppLdPath <- function() { "" } ## Provide linker flags -- i.e. -L/path/to/libRcpp -- as well as an ## optional rpath call needed to tell the Linux dynamic linker about the ## location. This is not needed on OS X where we encode this as library ## built time (see src/Makevars) or Windows where we use a static library ## Updated Jan 2010: We now default to static linking but allow the use ## of rpath on Linux if static==FALSE has been chosen ## Note that this is probably being called from LdFlags() ## Updated Nov 2013: We no longer build a library. This should be deprecated. RcppLdFlags <- function() { "" } # indicates if Rcpp was compiled with GCC >= 4.3 canUseCXX0X <- function() .Call( "canUseCXX0X", PACKAGE = "Rcpp" ) ## Provide compiler flags -- i.e. -I/path/to/Rcpp.h RcppCxxFlags <- function(cxx0x=FALSE) { # path <- RcppLdPath() path <- Rcpp.system.file( "include" ) if (.Platform$OS.type=="windows") { path <- asBuildPath(path) } paste("-I", path, if (cxx0x && canUseCXX0X()) " -std=c++0x" else "", sep="") } ## Shorter names, and call cat() directly ## CxxFlags defaults to no using c++0x extensions are these are considered non-portable CxxFlags <- function(cxx0x=FALSE) { cat(RcppCxxFlags(cxx0x=cxx0x)) } ## LdFlags defaults to static linking on the non-Linux platforms Windows and OS X LdFlags <- function() { cat(RcppLdFlags()) } # capabilities RcppCapabilities <- capabilities <- function() .Call( rcpp_capabilities ) # compile, load and call the cxx0x.c script to identify whether # the compiler is GCC >= 4.3 RcppCxx0xFlags <- function(){ script <- Rcpp.system.file( "discovery", "cxx0x.R" ) flag <- capture.output( source( script ) ) flag } Cxx0xFlags <- function() cat( RcppCxx0xFlags() ) rcpp-0.11.0/R/RcppClass.R0000644000000000000000000001450712253723677011666 0ustar # Copyright (C) 2010 - 2012 John Chambers, 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 . setRcppClass <- function(Class, CppClass, module, fields = list(), contains = character(), methods = list(), saveAs = Class, where = topenv(parent.frame()), ...) { myCall <- match.call() myCall[[1]] <- quote(Rcpp::loadRcppClass) if(!missing(module) && moduleIsLoaded(module, where)) # eval now eval.parent(myCall) else { f <- function(NS)NULL myCall$where = as.name("NS") body(f, where) <- myCall setLoadAction(f, where = where) } } loadRcppClass <- function(Class, CppClass = Class, module = paste0("class_",Class), fields = character(), contains = character(), methods = list(), saveAs = Class, where = topenv(parent.frame()), ...) { if(isBotchedSession()) { value <- setRefClass(Class, fields = fields, methods = methods, contains = contains, where = where, ...) # kludge -- see loadModule.R if(is.character(saveAs) && length(saveAs) == 1) assign(saveAs, value, envir = where) return(value) } mod <- loadModule(module, NULL, env = where, loadNow = TRUE) storage <- get("storage", envir = as.environment(mod)) if(exists(CppClass, envir = storage, inherits = FALSE)) { cppclassinfo <- get(CppClass, envir = storage) if(!is(cppclassinfo, "C++Class")) stop(gettextf("Object \"%s\" in module \"%s\" is not a C++ class description", CppClass, module)) } else stop(gettextf("No object \"%s\" in module \"%s\"", CppClass, module)) allmethods <- .makeCppMethods(methods, cppclassinfo, where) allfields <- .makeCppFields(fields, cppclassinfo, where) value <- setRefClass(Class, fields = allfields, contains = c(contains, "RcppClass"), methods = allmethods, where=where, ...) ## declare the fields and methods to shut up codetools ## the R level fields and methods were declared by setRefClass ## but we declare them again; globalVariables() applies unique() if(exists("globalVariables", envir = asNamespace("utils"))) # >=2.15.1 utils::globalVariables(c(names(allfields), names(allmethods)), where) if(is.character(saveAs) && length(saveAs) == 1) assign(saveAs, value, envir = where) value } .makeCppMethods <- function(methods, cppclassinfo, env) { cppMethods <- names(cppclassinfo@methods) newMethods <- names(methods) for(what in cppMethods[! cppMethods %in% newMethods]) methods[[what]] <- eval(substitute( function(...) .CppObject$WHAT(...), list(WHAT = as.name(what))), env) methods } .makeFieldsList <- function(fields) { fnames <- allNames(fields) any_s <- !nzchar(fnames) fnames[any_s] <- fields[any_s] fields[any_s] <- "ANY" fields <- as.list(fields) names(fields) <- fnames fields } .makeCppFields <- function(fields, cppclassinfo, env) { if(is.character(fields)) fields <- .makeFieldsList(fields) cppFields <- names(cppclassinfo@fields) newFields <- names(fields) for(what in cppFields[! cppFields %in% newFields]) fields[[what]] <- eval(substitute( function(value) if(missing(value)) .CppObject$WHAT else .CppObject$WHAT <- value, list(WHAT = as.name(what))), env) ## insert the generator and cppclass def as constants cppgenerator <- getRefClass(cppclassinfo) fields[[".CppClassDef"]] <- eval(substitute( function(value) if(missing(value)) DEF else stop("this field is a constant"), list(DEF = cppclassinfo)), env) fields[[".CppGenerator"]] <- eval(substitute( function(value) if(missing(value)) DEF else stop("this field is a constant"), list(DEF = cppgenerator)), env) fields } .RcppClass <- setRefClass("RcppClass", methods = list( initialize = function(...){ args <- list(...) argNames <- allNames(args) cppArgs <- !nzchar(argNames) .CppObject <<- do.call(.CppGenerator$new, args[cppArgs]) for(i in seq_along(args)[!cppArgs]) field(argNames[[i]], args[[i]]) } ), fields = list( .CppObject = "C++Object" ), contains = "VIRTUAL" ) .RcppClass$methods(show = function () { cat("Rcpp class object of class ", classLabel(class(.self)), "\n", sep = "") fields <- names(.refClassDef@fieldClasses) if(".CppObject" %in% fields) { cat("\n") methods::show(field(".CppObject")) cat("\n") } fields <- fields[ ! fields %in% c(".CppObject", ".CppClassDef", ".CppGenerator")] for (fi in fields) { cat("Field \"", fi, "\":\n", sep = "") methods::show(field(fi)) } }, objectPointer = function() .CppObject$.pointer ) rcpp-0.11.0/R/Rcpp.package.skeleton.R0000644000000000000000000001657212270352603014103 0ustar # -*- tab-width: 4; -*- # Copyright (C) 2009 - 2014 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 . Rcpp.package.skeleton <- function(name = "anRpackage", list = character(), environment = .GlobalEnv, path = ".", force = FALSE, code_files = character(), cpp_files = character(), example_code = TRUE, attributes = TRUE, module = FALSE, author = "Who wrote it", maintainer = if (missing(author)) "Who to complain to" else author, email = "yourfault@somewhere.net", license = "What Licence is it under ?") { call <- match.call() call[[1]] <- as.name("package.skeleton") env <- parent.frame(1) if (!is.character(cpp_files)) stop("'cpp_files' must be a character vector") if (!length(list)) { fake <- TRUE assign("Rcpp.fake.fun", function() {}, envir = env) if (example_code && !isTRUE(attributes)) { assign("rcpp_hello_world", function() {}, envir = env) remove_hello_world <- TRUE } else { remove_hello_world <- FALSE } } else { if (example_code && !isTRUE(attributes)) { if (!"rcpp_hello_world" %in% list) { assign( "rcpp_hello_world", function() {}, envir = env) call[["list"]] <- as.call(c(as.name("c"), as.list(c("rcpp_hello_world", list)))) } remove_hello_world <- TRUE } else { remove_hello_world <- FALSE } fake <- FALSE } ## first let the traditional version do its business ## remove Rcpp specific arguments call <- call[ c(1L, which(names(call) %in% names(formals(package.skeleton)))) ] if (fake) { call[["list"]] <- c(if(isTRUE(example_code) && !isTRUE(attributes)) "rcpp_hello_world", "Rcpp.fake.fun") } tryCatch(eval(call, envir = env), error = function(e){ stop(sprintf("error while calling `package.skeleton` : %s", conditionMessage(e))) }) message("\nAdding Rcpp settings") ## now pick things up root <- file.path(path, name) # Add Rcpp to the DESCRIPTION DESCRIPTION <- file.path(root, "DESCRIPTION") if (file.exists(DESCRIPTION)) { imports <- c(if (isTRUE(module)) "methods", sprintf("Rcpp (>= %s)", packageDescription("Rcpp")[["Version"]])) x <- cbind(read.dcf(DESCRIPTION), "Imports" = paste(imports, collapse = ", "), "LinkingTo" = "Rcpp") if (isTRUE(module)) { x <- cbind(x, "RcppModules" = "yada, stdVector, NumEx") message(" >> added RcppModules: yada, stdVector, NumEx") } x[, "Author"] <- author x[, "Maintainer"] <- sprintf("%s <%s>", maintainer, email) x[, "License"] <- license message( " >> added Imports: Rcpp" ) message( " >> added LinkingTo: Rcpp" ) write.dcf(x, file = DESCRIPTION) } ## add useDynLib and importFrom to NAMESPACE NAMESPACE <- file.path(root, "NAMESPACE") lines <- readLines(NAMESPACE) ns <- file(NAMESPACE, open="w") if (! grepl("useDynLib", lines)) { lines <- c(sprintf( "useDynLib(%s)", name), lines) writeLines(lines, con = ns) message(" >> added useDynLib directive to NAMESPACE" ) } if (isTRUE(module)) { writeLines('import(methods)', ns) } writeLines('importFrom(Rcpp, evalCpp)', ns) message(" >> added importFrom(Rcpp, evalCpp) directive to NAMESPACE" ) close( ns ) ## update the package description help page package_help_page <- file.path(root, "man", sprintf( "%s-package.Rd", name)) if (file.exists(package_help_page)) { lines <- readLines(package_help_page) lines <- gsub("What license is it under?", license, lines, fixed = TRUE) lines <- gsub("Who to complain to ", sprintf( "%s <%s>", maintainer, email), lines, fixed = TRUE) lines <- gsub( "Who wrote it", author, lines, fixed = TRUE) writeLines(lines, package_help_page) } ## lay things out in the src directory src <- file.path(root, "src") if (!file.exists(src)) { dir.create(src) } skeleton <- system.file("skeleton", package = "Rcpp") if (length(cpp_files) > 0L) { for (file in cpp_files) { file.copy(file, src) message(" >> copied ", file, " to src directory" ) } compileAttributes(root) } if (example_code) { if (isTRUE(attributes)) { file.copy(file.path( skeleton, "rcpp_hello_world_attributes.cpp"), file.path( src, "rcpp_hello_world.cpp")) message(" >> added example src file using Rcpp attributes") compileAttributes(root) message(" >> compiled Rcpp attributes") } else { header <- readLines(file.path(skeleton, "rcpp_hello_world.h")) header <- gsub("@PKG@", name, header, fixed = TRUE) writeLines(header , file.path(src, "rcpp_hello_world.h")) message(" >> added example header file using Rcpp classes") file.copy(file.path(skeleton, "rcpp_hello_world.cpp"), src) message(" >> added example src file using Rcpp classes") rcode <- readLines(file.path( skeleton, "rcpp_hello_world.R")) rcode <- gsub("@PKG@", name, rcode, fixed = TRUE) writeLines( rcode , file.path( root, "R", "rcpp_hello_world.R")) message(" >> added example R file calling the C++ example") } hello.Rd <- file.path(root, "man", "rcpp_hello_world.Rd") unlink(hello.Rd) file.copy(system.file("skeleton", "rcpp_hello_world.Rd", package = "Rcpp"), hello.Rd) message( " >> added Rd file for rcpp_hello_world") } if (isTRUE( module)) { file.copy(system.file("skeleton", "rcpp_module.cpp", package="Rcpp"), file.path(root, "src")) file.copy(system.file("skeleton", "Num.cpp", package="Rcpp"), file.path(root, "src")) file.copy(system.file("skeleton", "stdVector.cpp", package="Rcpp"), file.path(root, "src")) file.copy(system.file( "skeleton", "zzz.R", package ="Rcpp"), file.path(root, "R")) message(" >> copied the example module file ") } lines <- readLines(package.doc <- file.path( root, "man", sprintf("%s-package.Rd", name))) lines <- sub("~~ simple examples", "%% ~~ simple examples", lines) lines <- lines[! grepl("~~ package title", lines)] lines <- lines[! grepl("~~ The author and", lines)] lines <- sub("Who wrote it", author, lines ) lines <- sub("Who to complain to.*", sprintf("%s <%s>", maintainer, email), lines) writeLines(lines, package.doc) if (fake) { rm("Rcpp.fake.fun", envir = env) unlink(file.path(root, "R" , "Rcpp.fake.fun.R")) unlink(file.path(root, "man", "Rcpp.fake.fun.Rd")) } if (isTRUE(remove_hello_world)) { rm("rcpp_hello_world", envir = env) } invisible(NULL) } rcpp-0.11.0/R/zzz.R0000644000000000000000000000156712253723677010633 0ustar # Copyright (C) 2009 - 2013 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 . .dummyInstancePointer <- new.env() # just something permanent .classes_map <- new.env() .onLoad <- function(libname, pkgname){ new_dummyObject(.dummyInstancePointer); } rcpp-0.11.0/R/Module.R0000644000000000000000000003705112273307750011210 0ustar # Copyright (C) 2010 - 2012 John Chambers, 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 . internal_function <- function(pointer){ f <- function(xp){ force(xp) function(...){ .External( InternalFunction_invoke, xp, ... ) } } o <- new( "C++Function", f(pointer) ) o@pointer <- pointer o } setMethod("$", "C++Class", function(x, name) { x <- x@generator eval.parent(substitute(x$name)) }) .badModulePointer <- NULL .setModulePointer <- function(module, value) { assign("pointer", value, envir = as.environment(module)) value } .getModulePointer <- function(module, mustStart = TRUE) { pointer <- get("pointer", envir = as.environment(module)) if(is.null(pointer) && mustStart) { ## should be (except for bug noted in identical()) ## if(identical(pointer, .badModulePointer) && mustStart) { Module(module, mustStart = TRUE) # will either initialize pointer or throw error pointer <- get("pointer", envir = as.environment(module)) } pointer } setMethod("initialize", "Module", function(.Object, moduleName = "UNKNOWN", packageName = "", pointer = .badModulePointer, ...) { env <- new.env(TRUE, emptyenv()) as(.Object, "environment") <- env assign("pointer", pointer, envir = env) assign("packageName", packageName, envir = env) assign("moduleName", moduleName, envir = env) if(length(list(...)) > 0) { .Object <- callNextMethod(.Object, ...) } .Object }) .get_Module_function <- function(x, name, pointer = .getModulePointer(x) ){ pointer <- .getModulePointer(x) info <- .Call( Module__get_function, pointer, name ) fun_ptr <- info[[1L]] is_void <- info[[2L]] doc <- info[[3L]] sign <- info[[4L]] formal_args <- info[[5L]] nargs <- info[[6L]] f <- function(...) NULL if( nargs == 0L ) formals(f) <- NULL stuff <- list( fun_pointer = fun_ptr, InternalFunction_invoke = InternalFunction_invoke ) body(f) <- if( nargs == 0L ){ if( is_void ) { substitute( { .External( InternalFunction_invoke, fun_pointer) invisible(NULL) }, stuff ) } else { substitute( { .External( InternalFunction_invoke, fun_pointer) }, stuff ) } } else { if( is_void ) { substitute( { .External( InternalFunction_invoke, fun_pointer, ... ) invisible(NULL) }, stuff ) } else { substitute( { .External( InternalFunction_invoke, fun_pointer, ... ) }, stuff ) } } out <- new( "C++Function", f, pointer = fun_ptr, docstring = doc, signature = sign ) if( ! is.null( formal_args ) ){ formals( out ) <- formal_args } out } .get_Module_Class <- function( x, name, pointer = .getModulePointer(x) ){ value <- .Call( Module__get_class, pointer, name ) value@generator <- get("refClassGenerators",envir=x)[[as.character(value)]] value } setMethod( "$", "Module", function(x, name){ pointer <- .getModulePointer(x) storage <- get( "storage", envir = as.environment(x) ) storage[[ name ]] } ) new_CppObject_xp <- function(module, pointer, ...) { .External( class__newInstance, module, pointer, ... ) } new_dummyObject <- function(...) .External( "class__dummyInstance", ...) # class method for $initialize cpp_object_initializer <- function(.self, .refClassDef, ..., .object_pointer){ selfEnv <- as.environment(.self) ## generate the C++-side object and store its pointer, etc. ## access the private fields in the fieldPrototypes env. fields <- .refClassDef@fieldPrototypes pointer <- if(missing(.object_pointer)) new_CppObject_xp(fields$.module, fields$.pointer, ...) else .object_pointer assign(".module", fields$.module, envir = selfEnv) assign(".pointer", pointer, envir = selfEnv) assign(".cppclass", fields$.pointer, envir = selfEnv) .self } cpp_object_dummy <- function(.self, .refClassDef) { selfEnv <- as.environment(.self) ## like initializer but a dummy for the case of no default ## constructor. Will throw an error if the object is used. fields <- .refClassDef@fieldPrototypes pointer <- new_dummyObject() assign(".module", fields$.module, envir = selfEnv) assign(".pointer", pointer, envir = selfEnv) assign(".cppclass", fields$.pointer, envir = selfEnv) .self } cpp_object_maker <- function(typeid, pointer){ Class <- .classes_map[[ typeid ]] new( Class, .object_pointer = pointer ) } Module <- function( module, PACKAGE = methods::getPackageName(where), where = topenv(parent.frame()), mustStart = FALSE ) { if(inherits(module, "DLLInfo") && missing(mustStart)) mustStart <- TRUE if(inherits(module, "Module")) { xp <- .getModulePointer(module, FALSE) if(!missing(PACKAGE)) warning("ignoring PACKAGE argument in favor of internal package from Module object") env <- as.environment(module) # not needed from R 2.12.0 PACKAGE <- get("packageName", envir = env) moduleName <- get("moduleName", envir = env) } else if( identical( typeof( module ), "externalptr" ) ){ ## [john] Should Module() ever be called with a pointer as argument? ## If so, we need a safe check of the pointer's validity ## [romain] I don't think we actually can, external pointers ## are stored as void*, they don't know what they are. Or we could ## perhaps keep a vector of all known module pointers ## [John] One technique is to initialize the pointer to a known value ## and just check whether it's been reset from that (bad) value xp <- module moduleName <- .Call( Module__name, xp ) module <- methods::new("Module", pointer = xp, packageName = PACKAGE, moduleName = moduleName) } else if(is.character(module)) { moduleName <- module xp <- .badModulePointer module <- methods::new("Module", pointer = xp, packageName = PACKAGE, moduleName = moduleName) } if(identical(xp, .badModulePointer)) { if(mustStart) { name <- sprintf( "_rcpp_module_boot_%s", moduleName ) symbol <- tryCatch(getNativeSymbolInfo( name, PACKAGE ), error = function(e)e) if(inherits(symbol, "error")) stop(gettextf("Failed to initialize module pointer: %s", symbol), domain = NA) xp <- .Call( symbol ) .setModulePointer(module, xp) } else return(module) } classes <- .Call( Module__classes_info, xp ) ## We need a general strategy for assigning class defintions ## since delaying the initialization of the module causes ## where to be the Rcpp namespace: if(environmentIsLocked(where)) where <- .GlobalEnv # or??? generators <- list() storage <- new.env() for( i in seq_along(classes) ){ CLASS <- classes[[i]] clname <- as.character(CLASS) fields <- cpp_fields( CLASS, where ) methods <- cpp_refMethods(CLASS, where) generator <- methods::setRefClass( clname, fields = fields, contains = "C++Object", methods = methods, where = where ) # just to make codetools happy .self <- .refClassDef <- NULL generator$methods(initialize = if(cpp_hasDefaultConstructor(CLASS)) function(...) cpp_object_initializer(.self,.refClassDef, ...) else function(...) { if(nargs()) cpp_object_initializer(.self,.refClassDef, ...) else cpp_object_dummy(.self, .refClassDef) } ) rm( .self, .refClassDef ) classDef <- methods::getClass(clname) ## non-public (static) fields in class representation ## Should these become real fields? fields <- classDef@fieldPrototypes assign(".pointer", CLASS@pointer, envir = fields) assign(".module", xp, envir = fields) assign(".CppClassName", clname, envir = fields) generators[[clname]] <- generator # [romain] : should this be promoted to reference classes # perhaps with better handling of j and ... arguments if( any( grepl( "^[[]", names(CLASS@methods) ) ) ){ if( "[[" %in% names( CLASS@methods ) ){ methods::setMethod( "[[", clname, function(x, i, j, ..., exact = TRUE){ x$`[[`( i ) }, where = where ) } if( "[[<-" %in% names( CLASS@methods ) ){ methods::setReplaceMethod( "[[", clname, function(x, i, j, ..., exact = TRUE, value){ x$`[[<-`( i, value ) x } , where = where ) } } # promoting show to S4 if( any( grepl( "show", names(CLASS@methods) ) ) ){ setMethod( "show", clname, function(object) object$show(), where = where ) } } if(length(classes)) { module$refClassGenerators <- generators } for( i in seq_along(classes) ){ CLASS <- classes[[i]] clname <- as.character(CLASS) demangled_name <- sub( "^Rcpp_", "", clname ) .classes_map[[ CLASS@typeid ]] <- storage[[ demangled_name ]] <- .get_Module_Class( module, demangled_name, xp ) # exposing enums values as CLASS.VALUE # (should really be CLASS$value but I don't know how to do it) if( length( CLASS@enums ) ){ for( enum in CLASS@enums ){ for( i in 1:length(enum) ){ storage[[ paste( demangled_name, ".", names(enum)[i], sep = "" ) ]] <- enum[i] } } } } # functions functions <- .Call( Module__functions_names, xp ) for( fun in functions ){ storage[[ fun ]] <- .get_Module_function( module, fun, xp ) # register as(FROM, TO) methods converter_rx <- "^[.]___converter___(.*)___(.*)$" if( length( matches <- grep( converter_rx, functions ) ) ){ for( i in matches ){ fun <- functions[i] from <- sub( converter_rx, "\\1", fun ) to <- sub( converter_rx, "\\2", fun ) converter <- function( from ){} body( converter ) <- substitute( { CONVERT(from) }, list( CONVERT = storage[[fun]] ) ) setAs( from, to, converter, where = where ) } } } assign( "storage", storage, envir = as.environment(module) ) module } dealWith <- function( x ) if(isTRUE(x[[1]])) invisible(NULL) else x[[2]] method_wrapper <- function( METHOD, where ){ noargs <- all( METHOD$nargs == 0 ) stuff <- list( class_pointer = METHOD$class_pointer, pointer = METHOD$pointer, CppMethod__invoke = CppMethod__invoke, CppMethod__invoke_void = CppMethod__invoke_void, CppMethod__invoke_notvoid = CppMethod__invoke_notvoid, dealWith = dealWith, docstring = METHOD$info("") ) f <- function(...) NULL if( noargs ){ formals(f) <- NULL } extCall <- if( noargs ) { if( all( METHOD$void ) ){ # all methods are void, so we know we want to return invisible(NULL) substitute( { docstring .External(CppMethod__invoke_void, class_pointer, pointer, .pointer ) invisible(NULL) } , stuff ) } else if( all( ! METHOD$void ) ){ # none of the methods are void so we always return the result of # .External substitute( { docstring .External(CppMethod__invoke_notvoid, class_pointer, pointer, .pointer ) } , stuff ) } else { # some are void, some are not, so the voidness is part of the result # we get from internally and we need to deal with it substitute( { docstring dealWith( .External(CppMethod__invoke, class_pointer, pointer, .pointer ) ) } , stuff ) } } else { if( all( METHOD$void ) ){ # all methods are void, so we know we want to return invisible(NULL) substitute( { docstring .External(CppMethod__invoke_void, class_pointer, pointer, .pointer, ...) invisible(NULL) } , stuff ) } else if( all( ! METHOD$void ) ){ # none of the methods are void so we always return the result of # .External substitute( { docstring .External(CppMethod__invoke_notvoid, class_pointer, pointer, .pointer, ...) } , stuff ) } else { # some are void, some are not, so the voidness is part of the result # we get from internally and we need to deal with it substitute( { docstring dealWith( .External(CppMethod__invoke, class_pointer, pointer, .pointer, ...) ) } , stuff ) } } body(f, where) <- extCall f } ## create a named list of the R methods to invoke C++ methods ## from the C++ class with pointer xp cpp_refMethods <- function(CLASS, where) { finalizer <- eval( substitute( function(){ .Call( CppObject__finalize, class_pointer , .pointer ) }, list( CLASS = CLASS@pointer, CppObject__finalize = CppObject__finalize, class_pointer = CLASS@pointer ) ) ) mets <- c( sapply( CLASS@methods, method_wrapper, where = where ), "finalize" = finalizer ) mets } cpp_hasDefaultConstructor <- function(CLASS) { .Call( Class__has_default_constructor, CLASS@pointer ) } binding_maker <- function( FIELD, where ){ f <- function( x ) NULL body(f) <- substitute({ if( missing( x ) ) .Call( CppField__get, class_pointer, pointer, .pointer) else .Call( CppField__set, class_pointer, pointer, .pointer, x) }, list(class_pointer = FIELD$class_pointer, pointer = FIELD$pointer, CppField__get = CppField__get, CppField__set = CppField__set )) environment(f) <- where f } cpp_fields <- function( CLASS, where){ sapply( CLASS@fields, binding_maker, where = where ) } .CppClassName <- function(name) paste0("Rcpp_",name) rcpp-0.11.0/R/02_completion.R0000644000000000000000000000323412253723677012441 0ustar # Copyright (C) 2010 - 2011 John Chambers, 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 . setGeneric( ".DollarNames" ) .DollarNames.Module <- function(x, pattern){ pointer <- .getModulePointer( x ) if(identical(pointer, .badModulePointer)) { stop( "unitialized module" ) } grep( pattern , .Call( Module__complete, pointer), value = TRUE ) } setMethod( ".DollarNames", "Module", .DollarNames.Module ) # completion for C++ objects # do we actually need this or do we get it for free via setRefClass, etc ... setGeneric( "complete", function(x) standardGeneric("complete") ) setMethod( "complete", "C++Object", function(x){ xp <- get(".cppclass", envir = as.environment(x)) # FIXME: implement another test # if(identical(xp, .emptyPointer)) # stop("C++ object with unset pointer to C++ class") .Call( CppClass__complete , xp ) } ) ".DollarNames.C++Object" <- function( x, pattern ){ grep( pattern, complete(x), value = TRUE ) } setMethod( ".DollarNames", "C++Object", `.DollarNames.C++Object` ) rcpp-0.11.0/R/unit.tests.R0000644000000000000000000000330312273213514012066 0ustar # Copyright (C) 2010 - 2014 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 . test <- function(output=if(file.exists("/tmp")) "/tmp" else getwd()) { if (require(RUnit)) { testSuite <- defineTestSuite(name="Rcpp Unit Tests", dirs=system.file("unitTests", package = "Rcpp"), testFuncRegexp = "^[Tt]est.+") ## if someoone calls Rcpp::test(), he/she wants all tests Sys.setenv("RunAllRcppTests"="yes") ## Run tests tests <- runTestSuite(testSuite) ## Print results printTextProtocol(tests) return(tests) } stop("Running unit tests requires the 'RUnit' package.") } unitTestSetup <- function(file, packages=NULL, pathToRcppTests=system.file("unitTests", package = "Rcpp")) { function() { if (! is.null(packages)) { for (p in packages) { suppressMessages(require(p, character.only=TRUE)) } } sourceCpp(file.path(pathToRcppTests, "cpp", file)) } } rcpp-0.11.0/R/loadRcppModules.R0000644000000000000000000000425712253723677013072 0ustar # Copyright (C) 2010 - 2012 John Chambers, 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 . loadRcppModules <- function(direct=TRUE){ ## hunt for the namespace of the package that calls this calls <- sys.calls() w <- which( sapply( calls, function(call){ identical( call[[1L]], as.name( "runHook" ) ) } ) ) if( !length(w) ) stop( "loadRcppModules can only be used within a .onLoad function" ) w <- w[ length(w) ] call <- calls[[w]] if( !identical( call[[2L]], ".onLoad" ) ) stop( "loadRcppModules can only be used within a .onLoad function" ) f <- sys.frame( w ) ns <- get("env", f ) if( !isNamespace( ns ) ) stop( "loadRcppModules not called from a namespace" ) pkg <- get( "pkgname", f ) lib <- get( "libname", f ) ## look for declared modules in the DESCRIPTION fields description <- packageDescription(pkg, lib.loc=lib) modules <- description[["RcppModules"]] if( !is.null( modules ) ){ modules <- strsplit( modules, "[[:space:]]*,[[:space:]]*")[[1L]] for( m in modules ){ tryCatch( { mod <- Module( m, pkg, mustStart = TRUE) if(isTRUE(direct)){ populate( mod, ns ) } else { forceAssignInNamespace( m, mod, ns ) } assign(.moduleMetaName(m), mod, envir = ns) }, error = function(e){ stop( sprintf( "failed to load module %s from package %s\n%s", m, pkg, conditionMessage(e) ) ) }) } } } rcpp-0.11.0/R/bib.R0000644000000000000000000000145112253723677010522 0ustar # Copyright (C) 2010 - 2012 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 . bib <- function() { sub("\\.bib$", "", system.file( "doc", "Rcpp.bib", package = "Rcpp" ) ) } rcpp-0.11.0/R/03_prompt.R0000644000000000000000000000447112253723677011616 0ustar # Copyright (C) 2010 - 2011 John Chambers, 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 . setGeneric( "functions", function(object, ...) standardGeneric( "functions" ) ) setMethod( "functions", "Module", function(object, ...){ pointer <- .getModulePointer(object) if(identical(pointer, .badModulePointer)) stop(gettextf("Module \"%s\" has not been intialized: try Module(object)", get("moduleName", envir = as.environment(object))), domain = NA) else .Call( Module__functions_arity, pointer ) } ) setGeneric( "prompt" ) setMethod( "prompt", "Module", function(object, filename = NULL, name = NULL, ...){ lines <- readLines( system.file( "prompt", "module.Rd", package = "Rcpp" ) ) pointer <- .getModulePointer(object) if( is.null(name) ) name <- .Call( Module__name, pointer ) if( is.null(filename) ) filename <- sprintf( "%s-module.Rd", name ) lines <- gsub( "NAME", name, lines ) info <- functions( object ) f.txt <- if( length( info ) ){ sprintf( "functions: \\\\describe{ %s }", paste( sprintf( " \\\\item{%s}{ ~~ description of function %s ~~ }", names(info), names(info) ), collapse = "\n" ) ) } else { "" } lines <- sub( "FUNCTIONS", f.txt, lines ) ## at this point functions() would have failed if the ## pointer in object was not valid classes <- .Call( Module__classes_info, pointer ) c.txt <- if( length( classes ) ){ sprintf( "classes: \\\\describe{ %s }", paste( sprintf( " \\\\item{%s}{ ~~ description of class %s ~~ }", names(classes), names(classes) ), collapse = "\n" ) ) } else { "" } lines <- sub( "CLASSES", c.txt, lines ) writeLines( lines, filename ) invisible(NULL) } ) rcpp-0.11.0/R/Attributes.R0000644000000000000000000007636312273452010012110 0ustar # Copyright (C) 2012 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 . # Source C++ code from a file sourceCpp <- function(file = "", code = NULL, env = globalenv(), embeddedR = TRUE, rebuild = FALSE, showOutput = verbose, verbose = getOption("verbose")) { # resolve code into a file if necessary. also track the working # directory to source the R embedded code chunk within if (!missing(code)) { rWorkingDir <- getwd() file <- tempfile(fileext = ".cpp") con <- file(file, open = "w") writeLines(code, con) close(con) } else { rWorkingDir <- dirname(file) } # resolve the file path file <- normalizePath(file, winslash = "/") # error if the file extension isn't one supported by R CMD SHLIB if (! tools::file_ext(file) %in% c("cc", "cpp")) { stop("The filename '", basename(file), "' does not have an ", "extension of .cc or .cpp so cannot be compiled.") } # validate that there are no spaces in the path on windows if (.Platform$OS.type == "windows") { if (grepl(' ', basename(file), fixed=TRUE)) { stop("The filename '", basename(file), "' contains spaces. This ", "is not permitted.") } } # get the context (does code generation as necessary) context <- .Call("sourceCppContext", PACKAGE="Rcpp", file, code, rebuild, .Platform) # perform a build if necessary if (context$buildRequired || rebuild) { # print output for verbose mode if (verbose) .printVerboseOutput(context) # variables used to hold completed state (passed to completed hook) succeeded <- FALSE output <- NULL # build dependency list depends <- .getSourceCppDependencies(context$depends, file) # validate packages (error if package not found) .validatePackages(depends, context$cppSourceFilename) # temporarily modify environment for the build envRestore <- .setupBuildEnvironment(depends, context$plugins, file) # temporarily setwd to build directory cwd <- getwd() setwd(context$buildDirectory) # call the onBuild hook. note that this hook should always be called # after .setupBuildEnvironment so subscribers are able to examine # the build environment fromCode <- !missing(code) if (!.callBuildHook(context$cppSourcePath, fromCode, showOutput)) { .restoreEnvironment(envRestore) setwd(cwd) return (invisible(NULL)) } # on.exit handler calls hook and restores environment and working dir on.exit({ if (!succeeded) .showBuildFailureDiagnostics() .callBuildCompleteHook(succeeded, output) setwd(cwd) .restoreEnvironment(envRestore) }) # unload and delete existing dylib if necessary if (file.exists(context$previousDynlibPath)) { try(silent=T, dyn.unload(context$previousDynlibPath)) file.remove(context$previousDynlibPath) } # prepare the command (output if we are in showOutput mode) cmd <- paste(R.home(component="bin"), .Platform$file.sep, "R ", "CMD SHLIB ", "-o ", shQuote(context$dynlibFilename), " ", ifelse(rebuild, "--preclean ", ""), shQuote(context$cppSourceFilename), sep="") if (showOutput) cat(cmd, "\n") # execute the build -- suppressWarnings b/c when showOutput = FALSE # we are going to explicitly check for an error and print the output result <- suppressWarnings(system(cmd, intern = !showOutput)) # check build results if(!showOutput) { # capture output output <- result attributes(output) <- NULL # examine status status <- attr(result, "status") if (!is.null(status)) { cat(result, "\n") succeeded <- FALSE stop("Error ", status, " occurred building shared library.") } else if (!file.exists(context$dynlibFilename)) { cat(result, "\n") succeeded <- FALSE stop("Error occurred building shared library.") } else { succeeded <- TRUE } } else if (!identical(as.character(result), "0")) { succeeded <- FALSE stop("Error ", result, " occurred building shared library.") } else { succeeded <- TRUE } } else { if (verbose) cat("\nNo rebuild required (use rebuild = TRUE to ", "force a rebuild)\n\n", sep="") } # load the module if we have exported symbols if (length(context$exportedFunctions) > 0 || length(context$modules) > 0) { # remove existing objects of the same name from the environment exports <- c(context$exportedFunctions, context$modules) removeObjs <- exports[exports %in% ls(envir = env, all.names = T)] remove(list = removeObjs, envir = env) # source the R script scriptPath <- file.path(context$buildDirectory, context$rSourceFilename) source(scriptPath, local = env) } else if (getOption("rcpp.warnNoExports", default=TRUE)) { warning("No Rcpp::export attributes or RCPP_MODULE declarations ", "found in source") } # source the embeddedR if (embeddedR && (length(context$embeddedR) > 0)) { srcConn <- textConnection(context$embeddedR) setwd(rWorkingDir) # will be reset by previous on.exit handler source(file=srcConn, echo=TRUE) } # return (invisibly) a list containing exported functions and modules invisible(list(functions = context$exportedFunctions, modules = context$modules)) } # Define a single C++ function cppFunction <- function(code, depends = character(), plugins = character(), includes = character(), env = parent.frame(), rebuild = FALSE, showOutput = verbose, verbose = getOption("verbose")) { # process depends if (!is.null(depends) && length(depends) > 0) { depends <- paste(depends, sep=", ") scaffolding <- paste("// [[Rcpp::depends(", depends, ")]]", sep="") scaffolding <- c(scaffolding, "", .linkingToIncludes(depends, FALSE), recursive=TRUE) } else { scaffolding <- "#include " } # process plugins if (!is.null(plugins) && length(plugins) > 0) { plugins <- paste(plugins, sep=", ") pluginsAttrib <- paste("// [[Rcpp::plugins(", plugins, ")]]", sep="") scaffolding <- c(scaffolding, pluginsAttrib) # append plugin includes for (pluginName in plugins) { plugin <- .findPlugin(pluginName) settings <- plugin() scaffolding <- c(scaffolding, settings$includes, recursive=TRUE) } } # remainder of scaffolding scaffolding <- c(scaffolding, "", "using namespace Rcpp;", "", includes, "// [[Rcpp::export]]", recursive = T) # prepend scaffolding to code code <- paste(c(scaffolding, code, recursive = T), collapse="\n") # print the generated code if we are in verbose mode if (verbose) { cat("\nGenerated code for function definition:", "\n--------------------------------------------------------\n\n") cat(code) cat("\n") } # source cpp into specified environment. if env is set to NULL # then create a new one (the caller can get a hold of the function # via the return value) if (is.null(env)) env <- new.env() exported <- sourceCpp(code = code, env = env, rebuild = rebuild, showOutput = showOutput, verbose = verbose) # verify that a single function was exported and return it if (length(exported$functions) == 0) stop("No function definition found") else if (length(exported$functions) > 1) stop("More than one function definition") else { functionName <- exported$functions[[1]] invisible(get(functionName, env)) } } .type_manipulate <- function( what = "DEMANGLE", class = NULL ) { function( type = "int", ... ){ code <- sprintf( ' SEXP manipulate_this_type(){ typedef %s type ; return wrap( %s(type) ) ; }', type, what ) dots <- list( code, ... ) dots[["env"]] <- environment() manipulate_this_type <- do.call( cppFunction, dots ) res <- manipulate_this_type() if( ! is.null(class) ){ class(res) <- class } res } } demangle <- .type_manipulate( "DEMANGLE" ) sizeof <- .type_manipulate( "sizeof", "bytes" ) print.bytes <- function( x, ...){ writeLines( sprintf( "%d bytes (%d bits)", x, 8 * x ) ) invisible( x ) } # Evaluate a simple c++ expression evalCpp <- function(code, depends = character(), includes = character(), rebuild = FALSE, showOutput = verbose, verbose = getOption( "verbose" ) ){ code <- sprintf( "SEXP get_value(){ return wrap( %s ) ; }", code ) env <- new.env() cppFunction(code, depends = depends, includes = includes, env = env, rebuild = rebuild, showOutput = showOutput, verbose = verbose ) fun <- env[["get_value"]] fun() } areMacrosDefined <- function(names, depends = character(), includes = character(), rebuild = FALSE, showOutput = verbose, verbose = getOption( "verbose" ) ){ code <- sprintf( ' LogicalVector get_value(){ return LogicalVector::create( %s ) ; }', paste( sprintf( ' _["%s"] = #if defined(%s) true #else false #endif ', names, names ), collapse = ",\n" ) ) env <- new.env() cppFunction(code, depends = depends, includes = includes, env = env, rebuild = rebuild, showOutput = showOutput, verbose = verbose ) fun <- env[["get_value"]] fun() } # Scan the source files within a package for attributes and generate code # based on the attributes. compileAttributes <- function(pkgdir = ".", verbose = getOption("verbose")) { # verify this is a package and read the DESCRIPTION to get it's name pkgdir <- normalizePath(pkgdir, winslash = "/") descFile <- file.path(pkgdir,"DESCRIPTION") if (!file.exists(descFile)) stop("pkgdir must refer to the directory containing an R package") pkgDesc <- read.dcf(descFile)[1,] pkgname = .readPkgDescField(pkgDesc, "Package") depends <- .readPkgDescField(pkgDesc, "Depends", character()) depends <- unique(.splitDepends(depends)) depends <- depends[depends != "R"] # determine source directory srcDir <- file.path(pkgdir, "src") if (!file.exists(srcDir)) return (FALSE) # create R directory if it doesn't already exist rDir <- file.path(pkgdir, "R") if (!file.exists(rDir)) dir.create(rDir) # get a list of all source files cppFiles <- list.files(srcDir, pattern="\\.c(c|pp)$") # derive base names (will be used for modules) cppFileBasenames <- tools::file_path_sans_ext(cppFiles) # expend them to their full paths cppFiles <- file.path(srcDir, cppFiles) cppFiles <- normalizePath(cppFiles, winslash = "/") # generate the includes list based on LinkingTo. Specify plugins-only # because we only need as/wrap declarations linkingTo <- .readPkgDescField(pkgDesc, "LinkingTo") includes <- .linkingToIncludes(linkingTo, TRUE) # if a master include file is defined for the package then include it pkgHeader <- paste(pkgname, ".h", sep="") pkgHeaderPath <- file.path(pkgdir, "inst", "include", pkgHeader) if (file.exists(pkgHeaderPath)) { pkgInclude <- paste("#include \"../inst/include/", pkgHeader, "\"", sep="") includes <- c(pkgInclude, includes) } # generate exports invisible(.Call("compileAttributes", PACKAGE="Rcpp", pkgdir, pkgname, depends, cppFiles, cppFileBasenames, includes, verbose, .Platform)) } # setup plugins environment .plugins <- new.env() # built-in C++11 plugin .plugins[["cpp11"]] <- function() { list(env = list(PKG_CXXFLAGS ="-std=c++11")) } ## built-in OpenMP++11 plugin .plugins[["openmp"]] <- function() { list(env = list(PKG_CXXFLAGS="-fopenmp", PKG_LIBS="-fopenmp")) } # register a plugin registerPlugin <- function(name, plugin) { .plugins[[name]] <- plugin } # Take an empty function body and connect it to the specified external symbol sourceCppFunction <- function(func, isVoid, dll, symbol) { args <- names(formals(func)) body <- quote( CALL_PLACEHOLDER ( EXTERNALNAME, ARG ) )[ c(1:2, rep(3, length(args))) ] for (i in seq(along = args)) body[[i+2]] <- as.symbol(args[i]) body[[1L]] <- .Call body[[2L]] <- getNativeSymbolInfo(symbol, dll)$address if (isVoid) body <- call("invisible", body) body(func) <- body func } # Print verbose output .printVerboseOutput <- function(context) { cat("\nGenerated extern \"C\" functions", "\n--------------------------------------------------------\n") cat(context$generatedCpp, sep="") cat("\nGenerated R functions", "\n-------------------------------------------------------\n\n") cat(readLines(file.path(context$buildDirectory, context$rSourceFilename)), sep="\n") cat("\nBuilding shared library", "\n--------------------------------------------------------\n", "\nDIR: ", context$buildDirectory, "\n\n", sep="") } # Add LinkingTo dependencies if the sourceFile is in a package .getSourceCppDependencies <- function(depends, sourceFile) { # If the source file is in a package then simulate it being built # within the package by including it's LinkingTo dependencies, # the src directory (.), and the inst/include directory if (.isPackageSourceFile(sourceFile)) { descFile <- file.path(dirname(sourceFile), "..", "DESCRIPTION") DESCRIPTION <- read.dcf(descFile, all = TRUE) linkingTo <- .parseLinkingTo(DESCRIPTION$LinkingTo) unique(c(depends, linkingTo)) } else { depends } } # Check whether a source file is in a package .isPackageSourceFile <- function(sourceFile) { file.exists(file.path(dirname(sourceFile), "..", "DESCRIPTION")) } # Error if a package is not currently available .validatePackages <- function(depends, sourceFilename) { unavailable <- depends[!depends %in% .packages(all.available=TRUE)] if (length(unavailable) > 0) { stop(paste("Package '", unavailable[[1]], "' referenced from ", "Rcpp::depends in source file ", sourceFilename, " is not available.", sep=""), call. = FALSE) } } # Split the depends field of a package description .splitDepends <- function(x) { if (!length(x)) return(character()) x <- unlist(strsplit(x, ",")) x <- sub("[[:space:]]+$", "", x) x <- unique(sub("^[[:space:]]*(.*)", "\\1", x)) sub("^([[:alnum:].]+).*$", "\\1", x) } # read a field from a named package description character vector .readPkgDescField <- function(pkgDesc, name, default = NULL) { if (name %in% names(pkgDesc)) pkgDesc[[name]] else default } # Get the inline plugin for the specified package (return NULL if none found) .getInlinePlugin <- function(package) { tryCatch(get("inlineCxxPlugin", asNamespace(package)), error = function(e) NULL) } # Lookup a plugin .findPlugin <- function(pluginName) { plugin <- .plugins[[pluginName]] if (is.null(plugin)) stop("Inline plugin '", pluginName, "' could not be found ", "within the Rcpp package. You should be ", "sure to call registerPlugin before using a plugin.") return(plugin) } # Setup the build environment based on the specified dependencies. Returns an # opaque object that can be passed to .restoreEnvironment to reverse whatever # changes that were made .setupBuildEnvironment <- function(depends, plugins, sourceFile) { # setup buildEnv <- list() linkingToPackages <- c("Rcpp") # merge values into the buildEnv mergeIntoBuildEnv <- function(name, value) { # protect against null or empty string if (is.null(value) || !nzchar(value)) return; # if it doesn't exist already just set it if (is.null(buildEnv[[name]])) { buildEnv[[name]] <<- value } # if it's not identical then append else if (!identical(buildEnv[[name]], value)) { buildEnv[[name]] <<- paste(buildEnv[[name]], value); } else { # it already exists and it's the same value, this # likely means it's a flag-type variable so we # do nothing rather than appending it } } # update dependencies from a plugin setDependenciesFromPlugin <- function(plugin) { # get the plugin settings settings <- plugin() # merge environment variables pluginEnv <- settings$env for (name in names(pluginEnv)) { mergeIntoBuildEnv(name, pluginEnv[[name]]) } # capture any LinkingTo elements defined by the plugin linkingToPackages <<- unique(c(linkingToPackages, settings$LinkingTo)) } # add packages to linkingTo and introspect for plugins for (package in depends) { # add a LinkingTo for this package linkingToPackages <- unique(c(linkingToPackages, package)) # see if the package exports a plugin plugin <- .getInlinePlugin(package) if (!is.null(plugin)) setDependenciesFromPlugin(plugin) } # process plugins for (pluginName in plugins) { plugin <- .findPlugin(pluginName) setDependenciesFromPlugin(plugin) } # if there is no buildEnv from a plugin then use the Rcpp plugin if (length(buildEnv) == 0) { buildEnv <- inlineCxxPlugin()$env } # set CLINK_CPPFLAGS based on the LinkingTo dependencies buildEnv$CLINK_CPPFLAGS <- .buildClinkCppFlags(linkingToPackages) # if the source file is in a package then add src and inst/include if (.isPackageSourceFile(sourceFile)) { srcDir <- dirname(sourceFile) srcDir <- asBuildPath(srcDir) incDir <- file.path(dirname(sourceFile), "..", "inst", "include") incDir <- asBuildPath(incDir) dirFlags <- paste0('-I"', c(srcDir, incDir), '"', collapse=" ") buildEnv$CLINK_CPPFLAGS <- paste(buildEnv$CLINK_CPPFLAGS, dirFlags, collapse=" ") } # merge existing environment variables for (name in names(buildEnv)) mergeIntoBuildEnv(name, Sys.getenv(name)) # add cygwin message muffler buildEnv$CYGWIN = "nodosfilewarning" # on windows see if we need to add Rtools to the path # (don't do this for RStudio since it has it's own handling) if (identical(Sys.info()[['sysname']], "Windows") && !nzchar(Sys.getenv("RSTUDIO"))) { path <- .pathWithRtools() if (!is.null(path)) buildEnv$PATH <- path } # create restore list restore <- list() for (name in names(buildEnv)) restore[[name]] <- Sys.getenv(name, unset = NA) # set environment variables do.call(Sys.setenv, buildEnv) # return restore list return (restore) } # If we don't have the GNU toolchain already on the path then see if # we can find Rtools and add it to the path .pathWithRtools <- function() { # Only proceed if we don't have the required tools on the path hasRtools <- nzchar(Sys.which("ls.exe")) && nzchar(Sys.which("gcc.exe")) if (!hasRtools) { # Read the Rtools registry key key <- NULL try(key <- utils::readRegistry("SOFTWARE\\R-core\\Rtools", hive = "HLM", view = "32-bit"), silent = TRUE) # If we found the key examine it if (!is.null(key)) { # Check version -- we only support 2.15 and 2.16 right now ver <- key$`Current Version` if (identical("2.15", ver) || identical("2.16", ver) || identical("3.0", ver) || identical("3.1", ver)) { # See if the InstallPath leads to the expected directories rToolsPath <- key$`InstallPath` if (!is.null(rToolsPath)) { # Return modified PATH if execpted directories exist binPath <- file.path(rToolsPath, "bin", fsep="\\") gccPath <- file.path(rToolsPath, "gcc-4.6.3", "bin", fsep="\\") if (file.exists(binPath) && file.exists(gccPath)) return(paste(binPath, gccPath, Sys.getenv("PATH"), sep=.Platform$path.sep)) } } } } return(NULL) } # Build CLINK_CPPFLAGS from include directories of LinkingTo packages .buildClinkCppFlags <- function(linkingToPackages) { pkgCxxFlags <- NULL for (package in linkingToPackages) { packagePath <- find.package(package, NULL, quiet=TRUE) packagePath <- asBuildPath(packagePath) pkgCxxFlags <- paste(pkgCxxFlags, paste0('-I"', packagePath, '/include"'), collapse=" ") } return (pkgCxxFlags) } .restoreEnvironment <- function(restore) { # variables to reset setVars <- restore[!is.na(restore)] if (length(setVars)) do.call(Sys.setenv, setVars) # variables to remove removeVars <- names(restore[is.na(restore)]) if (length(removeVars)) Sys.unsetenv(removeVars) } # Call the onBuild hook. This hook is provided so that external tools # can perform processing (e.g. lint checking or other diagnostics) prior # to the execution of a build). The showOutput flag is there to inform the # subscriber whether they'll be getting output in the onBuildComplete hook # or whether it will need to be scraped from the console (for verbose=TRUE) # The onBuild hook is always called from within the temporary build directory .callBuildHook <- function(file, fromCode, showOutput) { for (fun in .getHooksList("sourceCpp.onBuild")) { if (is.character(fun)) fun <- get(fun) # allow the hook to cancel the build (errors in the hook explicitly # do not cancel the build since they are unexpected bugs) continue <- tryCatch(fun(file, fromCode, showOutput), error = function(e) TRUE) if (!continue) return (FALSE) } return (TRUE) } # Call the onBuildComplete hook. This hook is provided so that external tools # can do analysis of build errors and (for example) present them in a # navigable list. Note that the output parameter will be NULL when showOutput # is TRUE. Tools can try to scrape the output from the console (in an # implemenentation-dependent fashion) or can simply not rely on output # processing in that case (since the user explicitly asked for output to be # printed to the console). The onBuildCompleted hook is always called within # the temporary build directory. .callBuildCompleteHook <- function(succeeded, output) { # Call the hooks in reverse order to align sequencing with onBuild for (fun in .getHooksList("sourceCpp.onBuildComplete")) { if (is.character(fun)) fun <- get(fun) try(fun(succeeded, output)) } } # The value for getHooks can be a single function or a list of functions, # This function ensures that the result can always be processed as a list .getHooksList <- function(name) { hooks <- getHook(name) if (!is.list(hooks)) hooks <- list(hooks) hooks } # Generate list of includes based on LinkingTo. The pluginsOnly parameter # to distinguish the case of capturing all includes needed for a compiliation # (e.g. cppFunction) verses only needing to capture as/wrap converters which # is the case for generation of shims (RcppExports.cpp) and Rcpp::interfaces # package header files. .linkingToIncludes <- function(linkingTo, pluginsOnly) { # This field can be NULL or empty -- in that case just return Rcpp.h if (is.null(linkingTo) || !nzchar(linkingTo)) return (c("#include ")) # Look for Rcpp inline plugins within the list or LinkedTo packages include.before <- character() include.after <- character() linkingToPackages <- .parseLinkingTo(linkingTo) for (package in linkingToPackages) { # We already handle Rcpp internally if (identical(package, "Rcpp")) next # see if there is a plugin that we can extract includes from plugin <- .getInlinePlugin(package) if (!is.null(plugin)) { includes <- .pluginIncludes(plugin) if (!is.null(includes)) { include.before <- c(include.before, includes$before) include.after <- c(include.after, includes$after) } } # otherwise check for standard Rcpp::interfaces generated include else if (!pluginsOnly) { pkgPath <- find.package(package, NULL, quiet=TRUE) pkgHeader <- paste(package, ".h", sep="") pkgHeaderPath <- file.path(pkgPath, "include", pkgHeader) if (file.exists(pkgHeaderPath)) { pkgInclude <- paste("#include <", pkgHeader, ">", sep="") include.after <- c(include.after, pkgInclude) } } } # return the includes c(include.before, "#include ", include.after) } # Analyze the plugin's includes field to determine include.before and # include.after. We are ONLY interested in plugins that work with Rcpp since # the only types we need from includes are as/wrap marshallers. Therefore, # we verify that the plugin was created using Rcpp.plugin.maker and then # use that assumption to correctly extract include.before and include.after .pluginIncludes <- function(plugin) { # First determine the standard suffix of an Rcpp plugin by calling # Rcpp.plugin.maker. If the plugin$includes has this suffix we know # it's an Rcpp plugin token <- "include_after_token" stockRcppPlugin <- Rcpp.plugin.maker(include.after=token) includes <- stockRcppPlugin()$includes suffix <- strsplit(includes, token)[[1]][[2]] # now ask the plugin for it's includes, ensure that the plugin includes # are not null, and verify they have the Rcpp suffix before proceeding pluginIncludes <- plugin()$includes if (is.null(pluginIncludes)) return (NULL) if (!grepl(suffix, pluginIncludes)) return (NULL) # strip the suffix then split on stock Rcpp include to get before and after pluginIncludes <- strsplit(pluginIncludes, suffix)[[1]][[1]] pluginIncludes <- strsplit(pluginIncludes, c("#include "))[[1]] # extract before and after and nix empty lines before <- pluginIncludes[[1]] before <- strsplit(before, "\n")[[1]] before <- before[nzchar(before)] after <- pluginIncludes[[2]] after <- strsplit(after, "\n")[[1]] after <- after[nzchar(after)] # return before and after list(before = before, after = after) } # Parse a LinkingTo field into a character vector .parseLinkingTo <- function(linkingTo) { if (is.null(linkingTo)) return (character()) linkingTo <- strsplit(linkingTo, "\\s*\\,")[[1]] gsub("\\s", "", linkingTo) } # show diagnostics for failed builds .showBuildFailureDiagnostics <- function() { # RStudio does it's own diagnostics so only do this for other environments if (nzchar(Sys.getenv("RSTUDIO"))) return(); # if we can't call R CMD SHLIB then notify the user they should # install the appropriate development tools if (!.checkDevelTools()) { msg <- paste("\nWARNING: The tools required to build C++ code for R ", "were not found.\n\n", sep="") sysName <- Sys.info()[['sysname']] if (identical(sysName, "Windows")) { msg <- paste(msg, "Please download and install the appropriate ", "version of Rtools:\n\n", "http://cran.r-project.org/bin/windows/Rtools/\n", sep=""); } else if (identical(sysName, "Darwin")) { msg <- paste(msg, "Please install Command Line Tools for XCode ", "(or equivalent).\n", sep="") } else { msg <- paste(msg, "Please install GNU development tools ", "including a C++ compiler.\n", sep="") } message(msg) } } # check if R development tools are installed (cache successful result) .hasDevelTools <- FALSE .checkDevelTools <- function() { if (!.hasDevelTools) { # create temp source file tempFile <- file.path(tempdir(), "foo.c") cat("void foo() {}\n", file = tempFile) on.exit(unlink(tempFile)) # set working directory to tempdir (revert on exit) oldDir <- setwd(tempdir()) on.exit(setwd(oldDir), add = TRUE) # attempt the compilation and note whether we succeed cmd <- paste(R.home(component="bin"), .Platform$file.sep, "R ", "CMD SHLIB foo.c", sep = "") result <- suppressWarnings(system(cmd, ignore.stderr = TRUE, intern = TRUE)) assignInMyNamespace(".hasDevelTools", is.null(attr(result, "status"))) # if we build successfully then remove the shared library if (.hasDevelTools) { lib <- file.path(tempdir(), paste("foo", .Platform$dynlib.ext, sep='')) unlink(lib) } } .hasDevelTools } rcpp-0.11.0/R/exposeClass.R0000644000000000000000000001622112253723677012260 0ustar .stdHeader <- c( "#include ", "using namespace Rcpp ;" ) .asString <- function(what) if(is.character(what)) what else deparse(what) .strings <- function(expr) { if(is.call(expr) && ! identical(expr[[1]], quote(`::`))) lapply(as.list(expr)[-1], .strings) else .asString(expr) } .specifyItems <- function(what) { what <- as.list(what) wn <- allNames(what) simple <- !nzchar(wn) ## todo: error checking here that unnamed elements are single strings wn[simple] <- as.character(what[simple]) names(what) <- wn what[simple] <- list(character()) what } .writeFieldFunction <- function(fldi, typei, CppClass, readOnly, ns, con){ rootName <- paste0("field_", fldi) writeLines(sprintf(" %s %s_get(%s *obj) { return obj->%s; }\n", typei, rootName, CppClass, fldi), con) value <- "_get" if(!readOnly) { writeLines(sprintf(" void %s_set(%s *obj, %s value) { obj->%s = value; }\n", rootName, CppClass, typei, fldi), con) value <- c(value, "_set") } paste0(ns, "::field_", fldi, value) } .writeMethodFunction <- function(mdi, sigi, CppClass, ns, con) { mName <- paste0("method_", mdi) if(length(sigi) < 1) stop(gettextf("The type signature for method %s for class %s was of length 0: Must at least include the return type", mdi, CppClass)) rtnType <- sigi[[1]] sigi <- sigi[-1] if(length(sigi)) { argNames <- paste0("a", seq_along(sigi)) args <- paste(" ,", paste(sigi, argNames, collapse = ", ")) } else argNames <- args <- "" writeLines(sprintf(" %s %s(%s *obj%s){ return obj->%s(%s); }\n", rtnType, mName, CppClass, args, mdi, argNames), con) paste0(ns, "::",mName) } exposeClass <- function(class, constructors, fields, methods, file = paste0(CppClass, "Module.cpp"), header = character(), module = paste0("class_",class), CppClass = class, readOnly = character(), rename = character(), Rfile = TRUE) { ## some argument checks ## TODO: checks on constructors, fields, methods if(length(readOnly)) { readOnly <- as.character(readOnly) if(!all(nzchar(readOnly))) stop("argument readOnly should be a vector of non-empty strings") } newnames <- allNames(rename) if(length(rename)) { if(!all(sapply(rename, function(x) is.character(x) && length(x) == 1 && nzchar(x)))) stop("argument rename should be a vector of single, non-empty strings") if(!all(nzchar(newnames))) stop("all the elements of argument rename should be non-empty strings") } if(is.character(file)) { ## are we in a package directory? Writable, searchable src subdirectory: if(file.access("src",3)==0) cfile <- file.path("src", file) else cfile <- file con <- file(cfile, "w") on.exit({message(sprintf("Wrote C++ file \"%s\"", cfile)); close(con)}) } else con <- file ## and for the R code: if(identical(Rfile, FALSE)) {} else { if(identical(Rfile, TRUE)) Rfile <- sprintf("%sClass.R",class) if(is.character(Rfile)) { if(file.access("R",3)==0) # in a package directory Rfile <- file.path("R", Rfile) Rcon <- file(Rfile, "w") msg <- sprintf("Wrote R file \"%s\"",Rfile) on.exit({message(msg); close(Rcon)}, add = TRUE) } else Rcon <- Rfile Rfile <- TRUE } mfile <- tempfile() mcon <- file(mfile, "w") writeLines(.stdHeader, con) if(length(header)) writeLines(header, con) writeLines(c("", sprintf("RCPP_MODULE(%s) {\n",module), ""), mcon) writeLines(sprintf(" class_<%s>(\"%s\")\n", CppClass, class), mcon) ## the constructors argument defines a list of vectors of types for( cons in constructors) { if(length(cons) > 1 || (length(cons) == 1 && nzchar(cons) && !identical(cons, "void"))) cons <- paste0("<", paste(cons, collapse = ","),">") else cons = "" writeLines(paste0(" .constructor",cons,"()"),mcon) } writeLines("", mcon) flds <- .specifyItems(fields) nm <- names(flds) rdOnly <- nm %in% readOnly macros <- ifelse(rdOnly, ".field_readonly", ".field") test <- nm %in% rename if(any(test)) nm[test] <- newnames[match(nm[test], newnames)] ns <- NULL for(i in seq_along(nm)) { typei <- flds[[i]] nmi <- fldi <- nm[[i]] macroi <- macros[[i]] if(!length(typei) || identical(typei, "")) ## direct field writeLines(sprintf(" %s(\"%s\", &%s::%s)", macroi, nmi, CppClass, fldi), mcon) else { # create a free function, e.g. for an inherited field if(is.null(ns)) { # enclose in a namespace ns <- paste("module",class,"NS", sep = "_") writeLines(sprintf("\nnamespace %s {\n", ns), con) } fldFuns <- .writeFieldFunction(fldi, typei, CppClass, rdOnly[[i]], ns, con) if(rdOnly[[i]]) ## NOTE: string 3rd arg. required by problem w. module parsing 10/3/13 writeLines(sprintf(" .property(\"%s\", &%s, \"read-only field\")", nmi, fldFuns[[1]]), mcon) else writeLines(sprintf(" .property(\"%s\", &%s, &%s)", nmi, fldFuns[[1]], fldFuns[[2]]), mcon) } } writeLines("", mcon) sigs <- .specifyItems(methods) nm <- mds <- names(sigs) test <- nm %in% rename if(any(test)) nm[test] <- newnames[match(nm[test], newnames)] for(i in seq_along(nm)) { sigi <- sigs[[i]] nmi <- nm[[i]] mdi <- mds[[i]] if(!length(sigi) || identical(sigi, "")) # direct method writeLines(sprintf(" .method(\"%s\", &%s::%s)", nmi, CppClass, mdi), mcon) else { # create a free function, e.g. for an inherited method if(is.null(ns)) { # enclose in a namespace ns <- paste("module",class,"NS", sep = "_") writeLines(sprintf("\nnamespace %s {\n", ns), con) } mFun <- .writeMethodFunction(mdi, sigi, CppClass, ns, con) writeLines(sprintf(" .method(\"%s\", &%s)", nmi, mFun), mcon) } } writeLines(" ;\n}", mcon) close(mcon) if(!is.null(ns)) writeLines(sprintf("} // %s", ns), con) # close namespace writeLines(readLines(mfile), con) if(Rfile) { if(missing(CppClass)) CppString <- "" else CppString <- paste(",",dQuote(CppClass)) if(missing(module)) ModString <- "" else ModString <- paste(", module =", dQuote(module)) writeLines(sprintf("%s <- setRcppClass(\"%s\"%s%s)", class, class, CppString,ModString), Rcon) } } rcpp-0.11.0/R/01_show.R0000644000000000000000000001012612253723677011245 0ustar # Copyright (C) 2010 - 2012 John Chambers, 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 . setMethod( "show", "C++Object", function(object){ env <- as.environment(object) pointer <- get(".pointer", envir = env) cppclass <- get(".cppclass", envir = env) txt <- sprintf( "C++ object <%s> of class '%s' <%s>", externalptr_address(pointer), .Call( Class__name, cppclass ), externalptr_address(cppclass) ) writeLines( txt ) } ) setMethod( "show", "C++Class", function(object){ doc <- object@docstring txt <- sprintf( "C++ class '%s' <%s>%s", .Call( Class__name, object@pointer ), externalptr_address(object@pointer), if( length(doc) && nchar(doc) ) sprintf( "\n docstring : %s", doc ) else "" ) writeLines( txt ) ctors <- object@constructors nctors <- length( ctors ) txt <- character( nctors ) for( i in seq_len(nctors) ){ ctor <- ctors[[i]] doc <- ctor$docstring txt[i] <- sprintf( " %s%s", ctor$signature, if( nchar(doc) ) sprintf( "\n docstring : %s", doc) else "" ) } writeLines( "Constructors:" ) writeLines( paste( txt, collapse = "\n" ) ) fields <- object@fields nfields <- length(fields) if( nfields ){ names <- names(fields) txt <- character(nfields) writeLines( "\nFields: " ) for( i in seq_len(nfields) ){ f <- fields[[i]] doc <- f$docstring txt[i] <- sprintf( " %s %s%s%s", f$cpp_class, names[i], if( f$read_only ) " [readonly]" else "", if( nchar(doc) ) sprintf( "\n docstring : %s", doc ) else "" ) } writeLines( paste( txt, collapse = "\n" ) ) } else { writeLines( "\nFields: No public fields exposed by this class" ) } mets <- object@methods nmethods <- length(mets) if( nmethods ){ writeLines( "\nMethods: " ) txt <- character( nmethods ) for( i in seq_len(nmethods) ){ txt[i] <- mets[[i]]$info(" ") } writeLines( paste( txt, collapse = "\n" ) ) } else { writeLines( "\nMethods: no methods exposed by this class" ) } } ) setMethod( "show", "C++Function", function(object){ txt <- sprintf( "internal C++ function <%s>", externalptr_address(object@pointer) ) writeLines( txt ) doc <- object@docstring if( length(doc) && nchar( doc ) ){ writeLines( sprintf( " docstring : %s", doc ) ) } sign <- object@signature if( length(sign) && nchar( sign ) ){ writeLines( sprintf( " signature : %s", sign ) ) } } ) setMethod( "show", "Module", function( object ){ pointer <- .getModulePointer(object, FALSE) if(identical(pointer, .badModulePointer)) { object <- as.environment(object) ## not needed when 2.12.0 arrives txt <- sprintf("Uninitialized module named \"%s\" from package \"%s\"", get("moduleName", envir = object), get("packageName", envir = object)) writeLines(txt) } else { info <- .Call( Module__functions_arity, pointer ) name <- .Call( Module__name, pointer ) txt <- sprintf( "Rcpp module '%s' \n\t%d functions: ", name, length(info) ) writeLines( txt ) txt <- sprintf( "%15s : %d arguments", names(info), info ) writeLines( txt ) info <- .Call( Module__classes_info, pointer ) txt <- sprintf( "\n\t%d classes : ", length(info) ) writeLines( txt ) txt <- sprintf( "%15s ", names(info) ) writeLines( txt ) } } ) rcpp-0.11.0/R/tools.R0000644000000000000000000000337612253723677011136 0ustar # Copyright (C) 2010 - 2012 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 . externalptr_address <- function(xp){ .Call( as_character_externalptr, xp ) } # just like assignInNamespace but first checks that the binding exists forceAssignInNamespace <- function( x, value, env ){ is_ns <- isNamespace( env ) unlocker <- get( "unlockBinding", baseenv() ) if( is_ns && exists( x, env ) && bindingIsLocked(x, env ) ){ unlocker( x, env ) } assign( x, value, env ) if( is_ns ){ lockBinding( x, env ) } } # Transform a path for passing to the build system on the command line. # Leave paths alone for posix. For Windows, mirror the behavior of the # R package build system by starting with the fully resolved absolute path, # transforming it to a short path name if it contains spaces, and then # converting backslashes to forward slashes asBuildPath <- function(path) { if (.Platform$OS.type == "windows") { path <- normalizePath(path) if (grepl(' ', path, fixed=TRUE)) path <- utils::shortPathName(path) path <- gsub("\\\\", "/", path) } return(path) } rcpp-0.11.0/R/exceptions.R0000644000000000000000000000144112253723677012146 0ustar # Copyright (C) 2009 - 2012 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 . .rcpp_error_recorder <- function(e){ invisible( .Call( rcpp_error_recorder, e ) ) } rcpp-0.11.0/R/inline.R0000644000000000000000000000301712253723677011244 0ustar # Copyright (C) 2009 - 2013 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 . Rcpp.plugin.maker <- function( include.before = "", include.after = "", LinkingTo = unique( c( package, "Rcpp" ) ), Depends = unique( c( package, "Rcpp" ) ), libs = "", Makevars = NULL , Makevars.win = NULL, package = "Rcpp" ){ function( ... ){ includes <- sprintf( "%s #include %s #ifndef BEGIN_RCPP #define BEGIN_RCPP #endif #ifndef END_RCPP #define END_RCPP #endif using namespace Rcpp; ", include.before, include.after ) out <- list( env = list( PKG_LIBS = libs ), includes = includes, LinkingTo = LinkingTo , body = function( x ){ sprintf( "BEGIN_RCPP\n%s\nEND_RCPP", x ) }, Depends = Depends ) if( !is.null(Makevars ) ) out$Makevars <- Makevars if( !is.null(Makevars.win ) ) out$Makevars.win <- Makevars.win out } } inlineCxxPlugin <- Rcpp.plugin.maker() rcpp-0.11.0/README.md0000644000000000000000000001026412273300210010673 0ustar Rcpp: Seamless R and C++ Integration ==================================== [![Build Status](https://travis-ci.org/RcppCore/Rcpp.png)](https://travis-ci.org/RcppCore/Rcpp) The [Rcpp package](http://cran.r-project.org/package=Rcpp) provides R functions as well as a C++ library which facilitate the integration of R and C++ R data types (`SEXP`) are matched to C++ objects in a class hierarchy. All R types are supported (vectors, functions, environment, etc ...) and each type is mapped to a dedicated class. For example, numeric vectors are represented as instances of the Rcpp::NumericVector class, environments are represented as instances of Rcpp::Environment, functions are represented as Rcpp::Function, etc ... The [Rcpp-introduction](http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-introduction.pdf) vignette (also published as a [JSS paper](http://www.jstatsoft.org/v40/i08/)) provides a good entry point to Rcpp as do the [Rcpp website](http://www.rcpp.org), the [Rcpp page](http://dirk.eddelbuettel.com/code/rcpp.html) and the [Rcpp Gallery](http://gallery.rcpp.org). Full documentation is provided by the [Rcpp book](http://www.rcpp.org/book/). Conversion from C++ to R and back is driven by the templates `Rcpp::wrap` and `Rcpp::as` which are highly flexible and extensible, as documented in the [Rcpp-extending](http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-extending.pdf) vignette. Rcpp also provides Rcpp modules, a framework that allows exposing C++ functions and classes to the R level. The [Rcpp-modules]((http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-modules.pdf) vignette details the current set of features of Rcpp-modules. Rcpp includes a concept called Rcpp sugar that brings many R functions into C++. Sugar takes advantage of lazy evaluation and expression templates to achieve great performance while exposing a syntax that is much nicer to use than the equivalent low-level loop code. The [Rcpp-sugar]((http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-sugar.pdf) gives an overview of the feature. Rcpp attributes provide a high-level syntax for declaring C++ functions as callable from R and automatically generating the code required to invoke them. Attributes are intended to facilitate both interactive use of C++ within R sessions as well as to support R package development. Attributes are built on top of Rcpp modules and their implementation is based on previous work in the inline package. See the [Rcpp-atttributes]((http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-attributes.pdf) vignettes for more details. ## Documentation The package ships with nine pdf vignettes. Additional documentation is available via the [JSS paper](http://www.jstatsoft.org/v40/i08/) by Eddelbuettel and Francois (2011, JSS) paper (corresponding to the 'intro' vignette) and the [book](http://www.rcpp.org/book) by Eddelbuettel (2013, Springer); see 'citation("Rcpp")' for details. ## Examples The [Rcpp Gallery](http://gallery.rcpp.org) showcases over 70 fully documented and working examples. A number of examples are included as are over 800 unit tests in over 400 unit test functions provide additional usage examples. The [CRAN](http://cran.r-project.org) network contains (as over early 2014) over 160 packages which also provide usage examples. An earlier version of Rcpp, containing what we now call the 'classic Rcpp API' was written during 2005 and 2006 by Dominick Samperi. This code has been factored out of Rcpp into the package RcppClassic, and it is still available for code relying on the older interface. New development should always use this Rcpp package instead. ## Installation Released and tested versions of Rcpp are available via the [CRAN](http://cran.r-project.org) network, and can be installed from within R via ```R install.packages("Rcpp") ``` To install from source, ensure you have a [complete package development environment](http://www.rstudio.com/ide/docs/packages/prerequisites). Also see questions 1.2 and 1.3 in the [Rcpp-FAQ](http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-FAQ.pdf). ## Authors Dirk Eddelbuettel, Romain Francois, JJ Allaire, Doug Bates, John Chamber and Kevin Ushey ## License GPL (>= 2) rcpp-0.11.0/build/0000755000000000000000000000000012273452733010532 5ustar rcpp-0.11.0/build/vignette.rds0000644000000000000000000000073112273452733013072 0ustar TMS0Oj^h) ެœ0ײ,rIJu1k&eY $609#ǹBcY٧a/jx}mCEfC$M-͋ZV8EbG|<,lbrdq:> UG tCđ1x1rcpp-0.11.0/ChangeLog0000644000000000000000000070551312273452447011222 0ustar 2014-02-02 Dirk Eddelbuettel * DESCRIPTION: Release 0.11.0 * inst/NEWS.Rd: Release 0.11.0 * inst/include/Rcpp/config.h: Release 0.11.0 * debian/*: Similarly updated for new release to Debian 2014-02-02 JJ Allaire * R/Attributes.R: Use placeholder for .Call to avoid warning 2014-02-01 Dirk Eddelbuettel * tests/doRUnit.R: Simplified following pattern in RProtoBuf * vignettes/Rcpp-unitTests.Rnw: Remove a now superfluous global var * vignettes/Rcpp.bib: Updated references to current packages 2014-02-01 JJ Allaire * R/Attributes.R: Embedded R code chunks in sourceCpp can now be disabled 2014-01-31 Dirk Eddelbuettel * vignettes/Rcpp-FAQ.Rnw: Render code with background boxen * vignettes/Rcpp-package.Rnw: Idem * vignettes/Rcpp-modules.Rnw: Idem * vignettes/Rcpp-extending.Rnw: Idem * vignettes/Rcpp-sugar.Rnw: Idem * vignettes/Rcpp-attributes.Rnw: Switched to highlight driver * inst/include/Rcpp/Benchmark/Timer.h: Reverted back to using iterators via use of anonymous namespace for accessors * inst/announce/ANNOUNCE-0.11.0.txt: Updated 2014-01-31 Dirk Eddelbuettel * man/Rcpp.package.skeleton.Rd: Also updated 2014-01-31 JJ Allaire * R/Attributes.R: Embedded R code chunks in sourceCpp are now executed within the working directory of the C++ source file. 2014-01-30 Dirk Eddelbuettel * vignettes/Rcpp-package.Rnw: Updates for upcoming release 2014-01-28 Dirk Eddelbuettel * vignettes/Rcpp-FAQ.Rnw: Some updates for upcoming release 2014-01-25 Dirk Eddelbuettel * inst/include/Rcpp/Benchmark/Timer.h: Simplified -- Rcpp Gallery example using it was not building any longer under g++ 2014-01-23 Dirk Eddelbuettel * inst/announce/ANNOUNCE-0.11.0.txt: Added for next release 2014-01-21 Dirk Eddelbuettel * R/Rcpp.package.skeleton.R: Update skeleton package to add proper Imports: to DESCRIPTION, and importFrom() to NAMESPACE 2014-01-19 Kevin Ushey * inst/include/Rcpp/api/meat/Vector.h: Add missing UNPROTECT in push_back_name__impl 2014-01-18 Kevin Ushey * inst/unitTests/runit.S4.R: Add a test for ctor from slot proxy * inst/unitTests/cpp/S4.cpp: Add a test for ctor from slot proxy * inst/include/Rcpp/vector/Vector.h: Add missing r_cast to vector ctor from proxy 2014-01-18 JJ Allaire * R/Attributes.R: More restrictive matching of C++ file extensions for compileAttributes. 2014-01-18 Kevin Ushey * inst/unitTests/cpp/Matrix.cpp: Add unit test * inst/unitTests/runit.Matrix.R: Add unit test * inst/include/Rcpp/api/meat/Matrix.h: Bug fix in operator= 2014-01-17 Dirk Eddelbuettel * R/RcppLdpath.R (RcppCxxFlags): Restore function to supply values for include files for packages not yet converted to LinkingTo: 2014-01-16 JJ Allaire * inst/include/Rcpp/macros/macros.h: Use Rf_onintr rather than non-public Rf_jump_to_toplevel * inst/include/Rcpp/DateVector.h: Fix GreedyVector compilation error * inst/include/Rcpp/DatetimeVector.h: Fix GreedyVector compilation error 2014-01-15 Dirk Eddelbuettel * inst/include/Rcpp/exceptions.h: Move stop() into Rcpp namespace 2014-01-03 JJ Allaire * .gitignore: Added src/, *.Rproj, and .Rproj.user * inst/include/Rcpp/Interrupt.h: New checkUserInterrupt function that provides a C++ friendly implementation of R_CheckUserInterrupt * inst/include/RcppCommon.h: Include Rcpp/Interrupts.h * inst/include/macros/macros.h: Check for interrupts in END_RCPP * src/attributes.cpp: Handle interrupted-error in attribute function envelope. 2013-12-31 Dirk Eddelbuettel * vignettes/Rcpp.bib: Updated CRAN package references 2013-12-20 Kevin Ushey * inst/include/Rcpp/sugar/tools/mapcompare.h: Use a union for type punning, to avoid compiler warning on aliasing. Also switch to uint64_t to enforce 64bit comparison. * inst/include/Rcpp/RObject.h: Add missing *this return for RObject_impl::operator= 2013-12-20 Dirk Eddelbuettel * inst/include/Rcpp/RObject.h: Applied fix by Kevin Ushey (#88) * inst/include/Rcpp/vector/Vector.h: Ditto (#89) 2013-12-01 Kevin Ushey * R/Rcpp.package.skeleton.R: Fixed bug relating to user-supplied functions in 'list' argument * inst/unitTests/runit.Rcpp.package.skeleton.R: Added unit tests 2013-11-30 Dirk Eddelbuettel * vignettes/Rcpp-FAQ.Rnw: Updated and corrected in several spots 2013-11-22 Dirk Eddelbuettel * inst/include/Rcpp/stats/nt.h: Correct expansion of (d|q|p)nt() * inst/unitTests/runit.stats.R: Added unit tests for t dist with ncp * inst/unitTests/cpp/stats.cpp: C++ side of expamded unit tests 2013-11-05 Dirk Eddelbuettel * .travis.yml: Added to support continuous integration on github 2013-10-28 Romain Francois * include/Rcpp/protection/Armor.h : Armor::operator SEXP has to be const for it to work properly with wrap. 2013-10-27 Dirk Eddelbuettel * DESCRIPTION: Release 0.10.6 * inst/NEWS.Rd: Release 0.10.6 * inst/include/Rcpp/config.h: Release 0.10.5 * debian/*: Similarly updated for new release to Debian 2013-10-17 JJ Allaire * R/Attributes.R: sourceCpp now correctly binds to Rtools 3.0 and 3.1 2013-10-16 Dirk Eddelbuettel * R/Rcpp.package.skeleton.R (Rcpp.package.skeleton): Deprecate namespace argument which package.skeleton() no longer uses * man/Rcpp.package.skeleton.Rd: Updated documentation accordingly 2013-10-16 Romain Francois * include/Rcpp/api/meat/is.h : added missing implementation for is and is 2013-10-14 Romain Francois * inst/include/Rcpp/protection/protection.h: added Shield/Shelter/Armor * DESCRIPTION: bump to version 0.10.5.3 2013-10-12 Dirk Eddelbuettel * DESCRIPTION (Depends): Rolled Depends: on R to "R (>= 3.0.0)" as required by the vignette building code (with thanks to Uwe Ligges) 2013-10-08 Dirk Eddelbuettel * NAMESPACE: Export LdFlags as well as RcppLdFlags * man/RcppLdFlags.Rd: Updated 2013-10-06 John M Chambers * R/exposeClass.R: avoid warning from unclosed file() 2013-10-06 John M Chambers * NAMESPACE: change classModule to exposeClass * R/classModule.R: delete * man/classModule.Rd: delete * R/exposeClass.R: add * man/exposeClass.Rd: add * man/setRcppClass.Rd: update, clarify, recommend exposeClass() 2013-10-03 John M Chambers * R/classModule.R: new function to write module file for class * man/classModule.Rd: documentation for new function classModule() * NAMESPACE: export classModule * R/loadModule.R: clean up an error message * R/RcppClass.R: defaults for module consistent w. classModule() * man/setRcppClass.Rd: add defaults, explain need for saveAs 2013-10-02 Dirk Eddelbuettel * inst/include/Rcpp/traits/is_na.h: More fixes thanks to Thomas Tse 2013-10-01 Dirk Eddelbuettel * inst/include/Rcpp/api/meat/is.h: Applied patch by Thomas Tse to provide missing Character(Vector|Matrix) * DESCRIPTION: Bump to development release 0.10.5.1 2013-09-28 Dirk Eddelbuettel * DESCRIPTION: Release 0.10.5 * inst/NEWS.Rd: Release 0.10.5 * inst/include/Rcpp/config.h: Release 0.10.5 * debian/*: Similarly updated for new release to Debian * vignettes/Rcpp-unitTests.Rnw: Switched to Charter font just like the other eight vignettes 2013-09-28 Romain Francois * include/Rcpp/module/Module_generated_CppMethod.h : more code bloat to handle flexible semantics for passing parameters in methods * include/Rcpp/module/Module_generated_Pointer_CppMethod.h : same * inst/unitTests/cpp/Module.cpp: testing the above * unitTests/runit.Module.R: testing 2013-09-27 Dirk Eddelbuettel * vignettes/Rcpp-unitTests.Rnw: Re-activated vignette * DESCRIPTION: Version number bumped to 0.10.4.6 2013-09-27 Romain Francois * include/Rcpp/module/Module_generated_CppFunction.h : regenerated to use input_parameter traits for more flexible parameter passing strategy * unitTests/cpp/Module.cpp : more testing * unitTests/runit.Module.R : more testing 2013-09-22 Dirk Eddelbuettel * inst/include/Rcpp/sugar/functions/diff.h: Declare set_previous const and add a missing traits:: prefix before is_na * inst/unitTests/cpp/sugar.cpp: Unit test for diff() of int. vector * inst/unitTests/runit.sugar.R: Invoke new test 2013-09-21 Dirk Eddelbuettel * vignettes/Rcpp-modules.Rnw: Remove vignette-local compilations which again caused problems for the Windows builds at R-Forge and win-builder. Unit tests comprise the same functionality and pass. * vignettes/Rcpp-attributes.Rnw: Refresh look by using Bitstream Charter, and microtype package (cf http://www.khirevich.com/latex) * vignettes/Rcpp-extending.Rnw: Idem * vignettes/Rcpp-FAQ.Rnw: Idem * vignettes/Rcpp-modules.Rnw: Idem * vignettes/Rcpp-package.Rnw: Idem * vignettes/Rcpp-quickref.Rnw: Idem * vignettes/Rcpp-sugar.Rnw: Idem 2013-09-20 Dirk Eddelbuettel * R/Module.R: More ':::' cleanups to make R CMD check happy * R/RcppClass.R: Ditto * NAMESPACE: Some new exports related to this * man/setRcppClass.Rd: Document loadRcppClass() * man/Rcpp-internal.Rd: Added in order to document cpp_object_initializer() and cpp_object_dummy() 2013-09-19 Dirk Eddelbuettel * inst/include/Rcpp/longlong.h: Unbreak long long by making it (as before) conditional on g++ (or clang) as well as C++11. The condition can be OR'ed with another suitably-defined variable, but the default has to be off as CRAN compliance has to remain the standard 2013-09-19 Romain Francois * include/Rcpp/longlong.h: isolate all handling of long long in a separate file which we might choose not to include by default * include/Rcpp/traits/r_sexptype_traits.h : unsigned int wrapped as REALSXP long standing feature request from Murray. * R/Attributes.R : Added the helper demangle and sizeof functions * man/demangle.Rd : Documentation for demangle and sizeof * include/Rcpp/platform/compiler.h : less restritive support of long long types. But still behind a test for gcc and a test for the availability of the type, and the __extension__. -pedantic does not warn about it 2013-09-18 JJ Allaire * R/Attributes.R: Don't search the inline package as a fallback when loading plugins for the the Rcpp::plugins attribute 2013-09-18 Romain Francois * vignettes/Rcpp-package.Rnw: Updating the vignette. Setting attributes to TRUE by default. * R/Rcpp.package.skeleton.R: Setting attributes to TRUE by default. This is what we should encourage people to use. * include/Rcpp/as.h: add as specialization * include/Rcpp/sugar/functions/diff.h : rework the implementation of diff so that it works even when we don't know the previous value * unitTests/runit.sugar.R : * unitTests/cpp/sugar.cpp : * include/Rcpp/sugar/functions/range.h : factored out of minmax.h * include/Rcpp/sugar/functions/min.h : factored out of minmax.h * include/Rcpp/sugar/functions/max.h : factored out of minmax.h * TODO : 3 less items 2013-09-17 JJ Allaire * R/Attributes.R: Call inlineCxxPlugin and Rcpp.plugin.maker without qualification rather than with ':::' 2013-09-17 Dirk Eddelbuettel * NAMESPACE: Export RcppLdFlags which is often used to build Rcpp * man/RcppLdFlags.Rd: Added required manual page * R/Attributes.R: Call RcppLdFlags() via '::' instead of ':::' * R/SHLIB.R: Ditto * R/inline.R: Ditto * vignettes/Rcpp-FAQ.Rnw: Add %\VignetteEngine{highlight::highlight} * vignettes/Rcpp-attributes.Rnw: Idem * vignettes/Rcpp-extending.Rnw: Idem * vignettes/Rcpp-modules.Rnw: Idem * vignettes/Rcpp-package.Rnw: Idem * vignettes/Rcpp-quickref.Rnw: Idem * vignettes/Rcpp-sugar.Rnw: Idem * vignettes/Rcpp-package.Rnw: Altered to make use of highlight package; also no longer build embedded demo package (which upsets R CMD check under R-devel) 2013-09-16 JJ Allaire * R/Attributes.R : Remove calls to non-exported functions from the tools package 2013-09-16 Romain Francois * include/Rcpp/internal/Exporter.h : Specific handling of containers (std::vector, std::deque, and std::list so that we use their faster range constructor when we can, and so let the STL optimize how data is copied * include/Rcpp/api/meat/export.h : Implementation of the above * include/Rcpp/vector/Vector.h : added Vector( const char* ) ctor * DESCRIPTION : bump to 0.10.4.5 (for RcppExtras) 2013-09-15 Dirk Eddelbuettel * inst/include/Rcpp/InputParameter.h (Rcpp): Add 'const' case * inst/unitTests/cpp/Vector.cpp: New unit tests for std::vector conversions, using both int and double arguments * inst/unitTests/runit.Vector.R: R complement of these tests 2013-09-15 Romain Francois * include/Rcpp/InputParameter.h : added the traits::input_parameter trait to add another layer of abstration. * include/Rcpp/macros/module.h : taking advantage of input_parameter to specialize how to work with module objects * src/attributes.cpp : using traits::input_parameter instead of InputParameter 2013-09-14 Dirk Eddelbuettel * src/attributes.cpp : Precede closing '>' by space to avoid '>>' * inst/include/Rcpp/platform/compiler.h: Further refine #if test for 'long long' by conditioning __LP64__ on also using clang/llvm * src/attributes.cpp : Precede closing '>' by space to avoid '>>' 2013-09-13 Romain Francois * src/api.cpp : added "long long" to the capabilities function. * include/Rcpp/platform/compiler.h : demangling is definitely available on all mac versions using gcc. No point is testing for OSX version. * include/Rcpp/InputParameter.h : extra layer of abstraction to allow for custom handling of references etc ... used in RcppArmadillo * src/attributes.cpp : using InputParameter * DESCRIPTION: bump to 0.10.4.4 2013-09-12 Romain Francois * include/Rcpp/platform/compiler.h : patch submitted by Murray for better support of long long type. * include/Rcpp/platform/compiler.h : gcc 4.2.1 has tr1/unordered_map and tr1/unordered_set. Previous test was for gcc 4.4.0 for some reason 2013-08-31 Dirk Eddelbuettel * inst/doc/*: Moved all vignettes to vignettes/* * vignettes/*: Minor updates to some vignettes 2013-08-22 Romain Francois * include/Rcpp/traits/is_primitive.h : new trait to identify if a type is primitive, this is a shortcut of using r_type_traits and compare it to r_type_primitive_tag * include/Rcpp/traits/r_type_traits.h : new tag r_type_pair_tag to handle wrapping map where KEY can be converted to String and VALUE can wrap itself * include/Rcpp/internal/wrap.h : handling map and vector where T is a class handled by modules * include/Rcpp/api/meat/wrap.h : implementations to handle map * unitTests/cpp/wrap.cpp : more tests for map with KEY not a string * unitTests/runit.wrap.R : more tests for map with KEY not a string * include/Rcpp/internal/export.h : added export_range__dispatch for the r_type_generic_tag tag. Meaning we can now use as< vector > where T is not a primitive * include/Rcpp/api/meat/export.h : implementation in meat because it needs as 2013-08-01 Romain Francois * unitTests/cpp/wstring.cpp: fix to re-enable wstring test suite. * unitTests/runit.wstring.R: re-enable the wstring test suite. 2013-07-31 Dirk Eddelbuettel * DESCRIPTION: Bump development version to 0.10.4.3 * inst/doc/Makefile: Rejigged pdf builds in another attempt at pleasing whatever runs the builds on r-forge. L'espoir fait vivre. 2013-07-25 Romain Francois * include/Rcpp/sugar/functions/is_na.h : added is_na for DateVector and DatetimeVector * include/Rcpp/Date.h : added is_na method * include/Rcpp/Datetime.h : added is_na method * unitTests/cpp/dates.cpp : removed the ignoreme useless parameters * unitTests/runit.Date.R : idem * src/attributes.cpp: collecting functions in a FunctionMap. Will use this for dispatching 2013-07-24 Romain Francois * include/Rcpp/traits/is_module_object.h: trait class that identifies at compile time if a given type is a type exposed by a module, i.e. if we used the RCPP_EXPOSED_AS macro * include/Rcpp/is.h: able to identify if an object is of a given type exposed by a module (supports references and pointers too). * src/Module.cpp: implementation of is_module_object_internal that checks if an object is of a given typeid, used by is where T is module exposed 2013-07-23 Romain Francois * include/Rcpp/as.h: support as and as where T is a class exposed by modules * include/Rcpp/macros/module.h: idem * include/Rcpp/traits/un_pointer.h: handle the object case * include/Rcpp/traits/r_type_traits.h: adding traits to help the with as and as * unitTests/runit.Module.R: testing as and as * unitTests/cpp/Module.cpp: idem * src/attributes.cpp: take advantage of a more flexible as<>. The Type class gains a full_name() method that shows const-ness and reference-ness 2013-07-17 Romain Francois * include/Rcpp/vector/instantiation.h: added the DoubleVector alias to NumericVector * include/Rcpp/is.h: added is template function 2013-07-11 Dirk Eddelbuettel * R/Attributes.R: Add an OpenMP plugin 2013-07-03 Romain Francois * unitTests/runit.modref.R: using sourceCpp * unitTests/runit.Module.R: using sourceCpp * unitTests/runit.Vector.R: no more uses of inline * unitTests/runTests.R: we don't need inline no more for testing * doc/unitTests/Rcpp-unitTests.R: idem 2013-07-02 Romain Francois * include/Rcpp/vector/Vector.h: fill__dispatch was mispelled (as fill_dispatch) for the non trivial case, so it did not work * unitTests/runit.Matrix.R: using sourceCpp * unitTests/runit.misc.R: using sourceCpp * unitTests/runit.wrap.R: using sourceCpp * unitTests/runit.support.R: using sourceCpp * unitTests/runit.rmath.R: using sourceCpp * unitTests/runit.RObject.R: using sourceCpp * unitTests/runit.stats.R: using sourceCpp * unitTests/runit.XPTr.R: using sourceCpp * unitTests/runit.Vector.R: testing List( int, IntegerVector ) which eventually uses fill__dispatch * include/Rcpp/traits/r_type_traits.h: support for as and as when T is module exposed * include/Rcpp/as.h: as and as when T is module exposed * include/Rcpp/module/Module_generated_CppFunction.h: removed the remove_const_and_reference since as and as is supported * src/attributes.cpp: automatically populating the environment with the content of a module, rather than make the module object available in the environment 2013-07-01 Romain Francois * R/unit.test.R: added helper function Rcpp:::unit_test_setup to avoid some boiler plate code in unit test files. See e.g. runit.Function.R for an example * unitTests/runit.as.R: using sourceCpp * unitTests/runit.Function.R: using sourceCpp * unitTests/runit.DataFrame.R: remove dependency on datasets 2013-06-25 Dirk Eddelbuettel * src/api.cpp: Also test for #defined(__sun) when checking for system lacking a valid backtrace() function for stack traces 2013-06-25 Romain Francois * DESCRIPTION : devel version 0.10.4.1 * src/Module.cpp : bring a simplified version of RCPP_FUNCTION 1 .. 4 * unitTests/runit.macros.R : removed, as RCPP_FUNCTION ... are deprecated * include/Rcpp/macros/preprocessor_generated.h : deprecating RCPP_FUNCTION_... macros 2013-06-24 Dirk Eddelbuettel * inst/include/Rcpp/platform/compiler.h: Note the useful wiki page http://sourceforge.net/p/predef/wiki/Home with #defines for OSs, compilers, libraries and more 2013-06-23 Dirk Eddelbuettel * DESCRIPTION: Release 0.10.4 * inst/NEWS.Rd: Release 0.10.4 * inst/include/Rcpp/config.h: Release 0.10.4 * debian/*: Similarly updated for new release to Debian 2013-06-19 Romain Francois * inst/NEWS.Rd: Document planned depreciation of old RCPP_FUNCION_* macros which are redundant thanks to Rcpp Modules and Rcpp Attributes * include/Rcpp/vector/string_proxy.h : added operator string_proxy::operator==( const string_proxy& ) so that me may compare x[i] and y[i] (x and y being CharacterVector) * include/Rcpp/module/Module_generated_Pointer_CppMethod.h : remove const and reference to OUT type in several places, that was causing problems e.g. on making the Rcpp-modules vignette * include/Rcpp/module/Module_generated_CppMethod.h : idem 2013-06-18 Romain Francois * include/Rcpp/module/Module_generated_CppFunction.h : using BEGIN_RCPP / END_RCPP as suggested by Ben North on Rcpp-devel. This should reduce cross dll exceptions issues on windows. 2013-06-14 Romain Francois * include/Rcpp/stats/random/runif.h : removed unused max variable * include/Rcpp/stats/random/rf.h : removed unused n1 and n2 variables 2013-06-13 Romain Francois * src/Module.cpp: small buglet in macro. Reported on Rcpp-devel 2013-06-12 Dirk Eddelbuettel * inst/doc/Makefile: Force serial build of vignettes in yet another effort to not let R-Forge fail when trying to rebuild them 2013-06-08 Dirk Eddelbuettel * inst/doc/Rcpp.bib: Updated entries * inst/doc/Rcpp-introduction.Rnw: Added pointer to 'Rcpp Attributes' vignette, as well as to 'Rcpp Sugar' and 'Rcpp Modules' vignettes. * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Idem 2013-06-06 Romain Francois * unitTests/cpp/Vector.cpp : more unit tests for erase * unitTests/runit.Vector.R : more unit tests for erase 2013-06-05 Romain Francois * include/Rcpp/api/meat/Vector.h : fixed Vector<>::erase(iterator, iterator) and correct return value of erase * unitTests/cpp/Vector.cpp : added regression test for the above fix * unitTests/runit.Vector.R : added regression test for the above fix * include/Rcpp/module/class.h : removed useless typedef 2013-05-31 Romain Francois * unitTests/runit.sugar.R : new test for is_infinite and is_nan * unitTests/cpp/sugar.cpp : new test for is_infinite and is_nan * include/Rcpp/sugar/functions/is_infinite.h : new function is_infinite * include/Rcpp/traits/is_infinite.h : new function is_infinite * include/Rcpp/sugar/functions/is_nan.h : new function is_nan * include/Rcpp/traits/is_nan.h : new function is_nan 2013-05-30 Romain Francois * include/Rcpp/sugar/functions/all.h : bug fixed for the NA=false case * include/Rcpp/sugar/functions/is_na.h : header * include/Rcpp/sugar/functions/is_finite.h : added sugar is_finite function * include/Rcpp/traits/is_finite.h : added is_finite trait * unitTests/runit.sugar.R : added test for is_finite * unitTests/cpp/S4.cpp : new cpp file to host S4 unit tests * unitTests/runit.S4.R : rework unit tests to use attributes * unitTests/runit.Reference.R : unit tests for Rcpp::Reference * unitTests/cpp/Reference.cpp : unit tests c++ code 2013-05-26 Dirk Eddelbuettel * src/api.cpp: Minor tweak for internal formatting 2013-05-24 J.J. Allaire * R/Attributes.R: Disallow compilation for files that don't have extensions supported by R CMD SHLIB 2013-05-21 J.J. Allaire * R/Attributes.R: Lookup plugins in inline package if they aren't found within the Rcpp package * man/pluginsAttribute.Rd: Documentation updates. 2013-05-17 J.J. Allaire * src/attributes.cpp: prevent gc problems with RNGScope destructor in attributes generated functions; don't include package header file in generated cpp exports file * src/api.cpp: use unsigned long for RNG scope counter 2013-04-28 Dirk Eddelbuettel * src/api.cpp (Rcpp): No longer use Rd_format(Real|Complex) which is a very verboten R internal; formatting to string is now very bare bones 2013-04-27 Dirk Eddelbuettel * src/Makevars: Improved use as well as a new possible overrride of /usr/bin/install_name_tool on OS X, once again contributed by Simon 2013-04-16 Romain Francois * include/Rcpp/sugar/functions/na_omit.h : new function na_omit to remove missing values from a vector. * src/attributes.cpp : portability fix (from Martyn Plummer) * include/Rcpp/api/meat/Vector.h : portability fix (from Martyn Plummer) 2013-04-14 Romain Francois * include/Rcpp/traits/is_na.h: complex version did not work. added default for VECSXP and EXPRSXP versions 2013-04-02 Dirk Eddelbuettel * src/Date.cpp: Corrected operator-() for Date and Datetime objects to behave more inline with C++ standard * inst/include/Rcpp/Date.h: operator-() for Dates now returns a double as the date itself is fractional double since epoch * inst/unitTests/cpp/dates.cpp: New file with C++ portion of tests factored out from R unit test file * inst/unitTests/runit.Date.R: Rewritten for use with new C++ tests 2013-04-02 Romain Francois * include/Rcpp/generated/DataFrame_generated.h : DateFrame::create uses List::create and then feeds to the DataFrame constructor, which seems to work better than the previous approach of calling back to the data.frame function in R * include/Rcpp/DataFrame.h : private function from_list, to help the new implementation of DataFrame::create * src/api.cpp : impl of DataFrame::from_list 2013-03-31 Dirk Eddelbuettel * debian/control (Build-Depends): Modified for Debian-only rebuilds under (rc version of upcoming) R 3.0.0 release * debian/changelog: Entry for Debian build 0.10.3-2 2013-03-29 Dirk Eddelbuettel * src/api.cpp (Rcpp): Re-enable coerce_to_string<>() for real and complex types with Poor Man's Versions (TM) of Rf_EncodeReal and Rf_EncodeComplex which the Powers That Be disallow from being used 2013-03-27 Romain Francois * include/Rcpp/vector/MatrixRow.h : removed unintended printed messaged (reported on Rcpp-devel by Michaeal Love) 2013-03-23 Dirk Eddelbuettel * DESCRIPTION: Release 0.10.3 * inst/NEWS.Rd: Release 0.10.3 * inst/include/Rcpp/config.h: Release 0.10.3 * debian/*: Similarly updated for new release to Debian 2013-03-21 Dirk Eddelbuettel * inst/unitTests/runit.wstring.R (test.as_vector_wstring): replace the "€" symbol with its unicode equivalent "\u20ac" 2013-03-20 Dirk Eddelbuettel * inst/doc/Rcpp.bib: Updated versions for several CRAN packages * inst/CITATION: Add information about forthcoming book 2013-03-20 Romain Francois * include/Rcpp/traits/is_wide_string.h : fixes to re-enable wrap( vector ) and wrap( vector ), needed to support package httpuv * include/Rcpp/internal/wrap.h : same 2013-03-19 Dirk Eddelbuettel * inst/include/Rcpp/config.h: Define RCPP_USE_NEW_PRESERVE_RELEASE with default value of 0 to enable/disable new preserve/release code * src/api.cpp: Bracket the new Rcpp object preserve / release code with the new variable RCPP_USE_NEW_PRESERVE_RELEASE and fall back to R behaviour if not set 2013-03-12 Romain Francois * include/Rcpp/Module.h: added virtual destructor to CppProperty 2013-03-08 Dirk Eddelbuettel * inst/include/Rcpp/platform/compiler.h: Improved g++ version detection with thanks to Yan Zhou 2013-02-28 JJ Allaire * src/attributes.cpp: standalone roxygen chunks (e.g. to document a class) are now transposed into RcppExports.R 2013-02-27 JJ Allaire * R/Rcpp.package.skeleton.R: eliminated spurious empty hello world function definition in Rcpp.package.skeleton 2013-02-24 JJ Allaire * R/Attributes.R: add global package include file to RcppExports.cpp if it exists; handle Rcpp module definitions in sourceCpp * src/attributes.cpp: handle Rcpp module definitions in sourceCpp * man/sourceCpp.Rd: documentation updates 2013-02-20 Dirk Eddelbuettel * inst/include/Rcpp/platform/compiler.h: As deteced by Gong-Yi Liao, we need to test for __LONG_LONG_MAX__ (defined in limits.h) and not LONG_LONG_MAX (defined climits which we do not include) 2013-02-19 Romain Francois * src/api.cpp : more debugging * include/RcppCommon.h : move sexp_to_name here. Used in some debugging * include/Rcpp/vector/MatrixRow.h : fix const version of operator[] * include/Rcpp/vector/Vector.h : more debugging * include/Rcpp/internal/wrap.h : more debugging. more dispatch. 2013-02-18 Romain Francois * include/Rcpp/vector/string_proxy.h : only declare operator+= * include/Rcpp/String.h : define string_proxy::operator+=, now that String is defined. 2013-02-15 JJ Allaire * R/Attributes.R: Merge existing values of build related environment variables for sourceCpp 2013-02-12 Romain Francois * src/api.cpp : More careful about RCPP_PROTECTION_STACK init 2013-02-08 Romain Francois * include/Rcpp/as.h: re-enable as(CharacterVector[int]) 2013-02-07 Dirk Eddelbuettel * inst/THANKS: Adding Ben North for the help / bug report on iterators 2013-02-05 Romain Francois * include/Rcpp/vector/string_proxy.h : more wstring support * include/Rcpp/XPtr.h : more debugging. removed delete_finalizer which is no longer used 2013-02-05 JJ Allaire * src/attributes.cpp : ensure that line comments invalidate block comments when parsing for attributes 2013-02-04 Romain Francois * include/Rcpp/traits/r_type_traits.h : make the r_type_pairstring_string_tag tag more general, handling wstring as well as string * include/Rcpp/internal/wrap.h : using make_charsexp, a more generic version of charsexp_from_wstring. * include/Rcpp/as.h : more support fot wstring * include/Rcpp/internal/wrap.h : rework the support of wstring * include/Rcpp/internal/export.h : added as_string_elt to rework the support of wstring * include/Rcpp/traits/char_type.h : new trait to help the wstring support * include/Rcpp/String.h : added some support for wstring * include/Rcpp/vector/string_proxy.h : adapt to add wstring support * unitTests/runit.wstring.R : unit tests for wstring support * unitTests/cpp/wstring.cpp : unit tests for wstring support 2013-02-03 Romain Francois * include/Rcpp/traits/wrap_type_traits.h : support for wrap( wstring ) * include/Rcpp/internal/export.h : exporting wstring and containers of wstring * include/Rcpp/internal/wrap.h : support for wrap( wstring ) and containers of wstring * include/RcppCommon.h : definition of charsexp_from_wstring * src/api.cpp: implementation of charsexp_from_wstring 2013-02-02 Romain Francois * include/Rcpp/vector/MatrixRow.h: correct operator++(int) and operator--(int) * include/Rcpp/internal/Proxy_Iterator.h: correct operators ++ and -- * include/Rcpp/sugar/Range.h: correct operators ++ and -- * include/Rcpp/sugar/tools/iterator.h: correct operators ++ and -- * include/Rcpp/vector/MatrixBase.h : correct operators ++ and -- * include/Rcpp/vector/VectorBase.h : correct operators ++ and -- * unitTests/cpp/Vector.cpp: new unit tests * unitTests/runit.Vector.R: new unit tests * src/api.cpp: comment dropTrailing0 which is not used anymore * include/Rcpp/as.h: support for as * include/Rcpp/internal/export.h: more support for wstring 2013-01-15 Dirk Eddelbuettel * src/api.cpp (Rcpp): Commented-out coerce_to_string() for real and complex arguments as R-devel (as of today) dislikes use of non-API functions Rf_EncodeComplex’, ‘Rf_EncodeReal’, ‘Rf_formatComplex’ * .Rbuildignore: Added inst/include/Rcpp/preprocessor and sugar/functions/impl which are currently empty directories * src/Timer.cpp (Rcpp): Avoid a 'long long' warning from a const 2014-01-15 JJ Allaire * R/Attributes.R: don't add source directory as an include path for sourceCpp; fix duplicate inclusion of Rcpp directory * R/RcppLdpath.R: don't quote paths on windows 2014-01-14 JJ Allaire * DESCRIPTION: bump version to 0.10.2.3 * R/Attributes.R: handle build paths with spaces on windows * R/RcppLdpath.R: handle build paths with spaces on windows * R/tools.R: handle build paths with spaces on windows * src/Timer.cpp: fix OSX build (remove __MACH__ define check) * R/: set svn eol-style native for source files * src/: set svn eol-style native for source files * inst/include/: set svn eol-style native for source files 2014-01-13 JJ Allaire * R/Attributes.R: use plugin includes in cppFunction; stop with explicit error on Windows then the Rcpl libPath or sourceCpp target file contains spaces in it's path; add source file directory as an include path for sourceCpp; special handling for sourceCpp include paths on windows * man/pluginsAttribute.Rd: clarify which fields of plugin are used by sourceCpp 2014-01-12 JJ Allaire * DESCRIPTION: bump version to 0.10.2.2 * NAMESPACE: add registerPlugin function * R/Attributes.R: add registerPlugin function; add plugins parameter to cppFunction * man/cppFunction.Rd: documentation updates * man/pluginsAttribute.Rd: documentation updates * man/registerPlugin: documentation updates 2014-01-11 JJ Allaire * R/Attributes.R: initial support for Rcpp::plugins attribute; add built-in cpp11 plugin * src/attributes.cpp: initial support for Rcpp::plugins attribute 2014-01-04 JJ Allaire * R/Attributes.R: null check on pkginfo depends field 2013-01-02 Dirk Eddelbuettel * src/Timer.cpp (Rcpp): Applied refinement of previously applied patch re *BSD builds, see http://bugs.debian.org/697032 for more 2012-12-30 Dirk Eddelbuettel * src/Timer.cpp (Rcpp): Added defined() tests for more *BSD family members as the build also failed with the FreeBSD Kernel on Debian 2012-12-27 Dirk Eddelbuettel * src/Timer.cpp (Rcpp): Applied patch kindly supplied by Rainer Hurling to support compilation on FreeBSD 2012-12-26 JJ Allaire * R/Attributes.R: return invisibly from void functions * src/attributes.cpp: return invisibly from void functions 2012-12-21 Romain Francois * NAMESPACE : remove C++ObjectS3 and C++ClassRepresentation classes * R/00_classes.R: remove unused S4 classes * src/internal.h: added Rcpp_PreserveObject, Rcpp_ReleaseObject and Rcpp_ReplaceObject as replacements to R_ versions. The back end of the Rcpp_ version is a list (generic vector) instead of a linked list and is faster * src/Module.cpp: more debugging * src/barrier.cpp: added get_Rcpp_protection_stack used in the new stack system for protecting/releasing objects in Rcpp * src/api.cpp: implemetation of Rcpp_PreserveObject, Rcpp_ReleaseObject and Rcpp_ReplaceObject. RObject::setSEXP now uses the new system. The RObject(SEXP) constructor now directly uses Rcpp_PreserveObject More debugging for the RObject class Changes in api classes to better use the new protection system * unitTests/cpp/language.cpp: hosting unit test in sourceCpp form * unitTests/runit.Language.R: update unit tests * unitTests/runit.Module.client.package.R: remove code that has been commented for ages * include/Rcpp/DottedPair.h: better use of the RObject constructor * include/Rcpp/vector/Vector.h: better use of the RObject constructor * include/Rcpp/vector/Matrix.h: Using update_matrix instead of the virtual update which has been removed. * include/Rcpp/Module.h : more careful about types and constructors * include/Rcpp/XPtr.h: more debugging * include/Rcpp/macros/debug.h: more debugging macros * include/Rcpp/module/class_Base.h: using classes instead of SEXP * include/Rcpp/module/class.h: using classes instead of SEXP * include/Rcpp/generated/Language__ctors.h : using update_language_object instead of the virtual update which has been removed. * include/Rcpp/api/meat/Vector.h : using update_vector instead of the virtual update that has been removed, more debugging * include/Rcpp/api/meat/Matrix.h : more debugging, using update_matrix instead of the virtual update which has been removed * include/Rcpp/Language.h : added update_language_object to replace update which was virtual * include/Rcpp/RObject.h : only keep declarations here 2012-12-21 Dirk Eddelbuettel * DESCRIPTION: Release 0.10.2 * inst/NEWS.Rd: Release 0.10.2 * inst/include/Rcpp/config.h: Release 0.10.2 * debian/*: Similarly updated for new release to Debian * inst/doc/unitTests/Rcpp-unitTests.R: added one more variable so that unitTest vignette can be built against new sourceCpp based files 2012-12-15 Romain Francois * include/Rcpp/exceptions.h: added exception_to_r_condition * exceptions.cpp: new implementation of forward_exception_to_r that directly calls stop rather than a function in Rcpp * R/exceptions.R: remove code rendered useless * src/Rcpp_init.c: less exports * src/api.cpp: less going back to the R side 2012-12-14 Romain Francois * include/Rcpp/sugar/functions/clamp.h: clamp was pretty wrong * unitTests/runit.sugar.R: new unit test for clamp * unitTests/cpp/sugar.cpp: new unit test for clamp 2012-12-12 JJ Allaire * src/Attributes.R: always generate new dynlib file for rebuild=TRUE * src/attributes.cpp: set svn:eol-style to native; always generate new dynlib file for rebuild=TRUE; don't declare attributes constant strings extern 2012-12-12 Romain Francois * include/Rcpp/Symbol.h: c_str becomes const and added Symbol::operator==(const char* ) 2012-12-11 JJ Allaire * R/Attributes.R: always print output when shared library is not created * src/attributes.cpp: consolidate attributes into single file * src/Attributes.cpp: consolidate attributes into single file * src/AttributesGen.h: consolidate attributes into single file * src/AttributesGen.cpp: consolidate attributes into single file * src/AttributesParser.h: consolidate attributes into single file * src/AttributesParser.cpp: consolidate attributes into single file * src/AttributesTypes.h: consolidate attributes into single file * src/AttributesUtil.h: consolidate attributes into single file * inst/NEWS.Rd: additional notes on changes to attributes * inst/doc/Rcpp-attributes/Rcpp-attributes.Rnw: update for changes to attributes in 0.10.2 2012-12-11 Romain Francois * include/Rcpp/String.h: missing operator +=( const StringProxy& ) * include/Rcpp/sugar/functions/strings/strings.h : string sugar functions * include/Rcpp/sugar/functions/strings/collapse.h : collapse function, implementing paste( . , collapse = "" ) * include/Rcpp/complex.h: operator==( Rcomplex, Rcomplex ) * src/api.cpp: implementation of operator==(Rcomplex, Rcomplex) * include/Rcpp/vector/Vector.h: added const version of operator[](string) 2012-12-10 JJ Allaire * R/Attributes.R: warn when depends attribute is not matched with required entries in package description; add Rtools to PATH for duration of sourceCpp * src/Attributes.cpp: warn when depends attribute is not matched with required entries in package description * src/AttributesGen.cpp: prune unnecessary includes from RcppExports * src/Timer.cpp: fix timer build issues on windows 2012-12-10 Romain Francois * src/api.cpp: import r_cast.cpp, coerce.cpp, RcppCommon.cpp and debugging.cpp content * include/platform/compiler.h: put here compiler specific deduction things * src/internal.h: new header to host function declarations for routines that are not exported into Rcpp.h * src/Rcpp_init.c: export capabilities (renamed rcpp_capabilities) * include/Rcpp/traits/traits.h: master file for all traits includes * include/Rcpp/macros/macros.h: master file for all macros includes * include/Rcpp/DataFrame.h: just have declaration for DataFrame * include/Rcpp/Benchmark/Timer.h: move it into the Rcpp:: namespace * include/Rcpp/cache.h: clean * include/Rcpp/Reference.h : field was declared const and should not be. added a ConstFieldProxy class for read only use 2012-12-09 Romain Francois * src/api.cpp: merge many .cpp files here to reduce compile time * src/barrier.cpp: merge with cache.cpp to reduce compile time * include/Rcpp/exceptions.h: drop forward_uncaught_exceptions_to_r * src/exceptions.cpp: drop forward_uncaught_exceptions_to_r * src/Date.cpp: merge all Date related files 2012-12-08 Romain Francois * src/Timer.cpp: implementation of Timer * include/Rcpp/Benchmark/Timer.h: internal performance timer, based on the code from the microbenchmark package * include/Rcpp/api/meat/Matrix.h: move more in Matrix meat * src/Date.cpp: import the code from posixt.cpp 2012-12-07 JJ Allaire * src/AttributesGen.cpp: use __ prefix for variables in generated code; add RNGScope for attribute exported functions. 2012-12-07 Romain Francois * src/random.cpp: instantiations of random generators here * include/Rcpp/stats/random/random.h: only have declarations of random generators here. Rework the Generator template so that it inherits RNGScope to provide automatic calls to GetRNGstate and PutRNGstate 2012-12-06 JJ Allaire * R/Attributes.R: revert DOS newlines; use new shared library name for each rebuild in sourceCpp * src/Attributes.cpp: revert DOS newlines; define RCPP_NO_SUGAR; use new shared library name for each rebuild in sourceCpp * src/AttributesGen.cpp: revert DOS newlines; convert 'try-error' to exception for C++ interfaces * src/AttributesGen.h: 'try-error' to exception for C++ interfaces * src/AttributesParser.cpp: revert DOS newlines; define RCPP_NO_SUGAR * src/RcppCommon.cpp: conversion from exeption to 'try-error' * include/Rcpp/exceptions.h: conversion from exeption to 'try-error' * include/Rcpp/preprocessor.h: add END_RCPP_RETURN_ERROR macro to convert exceptions to 'try-error' objects * include/Rcpp/iostream/Rstreambuf.h: revert DOS newlines * DESCRIPTION: bump version to 0.10.1.5 2012-12-06 Dirk Eddelbuettel * src/exceptions.cpp: Added include of cstdlib to compile 2012-12-06 Romain Francois * include/Rcpp/api/meat/Environment.h: meat for Environment * src/exceptions.cpp: include config so that it knows that Rcpp can demangle * unitTests/runit.environments.R: using sourceCpp * src/Environment.cpp: less includes * src/Evaluator.cpp: less includes 2012-12-05 Romain Francois * src/cache.cpp: added get_cache * include/Rcpp/hash/IndexHash.h: use a cached integer vector for the hash table payload. The cache vector increases as needed. * include/Rcpp/iostream/Rostream.h: make Rostream a template * include/Rcpp/iostream/Rstreambuf.h: make Rstreambuf a template * src/AttributesGen.cpp : include exceptions.h which was included implicitely by Rostream.h before * include/Rcpp/macros/debug.h : factor out the debugging macros * include/Rcpp/api/meat/RObject.h : only declare templates that use as and wrap. they are implemented later in the meat directory * include/Rcpp/api/meat/meat.h: directory containing implementations of templates using as and wrap * include/RcppCommon.h: removed unused test_named * src/RcppCommon.cpp: removed unused test_named * src/r_cast.cpp: less includes * src/posixt.cpp: less includes 2012-12-05 JJ Allaire * src/Attributes.R: direct hookup of external ptr in sourceCpp * src/Attributes.cpp: use code generation for compileAttributes; direct hookup of external ptr in sourceCpp * src/AttributesGen.cpp: use code generation for compileAttributes; direct hookup of external ptr in sourceCpp * src/AttributesGen.h: use code generation for compileAttributes; direct hookup of external ptr in sourceCpp * src/Module.cpp: fix typo in GetCppCallable * include/Rcpp/iostream/Rstreambuf.h: add cstdio include * DESCRIPTION: bump version to 0.10.1.4 2012-12-04 Dirk Eddelbuettel * inst/include/Rcpp/hash/hash.h: Added include inttypes.h for intptr_t 2012-12-04 JJ Allaire * R/Attributes.R: use simple code generation for sourceCpp * src/Attributes.cpp: move generators into their own source file; use simple code generation for sourceCpp * src/AttributesGen.cpp: move generators into their own source file; add C++ default argument parsing * src/AttributesGen.h: move generators into their own source file * src/AttributesParser.cpp: move generators into their own source file * src/AttributesParser.h: move generators into their own source file * src/AttributesTypes.h: new header for attributes types * src/AttributesUtil.h: new header for attributes utilities 2012-12-04 Romain Francois * include/Rcpp/hash/hash.h: new implementation of IndexHash, based on Simon's fastmatch package * include/Rcpp/sugar/functions/match.h: more efficient version of match using new IndexHash * include/Rcpp/sugar/functions/unique.h: more efficient version of unique and in using IndexHash * include/Rcpp/sugar/functions/duplicated.h: more efficient version of duplicated and in using IndexHash * include/Rcpp/sugar/functions/self_match.h: more efficient version of self_match and in using IndexHash * include/Rcpp/vector/Vector.h: more efficiently create Vector from sugar expression that are already vectors, i.e. grab the SEXP 2012-12-03 Dirk Eddelbuettel * inst/include/RcppCommon.h: Applied patch kindly contributed by Yan Zhou which provides a number of more refined definition for support of both the C++11 standard and different compilers * inst/include/Rcpp/internal/wrap.h: Idem * inst/include/Rcpp/sugar/sugar.h: Idem * inst/include/Rcpp/traits/comparator_type.h: Idem * inst/include/Rcpp/vector/Vector.h: Idem * inst/unitTests/runit.wrap.R: Idem * src/RcppCommon.cpp: Idem * DESCRIPTION: Increase minor dev. version once more 2012-12-03 JJ Allaire * R/Attributes.R: added function to check whether R development tools are currently installed 2012-12-03 Romain Francois * src/Module.cpp: move BEGIN_RCPP/END_RCPP to Module__invoke * src/coerce.cpp: added coerce_to_string implementations * include/RcppCommon.h : nicer formatting for RCPP_DEBUG_*, now up to RCPP_DEBUG_5 * include/Rcpp/vector/Vector.h: debugging * include/Rcpp/String.h: The String class * include/Rcpp/as.h: support for String * include/Rcpp/vector/converter.h : support for String * include/Rcpp/vector/string_proxy.h: support for String * include/Rcpp/internal/wrap.h : support for String * include/Rcpp/internal/r_coerce.h: support for String * include/Rcpp/sugar/functions/sapply.h: debugging * include/Rcpp/traits/wrap_type_traits.h: support for String * include/Rcpp/traits/r_type_traits.h: support for String * unitTests/cpp/String.cpp : unit tests for String * unitTests/runit.String.R: unit test for String * include/Rcpp/sugar/sets.h: support for String 2012-12-01 Dirk Eddelbuettel * inst/include/RcppCommon.h: Applied patch by Yan Zhou to add support for clang++ with libc++, and Intel's icpc when std=c++11 2012-11-29 Romain Francois * unitTests/runit.DataFrame.R: using sourceCpp * include/Rcpp/vector/Matrix.h: fix yet another const correctness issue 2012-11-27 Dirk Eddelbuettel * inst/include/Rcpp/iostream/Rostream.h: Check before deleting buf 2012-11-26 Dirk Eddelbuettel * DESCRIPTION: Release 0.10.1 * inst/NEWS.Rd: Release 0.10.1 * inst/include/Rcpp/config.h: Release 0.10.1 * debian/*: Similarly updated for new release to Debian * DESCRIPTION: Added paragraph about Rcpp attributes * debian/control: Idem 2012-11-26 Romain Francois * include/Rcpp/Module.h: comment out the unused and unuseable converter overload. * include/Rcpp/sugar/functions/pmin.h: be consistent about how the pmin_op helper struct is defined (always a struct). * include/Rcpp/sugar/functions/pmax.h: same for pmax * include/Rcpp/stats/random/rbeta.h: fixed constructor issue * unitTests/runit.sugar.R: rework to use sourceCpp instead of inline * include/Rcpp/vector/Vector.h: added ctor to deal with SingleLogicalResult * include/Rcpp/vector/Matrix.h: another const correctness fix 2012-11-25 JJ Allaire * R/Attributes.R: use echo = TRUE for sourceCpp R code chunks * src/Module.cpp: BEGIN_RCPP/END_RCPP in InternalFunction_invoke * inst/doc/Rcpp-attributes/Rcpp-attributes.Rnw: add documentation on correct semantics for signaling error conditions 2012-11-24 JJ Allaire * inst/doc/Rcpp-attributes/Rcpp-attributes.Rnw: expand discussion of binary compatibility issues. 2012-11-23 Romain Francois * src/AttributesParser.cpp : attempt to fix build issue on r-forge * include/Rcpp/DataFrame.h: nrows() method * include/Rcpp/vector/RangeIndexer.h: now derives from VectorBase so that we can use it in sugar. 2012-11-22 JJ Allaire * include/exceptions.h: new exception constructor / stop function * src/exceptions.cpp: new exception constructor / stop function * include/RcppCommon.h: new exception constructor / stop function 2012-11-22 Romain Francois * include/Rcpp/iostream.h: use delete rdbuf() as recommended by Martyn Plummer * include/Rcpp/sugar/functions/self_match.h: self_match, giving a functionality similar to match( x, unique(x) ) * src/coerce.cpp: added coercion to STRSXP * include/Rcpp/internal/r_coerce.h : added r_coerce<.,STRPSXP> * include/Rcpp/sugar/functions/table.h: sugar table * include/Rcpp/sugar/functions/duplicated.h: sugar duplicated 2012-11-21 JJ Allaire * R/Rcpp.package.skeleton.R: add 'attributes' and 'cpp_files' parameters to Rcpp.pacakge.skeleton * inst/skeleton/rcpp_hello_world_attributes.cpp: version of hello world that uses attributes * man/Rcpp.package.skeleton.Rd: doc updates * inst/doc/Rcpp-attributes/Rcpp-attributes.Rnw: doc updates * DESCRIPTION: bump version to 0.10.0.3 2012-11-21 Dirk Eddelbuettel * inst/examples/Misc/piBySimulation.r: New simple example using Rcpp attributes in a 'compute pi by simulation in R and C++' exercise * inst/examples/Misc/piSugar.cpp: Corresponding C++ variant 2012-11-21 Romain Francois * include/Rcpp/iostream/Rostream.h: Fix warning given by -Wreorder * include/Rcpp/sugar/functions/mapply/mapply_3.h: more flexible * include/Rcpp/vector/Vector.h: More efficient assign_object, which is used in the assignment operator * include/Rcpp/sugar/functions/clamp.h: added clamp function 2012-11-20 JJ Allaire * src/Attributes.cpp: ensure dynlib cache state is always updated * inst/doc/Rcpp-attributes/Rcpp-attributes.Rnw: elaborate further on exporting C++ interfaces from packages 2012-11-20 Romain Francois * include/Rcpp/iostream/Rostream.h: change order of initiaization in ctor. was making solaris compiler unhappy * include/Rcpp/stats/random/rnorm.h: not using function pointer generators, as this generates (anachronisms) warning on solaris. Also, this version is more efficient since there is no need to dereference the function pointer 2012-11-19 JJ Allaire * src/AttributesParser.h: support for argument default values * src/AttributesParser.cpp: support for argument default values * src/Attributes.cpp: support for argument default values * man/exportAttribute.Rd: documentation updates * man/compileAttributes.Rd: documentation updates * man/sourceCpp.Rd: documentation updates * inst/doc/Rcpp-attributes/Rcpp-attributes.Rnw: add documentation on changes to attributes in 0.10.1 2012-11-18 JJ Allaire * R/Attributes.R: sourceCpp embedded R code; print warning if no export attributes are found in source file * src/AttributesParser.h: sourceCpp embedded R code * src/AttributesParser.cpp: sourceCpp embedded R code; new scheme for mixing user and generated C++ headers * src/Attributes.cpp: sourceCpp embedded R code; include above generated modules * man/sourceCpp.Rd: documentation updates * man/interfacesAttribute.Rd: documentation updates 2012-11-18 Romain Francois * include/Rcpp/vector/converter.h: allow CharacterVector::create( NA_STRING ) * include/Rcpp/sugar/functions/mapply/mapply_2.h: more cases in mapply 2012-11-17 Dirk Eddelbuettel * inst/doc/Rcpp-modules/Rcpp-modules.Rnw: Change free function name 'range' to 'uniformRange' to protect it from getting clobbered by the new sugar function range. 2012-11-17 Romain Francois * include/Rcpp/internal/wrap_end.h: have calls to wrap as late as possible so that they "see" all (potentially user defined) overloads of wrap. * include/Rcpp/internal/SEXP_Iterator.h: directly iterate over SEXP. const iterator for List and ExpressionVector 2012-11-16 Romain Francois * include/Rcpp/vector/Vector.h : added static methods Vector::is_na and Vector::get_na * include/Rcpp/sugar/functions/setdiff.h: initial version of setdiff and intersect * include/Rcpp/vector/MatrixColumn.h: dealing with const-ness * include/Rcpp/vector/MatrixRow.h: dealing with const-ness * include/Rcpp/vector/traits.h: dealing with const-ness * include/Rcpp/vector/proxy.h: dealing with const-ness * include/Rcpp/vector/MatrixBase.h: dealing with const-ness * include/Rcpp/vector/Vector.h: dealing with const-ness 2012-11-15 Romain Francois * include/Rcpp/sugar/logical/SingleLogicalResult.h : apply patch suggested by Karl Millar * R/Attributes.R: new R function areMacrosDefined * man/evalCpp.Rd: documentation update * include/Rcpp/sugar/functions/match.h : generic version of match * include/Rcpp/sugar/tools/iterator.h: help iterator that helps writing match in terms of stl algorithms. * include/Rcpp/vector/Vector.h: class no_init that can be used to create an uninitialized vector. e.g. IntegerVector out = no_init(10) ; * include/Rcpp/sugar/functions/unique.h: sugar version of %in% using unordered_set * include/Rcpp/sugar/functions/minmax.h: min, max, and range 2012-11-14 JJ Allaire * src/Attributes.cpp: create sourceCpp context list using single statement 2012-11-14 Dirk Eddelbuettel * inst/announce/ANNOUNCE-0.10.0.txt: Fix typo spotted by Martin Morgan in announcement mail 2012-11-14 Romain Francois * include/Rcpp/internal/wrap.h: fix for wrap( std::complex ) * include/Rcpp/module/class_Base.h: factored out from Module.h * R/00_classes.R: the C++Class gains the parents slot to hold information about parent classes of the class * src/Module.cpp : The CppClass constructor fills the parents slot of C++Class 2012-11-13 Dirk Eddelbuettel * DESCRIPTION: Release 0.10.0 * inst/NEWS: Release 0.10.0 * inst/include/Rcpp/config.h: Release 0.10.0 * debian/*: Similarly updated for new release to Debian 2012-11-13 Romain Francois * include/Rcpp/as.h: as * include/Rcpp/internal/wrap.h : wrap( enum ) * include/Rcpp/traits/wrap_type_traits.h: trait to help wrap( enum ) * include/Rcpp/traits/r_type_traits.h: trait to help as * include/Rcpp/module/macros.h: macros RCPP_EXPOSED_ENUM to help as/wrap of enums 2012-11-12 Dirk Eddelbuettel * inst/announce/ANNOUNCE-0.10.0.txt: Announcement draft 2012-11-12 JJ Allaire * inst/doc/Rcpp-attributes/*: New vignette 2012-11-12 Romain Francois * include/Rcpp/vector/Vector.h : adding const_iterator and associated begin() and end() methods * include/Rcpp/vector/Matrix.h : idem 2012-11-11 JJ Allaire * src/Attributes.cpp: fully qualify _ in generated code 2012-11-11 Romain Francois * include/Rcpp/iostream/Rstreambuf.h: implementing sync() so that flush works * src/Rstreambuf.cpp: implementation * src/Rostream.cpp : added Rcerr that forwards to REprintf 2012-11-10 JJ Allaire * R/Attributes.R: ensure function definitions are never stale * src/Attributes.cpp: add optional hook for inclusion of package types * examples/Attributes/Export.cpp: example use of Rcpp::export * examples/Attributes/Depends.cpp: example use of Rcpp::depends * examples/Attributes/sourceCpp.R: example use of sourceCpp() * examples/Attributes/cppFunction.R: example use of cppFunction() 2012-11-09 Romain Francois * R/Attributes.R: Passing verbose from evalCpp to cppFunction * include/RcppCommon.h: include instead of * include/Rcpp/vector/CharacterVectorExtractionIterator.h: iterator class to quickly iterate over the content of a CharacterVector. The content that is iterated over is to be considered read-only. 2012-11-08 JJ Allaire * R/Attributes.R: special sourceCpp handling for file within the src directory of a package; use .h as suffix for generated headers * src/Attributes.cpp: add information on arguments to Rcpp module; use inline rather than static linkage for generated C++ shims; generated headers: add header guard and use .h suffix; * man/cppFunction.Rd: update documentation * man/sourceCpp.Rd: update documentation * man/evalCpp.Rd: update documentation * man/exportAttribute.Rd: update documentation * man/interfacesAttribute.Rd: update documentation 2012-11-08 Romain Francois * R/Module.R: Module functions taking no arguments don't get the ellipsis anymore in their formals * src/Module.cpp: passing up the number of arguments of the function * R/Attributes.R: added evalCpp * man/evalCpp.Rd: documentation for evalCpp 2012-11-07 JJ Allaire * R/Attributes.R: derive depends from package LinkingTo; change sourceCpp plugin parameter to depends and respect Rcpp::interfaces generated include files * src/Attributes.cpp: validate exported C++ functions before calling; use static rather than inline for stubs to avoid call-site bloat; improved error message when package hpp already exists; import Rcpp namespace into package shim namespace * src/AttributesParser.h: add signature and isHidden methods * src/AttributesParser.cpp: add signature and isHidden methods * src/exceptions.cpp: add function_not_exported exception * include/Rcpp/exceptions.h: add function_not_exported exception * man/cppFunction.Rd: update documentation * man/sourceCpp.Rd: update documentation * man/compileAttributes.Rd: update documentation * man/dependsAttribute.Rd: update documentation * man/exportAttribute.Rd: update documentation * man/interfacesAttribute.Rd: update documentation 2012-11-07 Romain Francois * src/Language.cpp: Language gains a fast_eval method, without the whole try/catch * src/barrier.cpp: function char_nocheck to avoid the check in using CHAR * include/Rcpp/sugar/functions/unique.h: sugar unique and sort_unique using unordered_set (perhaps we could use it from c++11). 2012-11-06 JJ Allaire * R/Attributes.R: tweak whitespace in verbose mode * src/AttributesParser.h: support for interfaces attribute * src/AttributesParser.cpp: support for interfaces attribute * src/Attributes.cpp: support for interfaces attribute; refactor code generators; use single module for exports; return list of updated files from compileAttributes * src/Module.cpp: add package parameter to GetCppCallable * include/Rcpp/Module.h: add package parameter to GetCppCallable * man/compileAttributes.Rd: documentation updates 2012-11-05 Romain Francois * include/Rcpp/Module.h: added class CppInheritedProperty to handle inherited properties * include/Rcpp/module/class.h: implemented inheritance of properties 2012-11-05 JJ Allaire * R/Attributes.R: use modules for attribute code generation * src/Attributes.cpp: use modules for attribute code generation * src/AttributesParser.h: use modules for attribute code generation * src/AttributesParser.cpp: use modules for attribute code generation 2012-11-04 Dirk Eddelbuettel * tests/doRUnit.R: In "development releases" (such as 0.9.15.5) we now default to setting the required CRAN-test-workaround-kludge "RunAllRcppTests" to "yes" as a default -- but not for actual releases (with versions such as 0.9.15) 2012-11-04 Romain Francois * include/Rcpp/module/CppFunction.h: fixed module bug (virtual function was not defined) 2012-11-03 JJ Allaire * Use CLINK_CPPFLAGS rather than PKG_CXXFLAGS for LinkingTo include directories (identical behavior to inline) 2012-11-03 Romain Francois * include/Rcpp/sugar/functions/which_min.h : sugar which.min * include/Rcpp/sugar/functions/which_max.h : sugar which.max * include/Rcpp/module/Module.h : added get_function_ptr which returns the pointer of the target function as a DL_FUNC 2012-11-02 Dirk Eddelbuettel * inst/unitTests/runit.rmath.R: More tests added 2012-11-02 Romain Francois * include/Rcpp/module/CppFunction.h : factored CppFunction in its own file and added the get_function_ptr virtual method. added documentation * include/Rcpp/module/Module_generated_CppFunction.h: implementation of get_function_ptr in classes that derive CppFunction * src/Module.cpp: s/get_function_ptr/get_function/ * include/Rcpp/module/Module.h : factored out and documented. s/get_function_ptr/get_function/ 2012-11-01 Dirk Eddelbuettel * inst/unitTests/runit.rmath.R: New unit test file added 2012-11-01 JJ Allaire * R/Attributes.R: change 'envir' param to 'env' for consistency with the interface of loadModule * man/sourceCpp.Rd: documentation updates * man/cppFunction.Rd: documentation updates 2012-11-01 Romain Francois * include/Rcpp/sugar/logical/or.h : implementing x | y where x and y are Logical sugar expressions * include/Rcpp/sugar/logical/and.h : implementing x & y where x and y are Logical sugar expressions 2012-10-31 JJ Allaire * R/Attributes.R: add cppFunction for inline-style definitions; change 'local' param to (more clear and explicit) 'envir' param; change 'show.output' param to 'showOutput'; add parameter to onBuild hook to indicate if the source was from a 'code' parameter * src/Attributes.cpp: factored parser into it's own file * src/AttributesParser.h: attributes parser header * src/AttributesParser.cpp: attributes parser implementation * man/sourceCpp.Rd: documentation updates * man/compileAttributes.Rd: documentation updates * man/cppFunction.Rd: documentation for cppFunction * NAMESPACE: export for cppFunction 2012-10-31 Romain Francois * include/Rcpp/module/class.h: factored out of Module.h which started to be too big. class_ gains a derives( "Parent" ) for so that the class inherits method that were exposed by its parent. * include/Rcpp/Module.h: template class CppInheritedMethod for implementing inherited method * src/Module.cpp: get_class_pointer implementation 2012-10-30 Dirk Eddelbuettel * inst/include/Rcpp/Rmath.h: Finalised adding Rmath functions 2012-10-30 JJ Allaire * R/Attributes.R: new functions sourceCpp and compileAttributes that use C++11 style attributes (embedded in comments) to perform automatic generation of boilerplate marshaling code * src/Attributes.cpp: support functions for attribute handling * include/Rcpp/exceptions.h: file io exception classes * man/sourceCpp.Rd: documentation for sourceCpp * man/compileAttributes.Rd: documentation for compileAttributes * man/exportAttriute.Rd: documentation for export attribute * man/dependsAttribute.Rd: documentation for depends attribute * NAMESPACE: exports for sourceCpp and compileAttributes 2012-10-30 Romain Francois * include/Rcpp/as.h: new bare_as to simplify uses of as * include/Rcpp/module/Module_generated_Factory.h: using bare_as * R/Module.R: promoting the show method * src/Attributes.cpp: remove g++ warning (int != size_t) 2012-10-29 Dirk Eddelbuettel * inst/include/Rcpp/Rmath.h: More Rmath functions 2012-10-29 Romain Francois * R/Module.R: Taking care of a check warning * include/Rcpp/module/macros.h: adding RCPP_EXPOSED_CLASS_NODECL * include/Rcpp/Module.h: introducing converter to facilitate conversion between classes. * R/Module.R: Methods registered internally with converter will generate the appropriate "as" S4 method. 2012-10-28 Dirk Eddelbuettel * inst/include/Rcpp/Rmath.h: Beginnings of a namespave 'R' around Rmath functions so that Rcpp users can call the (scalar) functions R::pnorm() which helps with adapting or integrating programs writting outside of Rcpp 2012-10-27 Dirk Eddelbuettel * inst/include/Rcpp/module/macros.h: Add forward declaration of class to macro 'RCPP_EXPOSED_CLASS' 2012-10-25 Romain Francois * include/Rcpp/internal/wrap.h: wrapping module object with the help of the RCPP_EXPOSED_CLASS * include/Rcpp/module/macros.h: improving the macros so that wrap and as are covered * include/Rcpp/traits/wrap_type_traits.h: wrapping module objects * include/Rcpp/module/Module_generated_class_factory.h : factories are alternatives to constructors. For now, we can expose as factories any free function that returns a pointer to the target class * include/Rcpp/module/Module_generated_Factory.h : factories * include/Rcpp/Module.h: exposing factories 2012-10-24 Romain Francois * include/Rcpp/traits/is_pointer.h: traits to identify if a type is a pointer * include/Rcpp/traits/un_pointer.h: traits to remove a pointer * include/Rcpp/module/Module_generated_get_return_type.h : handle pointer return types * include/Rcpp/config.h: define RCPP_HAS_DEMANGLING for MAC OS <= 10.7 (up to Lion) * include/Rcpp/module/macros.h: new file that contains macro to help with modules * include/Rcpp/traits/r_type_traits.h : new tag to allow as where T is some class exposed in a module * include/Rcpp/as.h : implementation of as in that case 2012-10-23 Romain Francois * include/Rcpp/internal/wrap.h: new function module_wrap used internally by modules * include/Rcpp/module/Module_generated_CppMethod.h: using module_wrap and simplified the code (removing 35% of the generated code now rendered useless) * include/Rcpp/module/Module_generated_PointerCppMethod.h: using module_wrap and simplified the code * include/Rcpp/traits/module_wrap_traits.h : new file. helping implementation of module_wrap * R/00_classes.R: C++OverloadedMethods gets the field "nargs" to capture the number of arguments * R/01_show.R: cleanup * R/Module.R: handle the case where a method has no argument. In that case, the ellipsis does not end up in the formals * include/Rcpp/Module.h: exposing nargs in C++OverloadedMethods 2012-10-22 Romain Francois * include/Rcpp/as.h: support for as<> for module objects * include/Rcpp/Module.h: idem * include/Rcpp/traits/r_type_traits.h: idem * src/Module.cpp: idem 2012-10-21 Romain Francois * include/Rcpp/traits/wrap_type_traits.h: support for wrapping module objects * include/Rcpp/internal/wrap.h : idem * include/Rcpp/Module.h: idem 2012-10-13 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.15 * inst/NEWS: Release 0.9.15 * inst/include/Rcpp/config.h: Release 0.9.15 * debian/*: Similarly updated for new release to Debian 2012-10-08 Dirk Eddelbuettel * src/exceptions.cpp: Additional PROTECT for parsing exception messages before returning them to R, from a suggestion by Ben North 2012-10-07 Dirk Eddelbuettel * inst/unitTests/runit.Date.R: Added a few more tests 2012-10-06 Dirk Eddelbuettel * inst/include/Rcpp/Date.h: Dates are now represented as doubles, also added accessor functions for double and retained int * src/Date.cpp: Convert from SEXP to double, added constructor from double and added checks for 'finite' representation before converting to 'struct tm' adding support for NA, NaN and Inf * src/DateVector.cpp: Instantiate Date types as double * src/Datetime.cpp: Also added support for NA, NaN and Inf values * inst/unitTests/runit.Date.R: A few additional tests 2012-10-05 Dirk Eddelbuettel * src/exceptions.cpp: Applied patch by Martin Morgan which untangles the clang includes driven by version, and uses direct tests for presence of the header file * inst/include/RcppCommon.h: No longer define CLANG version meta variables as we can directly include the relevant header 2012-09-30 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.14 * inst/NEWS: Release 0.9.14 * inst/include/Rcpp/config.h: Release 0.9.14 * debian/*: Similarly updated for new release to Debian 2012-09-08 Dirk Eddelbuettel * inst/unitTests/runit.sugarOps.R: More sugar Ops unit tests 2012-09-07 Dirk Eddelbuettel * inst/unitTests/runit.sugarOps.R: (Incomplete) beginnings of new unit test file for sugar operations on vectors and matrices 2012-09-07 Romain Francois * inst/include/Rcpp/sugar/functions/sign.h: Sign gets a SEXP operator 2012-09-03 Dirk Eddelbuettel * inst/include/Rcpp/sugar/functions/math.h: Added new sugar function trunc(), round() and signif() * inst/unitTests/runit.sugar.R: Added unit tests for these 2012-09-01 Dirk Eddelbuettel * inst/doc/Makefile: The 'all' target is now empty to prevent autobuilders such as R-Forge from falling over 2012-07-23 Dirk Eddelbuettel * R/bib.R: Trim the trailing ".bib" from the generated bibtex filename as Windows adds one anyway leading to two and an error 2012-07-21 Dirk Eddelbuettel * inst/include/Rcpp/Module.h (Rcpp): Corrected typo / incomplete reference in finalizer use 2012-07-06 Dirk Eddelbuettel * inst/include/Rcpp/config.h: In order to not attempt to include exception_defines.h if on OS X (as the clang runtime may not have predictable access to g++ headers providing these), do not define RCPP_HAS_DEMANGLING which is used in src/exceptions.cpp 2012-06-28 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.13 * inst/NEWS: Release 0.9.13 * inst/include/Rcpp/config.h: Release 0.9.13 * debian/*: Similarly updated for new release to Debian * tests/doRUnit.R: Updated, added (by default commented-out) setting to enforce all tests to run, added standard copyright headers noting heritage off work by Martin Maechler and Gregor Gorjanc * inst/unitTests/runTests.R: Only check environment variable to run all tests if it is not already set (to cooperate with doRUnit.R) 2012-06-27 Dirk Eddelbuettel * src/Environment.cpp: Default ctor initializes its RObject with R_GlobalEnv; SEXP constructor does not use a default arg as it tests * inst/include/Rcpp/Environment.h: Corresponding change * inst/include/RcppCommon.h: #define(s) for before/after clang++ 3.0 * src/exceptions.cpp: Added support for clang++ (>= 3.0) which (just like g++ 4.6 or later) needs bits/exceptions_defines * inst/unitTests/runit.modref.R: re-activated * inst/unitTests/runit.Module.client.package.R: re-activated core * inst/unitTests/runit.modref.R: Run only if RunAllCppTests var set * inst/unitTests/runit.Module.client.package.R: Idem * inst/unitTests/runit.support.R: Idem * inst/unitTests/runit.rcout.R: Idem * inst/unitTests/runit.environments.R: Idem * inst/unitTests/runit.Language.R: Idem * inst/unitTests/runit.Function.R: Idem 2012-06-23 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.12 * inst/NEWS: Release 0.9.12 * inst/include/Rcpp/config.h: Release 0.9.12 * debian/*: Similarly updated for new release to Debian * src/Environment.cpp: Remove empty constructor which is redundant since fix in rev3592 with default SEXP value of R_GlobalEnv * inst/include/Rcpp/Environment.h: Idem * inst/unitTests/runTests.R (allTests): Command-line flag --allTests sets an environment variable indicating that all tests should run * inst/unitTests/runit.Module.R: Run only if RunAllCppTests var set * inst/unitTests/runit.Module.client.package.R: Idem * inst/unitTests/runit.client.package.R: Idem * inst/unitTests/runit.XPtr.R: Idem * inst/unitTests/runit.macros.R: Idem * inst/doc/unitTests/Rcpp-unitTests.R: Ensure Rcpp-unitTests vignette is built with RunAllCppTests flag set * cleanup: Also clean in inst/unitTests/testRcppClass/src * DESCRIPTION: Set Maintainer: to edd@debian.org as CRAN prefers to receive upload email from the same address the Maintainer field 2012-06-22 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.11 * inst/NEWS: Release 0.9.11 * inst/include/Rcpp/config.h: Release 0.9.11 * debian/*: Similarly updated for new release to Debian * DESCRIPTION: Increased Depends to R (>= 2.15.1) 2012-06-21 Dirk Eddelbuettel * inst/doc/Rcpp-modules/Rcpp-modules.Rnw: Updated to reflect use under R 2.15.1 * inst/skeleton/zzz.R: Idem 2012-06-20 Dirk Eddelbuettel * R/loadRcppModules.R: Use lib.loc= argument on packageDescription() as suggested by Kurt, and fetch libname from enclosing environment * DESCRIPTION: Typo and grammar fixes with thanks to Kurt and Doug 2012-05-25 Dirk Eddelbuettel * inst/skeleton/zzz.R: Added new 'evalqOnLoad()' call for R-devel, currently commented out 2012-05-24 Dirk Eddelbuettel * inst/skeleton/Num.cpp: Added to Rcpp.package.skeleton(); will be added when module=TRUE in call * inst/skeleton/stdVector.cpp: Idem * inst/unitTests/testRcppModule/src/rcpp_module.cpp: added more comments, added copyright header, corrected output of example functions by not escaping "backslash-n" twice * inst/unitTests/testRcppModule/src/stdVector.cpp: added some comments, added copyright header * inst/unitTests/testRcppModule/src/Num.cpp: Idem * inst/unitTests/runit.Module.client.package.R: Added four simple tests for Rcpp Modules * inst/doc/Rcpp-modules/Rcpp-modules.Rnw: Some extensions and clarifications added 2012-05-13 Dirk Eddelbuettel * inst/include/Rcpp/iostream/Rostream.h: Added Rstreambuf.h include as per rcpp-devel discussion with Alexey Stukalov 2012-05-09 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Expanded R CMD SHLIB discussion after suggested changes from SC8ren HC8jsgaard; also expanded compiler section a little mentioning clang/clang++ and icc. 2012-05-02 Dirk Eddelbuettel * src/Environment.cpp: Move one default argument to Environment.h * src/Function.cpp: Move one default argument to Function.h * inst/THANKS: Thanks to Anirban Mukherjee for these two changes 2012-04-28 John M Chambers * R/RcppClass.R: use globalVariables() from R 2.15.1 (with exists() test to no break older versions) to declare C++ fields and methods * inst/unitTests/testRcppClass/R/load.R: test use 2012-04-22 Dirk Eddelbuettel * src/debugging.cpp: Expanded 'if defined()' test to included Cygwin thanks to a patch submitted by Dario Buttari 2012-04-19 Dirk Eddelbuettel * src/Evaluator.cpp: errorOccuredSym never used and commented out 2012-04-18 John M Chambers * R/RcppClass.R: New version of setRcppClass, allowing R classes to extend C++ classes used via Rcpp modules * R/loadModule.R: New function, replaces uses of .onLoad() * man/*: Added/updated corresponding documentation 2012-04-07 Romain Francois * inst/include/Rcpp/vector/Vector.h: bug fix. reported on Rcpp-devel http://comments.gmane.org/gmane.comp.lang.r.rcpp/3292 2012-03-29 Dirk Eddelbuettel * inst/unitTests/runit.Vector.R: unit test for containsElementNamed 2012-03-29 Romain Francois * inst/include/Rcpp/vector/Vector.h: Vector<> gains the containsElementNamed method to test for presence of named element 2012-03-24 Romain Francois * src/cache.cpp: Using a single Rcpp_cache, stored in the Rcpp namespace * src/Evaluator.cpp: Using tryCatch instead of rcpp_tryCatch, no more using .Internal; but still define rcpp_TryCatch for backwards compat. 2012-03-23 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Added short subsection on how to test a package from the command-line, expanding a patch by Glenn Lawyer in response to an initial rcpp-devel post by Dirk 2012-02-16 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.10 * inst/NEWS: Release 0.9.10 * inst/include/Rcpp/config.h: Release 0.9.10 * debian/*: Similarly updated for new release to Debian 2012-02-16 Douglas Bates * src/Evaluator.cpp: PROTECT the expr argument to Evaluator::Run. Reorganize code. 2011-12-15 Douglas Bates * src/Evaluator.cpp: Avoid Rf_install inside an R API call 2012-02-12 Dirk Eddelbuettel * R/excections.R: Revert to previous use with .Internal * R/tools.R: Add branch for R 2.15.0 which can use assingInMyNamespace; else still use unlockBinding 2012-02-12 Dirk Eddelbuettel * Rcpp-introduction.Rnw: Small wording fix thanks to Pat Burns 2012-02-06 Romain Francois * R/exceptions.R: one less .Internal call * src/Evaluator.cpp: one less .Internal call 2012-02-03 Romain Francois * inst/include/Rcpp/Extractor.h: remove use of Fast in Extractor * inst/include/Rcpp/sugar/functions/mapply/mapply.h: new sugar function, similar to sapply, but with 2 or 3 (for now) input vectors 2012-02-01 Romain Francois * inst/include/Rcpp/iostream/Rostream.h: no need to include Rcpp.h here * inst/include/RcppCommon.h: include Rostream.h here, instead of ... * inst/include/Rcpp.h: ... here (needed for RcppArmadillo) 2012-01-29 Romain Francois * inst/include/Rcpp/sugar/diff.h: custom implementation of diff for the REALSXP case, skipping unnecessary NA tests 2012-01-24 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: New FAQ entry on passing a single option to g++, based on a rcpp-devel question by Whit Armstrong. 2012-01-15 Romain Francois * inst/include/Rcpp/vector/Vector.h: fixing IntegerVector(int,int), reported by Gregor Kastner on rcpp-devel * inst/unitTests/runit.Vector.R: regression test for the above 2011-12-25 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.9 * inst/NEWS: Release 0.9.9 * inst/include/Rcpp/config.h: Release 0.9.9 * debian/*: Similarly updated for new release to Debian 2011-12-24 Dirk Eddelbuettel * Reverting the 'int64' changes listed below (during the period from Oct-31 to Nov-07) 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' This covered svn revisions 3264 to 3308. * DESCRIPTION: Remove (for now) Depends: on int64 * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Ditto for int64_t example * inst/unitTests/runit.Module.client.package.R: On Windows, deactivate 'test.Module.package' * inst/unitTests/runit.client.package.R: On Windows, deactivate 'test.client.packageA' test 2011-12-23 Dirk Eddelbuettel * inst/unitTests/runTests.R: unit tests output 'fallback' directory changed to '..' and files are now in top-level of $pkg.Rcheck/ 2011-12-21 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.8 * inst/NEWS: Release 0.9.8 * inst/include/Rcpp/config.h: Release 0.9.8 * debian/*: Similarly updated for new release to Debian 2011-12-20 Dirk Eddelbuettel * inst/skeleton/zzz.R (.onLoad): correct order of arguments 2011-12-18 Dirk Eddelbuettel * inst/examples/FastLM/lmArmadillo.R: Link with -llapack when using external Armadillo library (but RcppArmadillo makes all this easier) 2011-12-18 Romain Francois * inst/doc/*: Fixes to various vignettes for new version of highlight 2011-12-16 Douglas Bates * inst/unitTests/runit.stats.R: Correct cut+paste typo in qbinom * inst/include/Rcpp/XPtr.h: Check for XPtr type constructing from SEXP 2011-12-12 John M Chambers * R/RcppClass.R: Added setRcppClass for classes extending C++ classes * man/setRcppClass.Rd: Added corresponding documentation * NAMESPACE: Added corresponding exports entry 2011-11-13 Dirk Eddelbuettel * inst/include/Rcpp/stats/f.h: Correct call to not require ncp parameter * inst/unitTests/runit.stats.R: Add unit tests for pf(), pnf(), pchisq(), pnchisq() and pcauchy() 2011-11-07 Romain Francois * include/Rcpp/internal/wrap.h: implemented wrap_dispatch_importer__impl for int64 and uint64, needed for RProtoBuf * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Add int64_t usage example 2011-11-06 Romain Francois * include/Rcpp/modules/Module_generated_Pointer_method.h: added code to deal with const free "methods", e.g. OUT foo( const Class*, ...) in modules Before const_method could only deal with actual const methods of the class, e.g. OUT Class::foo( ... ) const * include/Rcpp/modules/Module_generated_Pointer_CppMethod.h: idem * include/Rcpp/as.h: deal with as and as * include/Rcpp/internal/export.h : deal with as< some_container > and as< some_container > where some_container is some container that has iterators, e.g. std::vector 2011-10-31 Romain Francois * include/Rcpp/int64/int64_lite.h: handling int64_t and uint64_t types, based on the int64 package * include/Rcpp/internal/wrap.h: new dispatch layers to handle int64_t, uint64_t and containers of these * DESCRIPTION: new depending on int64 2011-10-28 Dirk Eddelbuettel * inst/include/Rcpp/iostream/Rostream.h (Rcpp): Added tentative patch for operator<< also contributed by Jelmer Ypma -- but kept commented out for now 2011-10-25 Dirk Eddelbuettel * src/Rostream.cpp: Patch by Jelmer Ypma which adds a new device 'Rcout' not unlike std::cout but uses Rprintf internally * src/Rstreambuf.cpp: Idem * include/include/Rcpp/iostream/Rostream.h: Idem * include/include/Rcpp/iostream/Rstreambuf.h: Idem * include/include/Rcpp.h: Include new headers * inst/unitTests/runit.rcout.R: Added simple unit test 2011-09-29 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.7 * inst/NEWS: Release 0.9.7 * inst/include/Rcpp/config.h: Release 0.9.7 * debian/*: Similarly updated for new release to Debian * inst/include/Rcpp/sugar/block/SugarBlock_1.h: Apply second path by Martyn Plummer to permit compilation on Solaris * inst/include/Rcpp/sugar/block/SugarBlock_2.h: Idem * inst/include/Rcpp/sugar/block/SugarBlock_3.h: Idem * inst/include/Rcpp/sugar/matrix/outer.h: Idem * inst/include/Rcpp/vector/LazyVector.h: Idem * inst/unitTests/testRcppModule/src/stdVector.cpp: Idem 2011-09-24 Dirk Eddelbuettel * inst/include/Rcpp/Extractor.h: Apply patch by Martyn Plummer to help with compilation on Solaris * inst/include/Rcpp/sugar/block/Vectorized_Math.h: Idem * inst/include/Rcpp/sugar/functions/math.h: Idem * inst/include/Rcpp/sugar/block/SugarBlock_2.h: Also applied path by Martyn Plummer, but with additional #ifdef layer for SunPro Compiler * inst/include/Rcpp/vector/LazyVector.h: Idem 2011-08-26 Douglas Bates * inst/examples/OpenMP/OpenMPandInline.r: Added another variant using import_transform for the Rcpp Vector class. 2011-08-26 Dirk Eddelbuettel * inst/include/*h: Removed exception specifiers in function headers * src/*cpp: Corresponding changes in implementations * inst/examples/OpenMP/OpenMPandInline.r: Added two std::transform() variants as suggested in rcpp-devel email by Davor Cubranic 2011-08-25 Dirk Eddelbuettel * inst/examples/OpenMP/OpenMPandInline.r: Added new example for OpenMP via inline, comparing simple loops with plain Rcpp and sugar 2011-08-23 Dirk Eddelbuettel * inst/examples/Misc/ifelseLooped.r: Added new example based on blog post today, and a StackOverflow ansers---and which shows how Rcpp can accelerate loops that may be difficult to vectorise due to dependencies * inst/examples/Misc/: New directory for small examples regrouping the new example as well as the fibonacci example added in Rcpp 0.9.6 2011-08-17 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Added a short section including an example on the issue raised by Murray wherein 64 bit 'long' integer types can be cast with loss to numeric types without error or warning. 2011-07-28 Dirk Eddelbuettel * inst/unitTests/runit.Function.R: new unit test for accessing a non-exported function from a namespace 2011-07-26 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.6 * inst/NEWS: Release 0.9.6 * inst/include/Rcpp/config.h: Release 0.9.6 * debian/*: Similarly updated for new release to Debian 2011-07-24 Dirk Eddelbuettel * inst/examples/Fibonacci/fib.r: New example showing how to compute a Fibonacci sequence using Rcpp and compare it to R and byte-compiled R 2011-07-14 Dirk Eddelbuettel * inst/examples/RcppGibbs/RcppGibbs.R: New example RcppGibbs, extending Sanjog Misra's Rcpp illustration of Darren Wilkinson's comparison of MCMC Gibbs Sampler implementations; * inst/examples/RcppGibbs/timeRNGs.R: added short timing on Normal and Gaussian RNG draws between Rcpp and GSL as R's rgamma() is seen to be significantly slower 2011-07-13 Romain Francois * inst/include/Rcpp/traits/is_eigen_base.h: helper traits to facilitate implementation of the RcppEigen package. The is_eigen_base traits identifies if a class derives from EigenBase using SFINAE * inst/include/Rcpp/internal/wrap.h: new layer of dispatch to help RcppEigen 2011-07-07 Romain Francois * inst/include/Rcpp/XPtr.h: The XPtr class template gains a second template parameter allowing the developper to supply his/her own finalizer instead of the default one that calls delete 2011-07-05 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.5 * inst/NEWS: Release 0.9.5 * inst/include/Rcpp/config.h: Release 0.9.5 * debian/*: Similarly updated for new release to Debian 2011-07-02 Dirk Eddelbuettel * cleanup: Also clean in examples/OpenMP/ 2011-06-09 Dirk Eddelbuettel * inst/skeleton/zzz.R (.onLoad): Force load of methods package before calling loadRcppModules() to make 'R CMD check' happier 2011-06-06 Romain Francois * inst/include/Rcpp/vector/Vector.h : init becomes protected to fix the bug reported by Doug Bates on Rcpp-devel. 2011-05-31 Romain Francois * R/loadRcppModules.R: New argument "direct" in loadRcppModules * R/tools.R: New unexported function forceAssignInNamespace 2011-05-29 Dirk Eddelbuettel * inst/include/Rcpp/stats/random/rlnorm.h: Repaired accidental header guard from 'norm' to 'lnorm' so that the file really gets included, make several calls to standard library 'exp()' explicit as '::exp()' and fixed a cut-and-paste typo 2011-05-24 Dirk Eddelbuettel * inst/include/Rcpp/internal/wrap.h: For arguments of type const char *, wrap now checks for NULL arguments before calling Rf_mkString() * unitTests/runit.wrap.R: Added unit test for this 2011-05-14 Dirk Eddelbuettel * inst/doc/Rcpp-quickref/Rcpp-quickref.Rnw: Corrected an error in STL example and added two more STL examples 2011-04-27 Dirk Eddelbuettel * inst/examples/OpenMP/piWithInterrupts.cpp: Beginnings of new contributed example on OpenMP as well as user interrupt handling 2011-04-26 Romain Francois * inst/include/Rcpp/sugar/functions/mean.h: new sugar function: mean * inst/include/Rcpp/sugar/functions/var.h: new sugar function: var * inst/include/Rcpp/sugar/functions/sd.h: new sugar function: sd 2011-04-19 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: New example setting row and column names for matrices 2011-04-16 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: New example using Rcpp.plugin.maker 2011-04-12 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.4 * inst/NEWS: Release 0.9.4 * inst/include/Rcpp/config.h: Release 0.9.4 * debian/*: Similarly updated for new release to Debian 2011-04-12 Romain Francois * inst/unitTests/testRcppModules/src/stdVector.cpp: compiler disambiguation * src/r_cast.cpp: use a callback to R's "as.character" instead of calling Rf_coerceVector, which did not work as expected for factors 2011-04-11 Romain Francois * R/loadRcppModules.R: New R function "loadRcppModules" that looks for the "RcppModules" field in the DESCRIPTION file, loads and populates the modules into the package NAMESPACE * man/loadRcppModules.Rd: documentation * inst/unitTests/testRcppModule: using loadRcppModules 2011-04-11 Dirk Eddelbuettel * inst/man/Rcpp-package.Rd: Added JSS reference in \references{} * inst/doc/*: Added JSS reference to vignettes 2011-04-09 Dirk Eddelbuettel * inst/CITATION: Finalized using JSS data on volume, number, pages 2011-04-07 Dirk Eddelbuettel * inst/doc/Rcpp-quickref/Rcpp-quickref.Rnw: Add patch by Christian pointing out need for Rcpp:: namespace qualifier, and hint for Rcpp-FAQ 2011-04-05 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Added OS X entry for min. sufficient versions of OS X itself and Xode based on Simon's post to rcpp-devel 2011-04-05 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.3 * inst/NEWS: Release 0.9.3 * inst/include/Rcpp/config.h: Release 0.9.3 * debian/*: Similarly updated for new release to Debian 2011-04-05 Romain Francois * R/01_show.R: set of cosmetic changes to the show method for C++ classes * inst/include/Rcpp/Module.h: fixed module bug by not using singletons of the class_ template 2011-04-03 Dirk Eddelbuettel * inst/doc/Rcpp-introduction.Rnw: Updated to forthcoming JSS paper * inst/CITATION: Added citation() support using forthcoming paper * inst/doc/Makefile: Trying make parallel builds possible by not calling 'clean' in the 'all' target; thanks to Brian Ripley for the heads-up 2011-04-02 Dirk Eddelbuettel * cleanup: Also clean in inst/unitTest/testRcppModule/src/ * inst/include/RcppCommon.h: Define new variable for g++ < 4.6.0 * src/exceptions.cpp: Include up to g++-4.5 only * inst/unitTests/testRcppModule/src/stdVector.cpp: Use #ifdef not #if * inst/include/Rcpp/module/Module_generated_ctor_signature.h: Add a bit of null-op code to suppress a 'unused parameter' warning in the initial (and non-templated) ctor_signature() function 2011-03-21 Dirk Eddelbuettel * inst/unitTests/testRcppModule/src/stdVector.cpp: Protect push_back declaration by #ifdef as it conflicts with -std=c++0x use for g++-4.5 2011-03-17 Dirk Eddelbuettel * inst/include/RcppCommon.h: Condition the typedef for 'long long' of rcpp_long_long_type on the (still experimental) support for C++0x which can be enabled with the non-portable g++ flag '-std=c++0x'; adding a test for C++0x support suppresses a new warning with g++ about long long being part of C++98; thanks to Kurt Hornik for raising this 2011-03-10 Dirk Eddelbuettel * inst/include/Rcpp/grow.h: Applied another patch kindly supplied by Murray which fixes another clang/llvm and C++ conformance issue by re-ordering declarations as unqualified names must be declared before they are used, even when used within templates. 2011-02-28 Dirk Eddelbuettel * inst/doc/Makefile: Call R and Rscript relative to R_HOME/bin 2011-02-23 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.2 * inst/NEWS: Release 0.9.2 * inst/include/Rcpp/config.h: Release 0.9.2 * debian/*: Similarly updated for new release to Debian * inst/include/RcppCommon.h: Apply patch by Alexey Stukalov to enable basic Intel Compiler support without Cxx0x or TR1 features * inst/THANKS: Added some Thank You! to Baptiste, Alexey and Ken * inst/include/Rcpp/Module.h: Minor reworking of module loading macro to get rid of one g++ warning 2011-02-22 Dirk Eddelbuettel * inst/unitTests/runit.Module.client.package.R: Add a test for OS X 10.5.* or older and do not execute the test here as g++ 4.2.1 balks at some of the Rcpp modules code. Thanks to Simon Urbankek for pinning this down and Baptiste Auguie for additonal testing. 2011-02-20 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Added RcppArmadillo example 2011-02-19 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Added three more setup-related questions in the first section following another rcpp-devel question 2011-02-14 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.1 * inst/NEWS: Release 0.9.1 * inst/include/Rcpp/config.h: Release 0.9.1 * debian/*: Similarly updated for new release to Debian 2011-02-13 Dirk Eddelbuettel * inst/include/Rcpp/Module.h: Cache return of Rf_install("Module") in a static helper function used by the LOAD_RCPP_MODULE macro 2011-02-11 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Added two more examples 2011-02-10 Douglas Bates * inst/include/Rcpp/XPtr.h: Replace calls to EXTPTR_PTR with R_ExternalPtrAddr. The distinction is important when R is compiled with PROTECTCHECK enabled. 2011-02-01 Romain Francois * inst/include/Rcpp/vector/Vector.h: extra PROTECT'ion in several places 2011-01-25 Dirk Eddelbuettel * inst/include/Rcpp/DataFrame_generated.h: Assign Rf_install() result to local SEXP (by modifying generator script creating the file) * inst/include/Rcpp/DataFrame.h: Assign Rf_install() result to local SEXP * inst/include/Rcpp/DottedPair.h: idem * inst/include/Rcpp/grow.h: idem * inst/include/Rcpp/Module.h: idem * inst/include/Rcpp/vector/eval_methods.h: idem * inst/include/Rcpp/vector/Vector.h: idem 2011-01-25 Douglas Bates * src/exceptions.cpp: Assign Rf_install() result to local SEXP * src/Evaluator.cpp: idem * src/Reference.cpp: idem * src/S4.cpp: idem * inst/include/Rcpp/Date.h: Use predefined symbol. 2011-01-22 Dirk Eddelbuettel * src/cache.cpp: Assign Rf_install() result to local SEXP * src/Environment.cpp: idem * src/Evaluator.cpp: idem * src/Function.cpp: idem * src/Function.cpp: idem * src/RObject.cpp: idem * src/Symbol.cpp: idem * inst/doc/Rcpp.bib: Added SoDA (some time ago) 2011-01-13 Douglas Bates * src/Reference.cpp: Protect the value being set in Reference::FieldProxy::set 2011-01-11 Romain Francois * inst/include/Rcpp/vector/string_proxy.h: fix implicit conversion to int, reported by Daniel Sabanes Bove on Rcpp-devel * inst/unitTests/runit.vector.R: unit test for the above fix 2011-01-08 Dirk Eddelbuettel * inst/doc/Rcpp.bib: Updated a number of CRAN versions 2011-01-07 Dirk Eddelbuettel * inst/include/Rcpp/config.h (RCPP_VERSION): Set to 0.9.0, at last. 2011-01-06 Douglas Bates * R/zzz.R (.onLoad): Don't call init_Rcpp_cache here. * src/Rcpp_init.c: Don't register init_Rcpp_cache. It should only be called once and it is called in the C function R_init_Rcpp. * NAMESPACE: Use registered symbols instead of relisting them. Registration allows for checking the number of arguments. 2011-01-04 Dirk Eddelbuettel * src/debugging.cpp: Treat the *BSD flavours like Windows and offer file and line number but not stack trace (for lack of execinfo) * src/Makevars: Replace implicit variable $^ with explicit list 2011-01-02 Dirk Eddelbuettel * inst/doc/Rcpp-quickref/Rcpp-quickref.Rnw: Applied patch with additional documentation by Christian Gunning 2010-12-23 Romain Francois * inst/include/Rcpp/RObject.h: New internal class SEXPstack to handle garbage collection. Presumably more efficient than R_PreserveObject and R_ReleaseObject * inst/include/Rcpp/sugar/operators/times.h: More efficient operator* for REALSXP sugar expressions, avoiding unnecessary NA tests. * inst/include/Rcpp/sugar/operators/divides.h: More efficient operator/ for REALSXP sugar expressions, avoiding unnecessary NA tests. * inst/include/Rcpp/sugar/operators/minus.h: More efficient operator- for REALSXP sugar expressions, avoiding unnecessary NA tests. 2010-12-22 Romain Francois * inst/include/Rcpp/sugar/operators/plus.h: More efficient operator+ for REALSXP sugar expressions, avoiding unnecessary NA tests. 2010-12-22 Dirk Eddelbuettel * inst/unitTests/runit.Vector.R: Applied patch by Christian Gunning to add more tests for complex-typed vectors 2010-12-20 Dirk Eddelbuettel * R/inline.R (Rcpp.plugin.maker): Reverse order in PKG_LIBS 2010-12-19 Dirk Eddelbuettel * DESCRIPTION: Release 0.9.0 * debian/*: Similarly updated for new release to Debian 2010-12-18 Dirk Eddelbuettel * inst/announce/ANNOUNCE-0.9.0.txt: Started announcement post * inst/unitTests/runit.Date.R: Added new unit tests for date and datetime from string 2010-12-17 Dirk Eddelbuettel * inst/include/Rcpp/Datetime.h: correct default format to use %OS for fractional seconds and not the popular typo %OS (i.e. ooh, not zero) * src/Datetime.cpp: add missing as.POSIXct() after strptime for constructor from string as we then use the constructor from double * src/Date.cpp: add missing as.Date() after strptime for constructor from string as we then use the constructor from int 2010-12-13 Romain Francois * inst/include/Rcpp/vector/string_proxy.h: List::Proxy did not convert bool correctly, reported on Rcpp-devel by Daniel SabanC)s BovC) 2010-12-12 Romain Francois * R/SHLIB.R: new unexported R function SHLIB, small wrapper around R CMD SHLIB * inst/include/Rcpp/sprintf.h: returning a std::string to avoid leaks 2010-12-10 Dirk Eddelbuettel * inst/include/Rcpp/sprintf.h: Use vsnprintf() instead 2010-12-10 Romain Francois * inst/include/Rcpp/barrier.h: faster versions (crossing the write barrier) for string_elt, etc ...(to be used only internally) * src/barrier.cpp: implementation of the above 2010-12-09 John M Chambers * src/Module.cpp: Rcpp/src/exceptions.cpp, Rcpp/src/Rcpp_init.c, etc. add a not_initialized exception and a dummy_pointer to identify such objects, throw exc. back to R 2010-12-07 Romain Francois * inst/include/Rcpp/vector/matrix.h: Matrix gains a nested ::Sub typedef 2010-12-05 Romain Francois * inst/include/Rcpp/module/Module_generated_class_constructor.h: the default constructor was always considered valid because of the use of &yes instead of &yes_arity<0> * R/Rcpp.package.skeleton.R: Rcpp.package.skeleton( "foo", example_code = FALSE) did not work properly. Rcpp.package.skeleton gains some arguments 2010-12-05 Dirk Eddelbuettel * src/Date.cpp: Add 1900 to tm.year after mktime00() call as we now no longer assume the field is '1900-less' * src/Date.cpp: Define new static const variable baseYear as 1900 and use throughout * inst/unitTests/runit.Date.R (test.Date.getFunctions): Added unit tests for the get* functions of the Date class * R/bib.R (bib): Correct expression for default Rcpp bibtex file 2010-12-04 Dirk Eddelbuettel * inst/include/Rcpp/Date.h: Remove addition of 1900 in getYear() 2010-12-04 Romain Francois * inst/doc/Rcpp-quickref/Rcpp-quickref.Rnw: documentation patch by Christian Gunnning * inst/include/Rcpp/vector/matrix.h: fix SubMatrix. Bug reported by Christian Gunnning on Rcpp-devel * inst/include/Rcpp/vector/SubMatrix.h: factored out of matrix.h * inst/include/Rcpp/sprintf.h: new sprintf template to format strings 2010-12-03 Dirk Eddelbuettel * inst/unitTests/runit.RObject.R: fix 'inherits' test added today * inst/include/Rcpp/module/Module_generated_Constructor.h: Applied patch by Tama Ma for up to seven args in ctor * inst/include/Rcpp/module/Module_generated_class_constructor.h: Idem * inst/include/Rcpp/module/Module_generated_ctor_signature.h: Idem 2010-12-03 Romain Francois * inst/include/Rcpp/RObject.h : new inline method inherits that checks if an object inherits from a given class (wrapper around Rf_inherits) * inst/unitTests/runit.RObject.R: unit test for the above 2010-12-02 Douglas Bates * inst/include/Rcpp/generated/Function__operator.h, inst/include/Rcpp/Function.h: operator() becomes const. 2010-11-29 Romain Francois * inst/include/Rcpp/vector/Vector.h: trying to please suncc after CRAN checks * R/Module.R: protect the module$refClassGenerators <- generators line against the case where there are no classes (triggered a problem with the parser package) 2010-11-27 Dirk Eddelbuettel * DESCRIPTION: Release 0.8.9 * debian/*: Similarly updated for new release to Debian 2010-11-26 Romain Francois * inst/include/Rcpp/vector/Vector.h: List::create( _["foo"] ) sets the SEXP to R_MissingArg, usueful for formal arguments specifications, simpler form than List::create( _["foo"] = R_MissingArg ) * inst/include/Rcpp/macros/unroll.h: helper macro RCPP_UNROLL_LOOP * inst/include/Rcpp/vector/MatrixColumn.h: added MatrixColumn::operator=( MatrixColumn& ) otherwise it gets synthetized by the compiler * inst/include/Rcpp/vector/MatrixRow.h: same for MatrixRow * inst/include/Rcpp/vector/Matrix.h: added Matrix( SubMatrix ) and Matrix::operator=( SubMatrix ) 2010-11-25 Romain Francois * inst/include/Rcpp/module/Module_generated_function.h: new .function with formal argument specification * inst/include/Rcpp/module/Module_generated_CppFunction.h: helper classes for the above * R/Module.R: using the formal argument specification if available * R/populate.R: new R function populate to dump the contents of a module into an environment or a namespace * man/populate.Rd: documentation for populate 2010-11-24 Romain Francois * R/00_classes.R: formals<- method for C++Function that allows to set default arguments, etc .. to a C++ function 2010-11-23 Dirk Eddelbuettel * inst/doc/Makefile: Call Rscript with --vanilla to skip user settings 2010-11-23 Romain Francois * R/00_classes.R: C++Class gains a docstring slot to host self documentation * R/Module.R: calling an exposed C++ more efficiently by using the xp directly rather than traversing the map internally * R/00_classes.R: C++Function gains a docstring slot to host self documentation of the internal function. And a "signature" slot to host the C++ signature of the function * R/01_show.R: updated show( C++Function ) to display the docstring and the signature. updated show( C++Class ) to display the docstring. * inst/include/Rcpp/module/Module_generated_CppFunction.h: self documentation for exposed C++ functions and extraction of the signature * inst/include/Rcpp/module/Module_generated_function.h: idem 2010-11-22 Romain Francois * R/00_classes.R: C++OverloadedMethods gains an "info" class methods, factored out from Module.R * R/01_show.R: more information printed in show( C++Class ) * inst/include/Rcpp/Module/Module_generated_get_signature.h: templates to grab method signatures * inst/include/Rcpp/Module.h: CppMethod gains a signature method that returns the signature of the method. * R/00_classes.R: C++OverloadedMethods gains a "signatures" field that contains the signature of each overload * R/Module.R: registered method gain an automatically generated self description that contains the method(s) signature(s) and the docstring that is declared in .method * inst/include/Rcpp/Module/Module_generated_CppMethod.h: implement signature * inst/include/Rcpp/Module/Module_generated_Pointer_CppMethod.h: idem 2010-11-21 Romain Francois * R/Module.R: internal version of cpp_hasDefaultConstructor * src/Module.cpp: implementation (Class__has_default_constructor) * inst/include/Rcpp/Module.h: support (class_.has_default_constructor) * inst/include/Rcpp/module/Module_generated_class_constructor.h: new interface for exposing constructors, the init_ disappears and the template arguments are directly applied to the .constructor function * inst/include/Rcpp/module/Module_generated_Constructor.h: removed init_* * inst/include/Rcpp/module/Module_generated_method.h: .method gains a docstring argument to allow self documentation of exposed methods * inst/include/Rcpp/module/Module_generated_PointerMethod.h: idem * R/Module.R: grab method docstrings 2010-11-20 John M Chambers * R/Module.R: now checks for the existence of a default constructor for a C++ class and generates a suitable $initialize() method accordingly. 2010-11-20 Romain Francois * inst/include/Rcpp/vector/MatrixRow.h: added missing return *this ; * R/Module.R: dispatch based on void-ness of the methods. For example if all methods are known to be void, etc ... * R/00_classes.R: more information in the C++OverloadedMethods ref class * src/Module.cpp: new .External CppMethod__invoke_void and CppMethod__invoke_notvoid that are used when we know for sure that all overloaded methods are void, or not void * inst/include/Rcpp/Module.h: class_ gains invoke_void and invoke_notvoid to support the changes above 2010-11-18 Douglas Bates * inst/include/Rcpp/module/Module_generated_[class_]Constructor.h: allow up to 6 arguments to .constructor 2010-11-18 Romain Francois * inst/include/Rcpp/Module.h: rework the class_ template to allow overloaded methods * R/00_classes.R: The C++Method class disappears and the C++OverloadedMethods enters. a "C++OverloadedMethods" object points to a set of overloaded C++ methods that all share the same name. * R/Module.R: adapt some of the code to cope with changes above 2010-11-17 Romain Francois * inst/include/Rcpp/sugar/as_vector.h: added the as_vector function that turns a sugar matrix expression into a vector of the appropriate type * inst/include/Rcpp/vector/Matrix.h: new SubMatrix class 2010-11-13 Romain Francois * inst/include/Rcpp/Module.h: expose constructors as the "cpp_constructor" field of "C++ClassRepresentation" and the "constructors" slot of "C++Class" 2010-11-07 Romain Francois * inst/include/Rcpp/sugar/operators/minus.h: fixed Minus_Vector_Primitive * inst/unitTests/runit.sugar.R: new test for the above 2010-11-05 Romain Francois * inst/include/Rcpp/Module.h: exposing multiple constructors in modules * src/Module.cpp: The mangled class name is now "Rcpp_" plus the class name. The previous version used the address of the external pointer to the module, which was not constant. 2010-11-04 Douglas Bates * inst/include/Rcpp/module/Module_generated_Constructor.h: remove redundant 'return's. 2010-11-04 Romain Francois * inst/include/Rcpp/Module.h: experimental way to specify which constructor to use in classes exposed by modules. This is still too restrictive as it only allows one constructor. * inst/include/Rcpp/sugar/block/SugarMath.h: extend the SUGAR_MATH_1 macro so that we can apply functions (e.g. sqrt) directly on SEXP 2010-11-01 Dirk Eddelbuettel * DESCRIPTION (Version): Release 0.8.8 * debian/*: Similarly updated for new release to Debian 2010-10-30 Dirk Eddelbuettel * inst/include/RcppCommon.h: New define IS_GCC_450_OR_LATER * inst/include/Rcpp/Extractor.h: Do not enable Rcpp::Fast if g++ 4.5.0 or later is used -- we need to figure out what upsets it 2010-10-23 Romain Francois * inst/include/Rcpp/vector/MatrixRow.h: Faster row indexing * inst/include/Rcpp/vector/Matrix.h: added use of _ to get columns and rows of a matrix. For example if x is a NumericMatrix, x(_,i) returns the same as x.column(i) and x(i,_) returns the same as x.row(i) * inst/unitTests/runit.Matrix.R: unit tests for the above * inst/include/Rcpp/sugar/functions/sum.h: the sugar version of sum now takes care of missing values correctly * inst/include/Rcpp/sugar/functions/cumsum.h: sugar version of cumsum 2010-10-21 Romain Francois * inst/include/Rcpp/vector/MatrixColumn.h: Fixed indexing bug (mismatch between number of rows and number of columns * inst/unitTests/runit.Matrix.R: test fix above based on the R-help/Rcpp-devel thread: http://article.gmane.org/gmane.comp.lang.r.rcpp/851 * inst/include/Rcpp/vector/MatrixColumn.h: Column gains a operator= taking a sugar expression. Faster indexing (caching the pointer instead of calling nrow many times) * inst/include/Rcpp/vector/Matrix.h: first pass at making matrix indexing faster 2010-10-21 Dirk Eddelbuettel * inst/include/Rcpp/Module.h: Reorder instantiation for class_ 2010-10-20 Dirk Eddelbuettel * include/Rcpp/XPtr.h: Applied patch by Karl Millar * include/Rcpp/vector/Vector.h: Idem 2010-10-19 Dirk Eddelbuettel * src/posixt.cpp: Correct POSIXct, POSIXt ordering for R 2.12.0 2010-10-14 Dirk Eddelbuettel * DESCRIPTION (Version): Release 0.8.7 * debian/*: Similarly updated for new release to Debian 2010-10-10 Romain Francois * tests/doRUnit.R: workaround to disable tests on windows 64 until we can figure out what upsets R CMD check. * R/Module.R: expose the finalizer 2010-10-07 John M Chambers * R/Module.R: modify cpp_refMethods to substitute the .External directly with the method and class pointers. 2010-10-03 Dirk Eddelbuettel * inst/include/Rcpp/stats/random/r*: Added comment reminding users read up on Section 6.3 of "Writing R Extensions" and the need to call GetRNGstate() and PutRNGstate() when using R's RNGs 2010-09-30 Romain Francois * inst/include/Rcpp/vector/MatrixRow.h: Matrix row inherits VectorBase so that it becomes a sugar expression, so that we can do something like this: NumericMatrix x( ... ) ; NumericVector x0 = x.row(0) ; * inst/include/Rcpp/vector/MatrixColumn.h: idem for columns * cleanup: run make clean in the inst/doc directory to install the fake vignettes 2010-09-27 Romain Francois * inst/include/Rcpp/traits/is_sugar_expression.h: new trait class to recognize sugar expressions * inst/include/Rcpp/vector/Vector.h: operator=( sugar expression) no longer allocate unnecessary memory. 2010-09-26 Romain Francois * inst/include/Rpp/Fast.h: new helper class Rcpp::Fast that allows faster indexing of Vector * inst/include/Rcpp/sugar/operators/plus.h: port to operator+ the same improvements than in operator* 2010-09-25 Romain Francois * inst/include/Rcpp/routines.h: declare routines that are registered * src/Rcpp_init.c: register routines * R/*.R: use registration information in many .Call and .External functions to speed things up * inst/include/Rcpp/RangeIndexer.h: experimenting with loop unrolling 2010-09-24 John M Chambers * R/Module.R: modify cpp_fields to substitute the .Call directly with the field and class pointers; supplements the changes entered by Romain on 9-22. (svn rev 2165, 2141) * src/Rcpp_init.c: set up registration of .Call's (rev 2167) 2010-09-24 Romain Francois * inst/include/Rcpp/sugar/Range.h : Range gains some operators (++,--,n etc ...) * inst/examples/ConvolveBenchmarks/convolve3_cpp.cpp: using the new Range operators * inst/include/Rcpp/sugar/operators/times.h: speed improvements. Not using pointer to member functions seems to be beneficial. * inst/include/Rcpp/sugar/nona/nona.h: sugar function that wraps a sugar expression in an object that pretends it does not contain any missing values. This allows many sugar functions and operators to use their fast versions when we know that the object does not contain missing values. 2010-09-22 Romain Francois * R/Module.R: set [[ and [[<- as regular methods too, which restores previous behavior 2010-09-17 Romain Francois * src/Reference.cpp: new objects are created via a callback to R's new function, as R_do_new_object did always return the same environment * R/00_classes.R: new ref class C++Method to represent C++ methods and holding their external pointers directly (same idea as C++Field) * inst/include/Rcpp/Module.h: internal support for C++Method (template class S4_CppMethod) 2010-09-17 John M Chambers * R/00_classes.R, R/02_completion.R, et al.: use of environment underlying the reference classes removes need for slots in C++Object class (svn rev's 2133, 2134) 2010-09-16 Romain Francois * R/00_classes.R: moving classes definition here * inst/Rcpp/Module.h: added C++ class S4_field that builds S4 objects of class C++Field. Build the list of fields as part of the creation of the C++Class objects * src/Module.cpp: .Call functions CppField__get and CppField__set to get/set values of an object's field using external pointers directly (no std::map lookup internally) * R/Module.R: (unexported) functions .getField and .setField that call CppField__get and CppField__set * inst/include/Rcpp/Reference.h: skeleton for a Rcpp::Reference class that will help dealing with reference classes on the C++ side * src/Reference.cpp: implementation (needs update) 2010-09-16 John M Chambers * R/Module.R, tests/modRef.R: un-generic of new(); return a generator object for C++ classes. Use environment as superclass. 2010-09-15 Romain Francois * DESCRIPTION: added the declaration MinimumSvnRev to control which version of R-devel we need so that Rcpp fully works, currently set to 52905 * R/zzz.R: check the svn revision of R against the declared MinimumSvnRev requirement and print a message if necessary (this will only stay for the interim period while we develop 0.8.7 so that we all are on the same page. * inst/include/Rcpp/Module.h: added methods to class_Base : methods_arity and methods_voidness to query the number of arguments of methods of a class and if the method is void * R/Module.R: implement referenceMethods (from methods) for 'C++Class' 2010-09-11 Dirk Eddelbuettel * src/Date.cpp: Add include of unistd.h to make Solaris happy 2010-09-09 Dirk Eddelbuettel * DESCRIPTION: Release 0.8.6 * debian/*: Similarly updated for new release to Debian 2010-09-08 Dirk Eddelbuettel * inst/include/RcppCommon.h: Also include typeinfo header file 2010-09-08 Romain Francois * inst/include/Rcpp/Module.h : added class_Base::property_names method to grab the names of all fields (properties) * src/Module.cpp : added R access (.Call) function CppClass__properties to grab the names of the fields (property) from the XP of a class * inst/include/Rcpp/Module.h : added class_Base::property_is_readonly method to query if a property is read only * src/Module.cpp : added R access (.Call) function CppClass__property_is_readonly to query if a class property is read only * inst/include/Rcpp/Module.h : added class_Base::property_class method to grab the C++ class of a property * src/Module.cpp : added R access (.Call) function CppClass__property_class to grab the C++ class of a property 2010-09-06 Dirk Eddelbuettel * inst/examples/ConvolveBenchmarks/exampleRCode.r: Rewritten / simplified using the rbenchmark::benchmark() function * DESCRIPTION: Added Suggests: on rbenchmark package 2010-09-04 Dirk Eddelbuettel * inst/examples/ConvolveBenchmarks/exampleRCode.r: Some cosmetics * inst/examples/ConvolveBenchmarks/convolve3_cpp.cpp: Remove one unneccessary loop to set values to zero (which the ctor does for us) 2010-09-03 Dirk Eddelbuettel * inst/doc/Rcpp-extending/Rcpp-extending.Rnw: Add highlight definitions * inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: Idem * inst/doc/Rcpp-package/Rcpp-package.Rnw: Idem 2010-09-02 Dirk Eddelbuettel * src/msvcmath.cpp: Undo unmotivated msvc patch * inst/include/Rcpp/msvc/: Idem * inst/include/Rcpp/XPtr.h: Idem * inst/include/RcppCommon.h: Idem * src/Date.cpp: Idem * DESCRIPTION: Added Suggests: on highlight package 2010-08-20 Romain Francois * inst/include/Rcpp/complex.h : binary operators for Rcomplex : +,-,*,/ 2010-08-15 Romain Francois * inst/include/Rcpp/sugar/SugarBlock.h: more control of the NA behavior in SUGAR_BLOCK_2. SUGAR_BLOCK_2 will now propagate the NA, and the new SUGAR_BLOCK_2_NA will use a fixed NA (can be true or false). This can be useful if the function that is sugar'ed never generates NA. * inst/include/Rcpp/sugar/undoRmath.h : undo the macros done by Rmath.h 2010-08-13 Douglas Bates * include/Rcpp.h: undo more defines from Rmath.h 2010-08-13 Romain Francois * inst/include/Rcpp/sugar/complex.h: simplify complex sugar functions Re, Im, Conj, Mod * inst/include/Rcpp/sugar/complex.h: new sugar functions operating on complex expressions: exp, log, sqrt, cos, sin, tan, acos, asin, atan, acosh, asinh, atanh, cosh, sinh, tanh * inst/unitTests/runit.sugar.R: added regression test for complex functions which did not handle NA properly before * DESCRIPTION: no longer requireing GNU make as we dont use it anymore * src/Makevars: removed the use of ifeq (which was the last thing requiring GNU make) 2010-08-12 Romain Francois * inst/include/Rcpp/sugar/math.h: replace previous versions of floor, abs, exp, ceil, ceiling with versions generated by the SUGAR_MATH_1 macro 2010-08-11 Romain Francois * inst/include/Rcpp/vector/vector.h: Vector gains constructor taking size and function pointers, acting as generators : Vector( const int& siz, stored_type (*gen)(void), bool seed = true ) template Vector( const int& siz, stored_type (*gen)(U1), const U1& u1, bool seed = true) template Vector( const int& siz, stored_type (*gen)(U1,U2), const U1& u1, const U2& u2, bool seed = true) so that for example : NumericVector( 10, norm_rand ) generates a N(0,1) vector of size 10 * inst/include/Rcpp/stats/random/rlnorm.h: Added rlnorm and rlnorm_ * inst/include/Rcpp/stats/random/rgamma.h: Added rgamma and rgamma_ * inst/include/Rcpp/stats/random/rt.h: Added rt and rt_ * inst/include/Rcpp/stats/random/rbinom.h: Added rbinom and rbinom_ * inst/include/Rcpp/stats/random/rnchisq.h: Added rnchisq and rnchisq_ * inst/include/Rcpp/stats/random/rgeom.h: Added rgeom and rgeom_ * inst/include/Rcpp/stats/random/rhyper.h: Added rhyper and rhyper_ * inst/include/Rcpp/stats/random/rnbinom_mu.h: Added rnbinom_mu and rnbinom_mu_ * inst/include/Rcpp/stats/random/rnbinom.h: Added rnbinom and rnbinom_ * inst/include/Rcpp/stats/random/rpois.h: Added rpois and rpois_ * inst/include/Rcpp/stats/random/rweibull.h: Added rweibull and rweibull_ * inst/include/Rcpp/stats/random/rlogis.h: Added rlogis and rlogis_ * inst/include/Rcpp/stats/random/rwilcox.h: Added rwilcox and rwilcox_ * inst/include/Rcpp/stats/random/rsignrank.h: Added rsignrank and rsignrank_ * inst/include/Rcpp/stats/random/rnorm.h: some optimization * inst/include/Rcpp/stats/random/rf.h: calculate n2/n1 just once * inst/include/Rcpp/sugar/SugarBlock.h : templates and macros to facilitate generation of sugar functions that take one or two double parameters * inst/include/Rcpp/sugar/math.h: using SugarBlock to generate new sugar functions: (1 parameter) : gamma, lgamma, digamma, trigamma, tetragamma, pentagamma, expm1, log1p, factorial, lfactorial, cos, acosh, atan, cos, cosh, log, log10, sqrt, sin, sinh, tan, tanh (2 parameter) : choose, lchoose, beta, lbeta, psigamma 2010-08-10 Douglas Bates * include/Rcpp/stats/nbinom[_mu].h: Replace conflicting data member name 'size' by 'siz' 2010-08-10 Romain Francois * inst/include/Rcpp/stats/random/rnorm.h: Added rnorm and rnorm_ * inst/include/Rcpp/stats/random/runif.h: Added runif and runif_ * inst/include/Rcpp/stats/random/rbeta.h: Added rbeta and rbeta_ * inst/include/Rcpp/stats/random/rcauchy.h: Added rcauchy and rcauchy_ * inst/include/Rcpp/stats/random/rchisq.h: Added rchisq and rchisq_ * inst/include/Rcpp/stats/random/rexp.h: Added rexp and rexp_ * inst/include/Rcpp/stats/random/rf.h: Added rf and rf_ * inst/include/Rcpp/stats/stats.h : fixed name clash reported on Rcpp-devel http://permalink.gmane.org/gmane.comp.lang.r.rcpp/610 2010-08-09 Romain Francois * inst/include/Rcpp/stats/lnorm.h: Added d-p-q (lnorm|weibull|logis|f) generated by the script * inst/include/Rcpp/vector/Vector.h: further dispatch to allow generators to be passed to constructors of Vector * inst/include/Rcpp/traits/has_iterator.h: new SFINAE detection of generators * inst/include/Rcpp/Generator.h : base template class for generators 2010-08-06 Douglas Bates * unitTests/runit.stats.R: Corrected instances of numeric arguments passed as integers, deleted tests for binomial with fixed parameter values. 2010-08-06 Romain Francois * ../scripts/stats.R: R script to generate the template code for dpq functions * include/Rcpp/stats/unif.h: Added d-p-q unif and tests * include/Rcpp/stats/gamma.h: Added d-p-q gamma and tests * include/Rcpp/stats/chisq.h: Added d-p-q chisq 2010-08-05 Douglas Bates * include/Rcpp/stats/beta.h: Added d-p-q beta and tests * include/Rcpp/stats/binom.h: Added pbinom and qbinom, and tests of same in runit.stats.R * include/Rcpp/stats/pois.h: Added ppois and qpois (plus tests in runit.stats.R). * include/Rcpp/stats/norm.h: Added pnorm and qnorm and corresponding tests in unitTests/runit.stats.R 2010-08-05 Dirk Eddelbuettel * inst/include/Rcpp/stats/norm.h: Added dnorm sugar function * inst/include/Rcpp/stats/t.h: Added dt, pt, qt sugar functions * inst/include/unitTests/runit.stats.R: Added corresponding tests 2010-08-05 Romain Francois * inst/include/Rcpp/sugar/functions/seq_along.h: added seq(int,int) to mimic the R syntax : seq( 0, 5 ) * inst/include/Rcpp/sugar/Range.h: fixed compiler confusion * inst/include/Rcpp/stats: new sugar functions Rcpp::stats::dpois and Rcpp::stats::dbinom inspired by Richard Chandler post on Rcpp-devel: http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2010-August/000940.html * inst/include/Rcpp/sugar/sum.h: preliminary version of Rcpp::sum (does not deal with NA properly yet) 2010-08-04 Romain Francois * inst/include/Rcpp/sugar/: rework sugar matrix so that operator()(int,int) is always used instead of operator[](int) * inst/include/Rcpp/sugar/matrix/outer.h: new implementation based on LazyVector, so that the value from the vector expression is only retrieved once 2010-08-02 Romain Francois * inst/include/Rcpp/XPtr.h: give default values to tag and prot in XPtr ctor 2010-07-30 Romain Francois * inst/doc/Rcpp-quickref/* : new vignette Rcpp-quickref: quick reference guide to Rcpp API 2010-07-28 Romain Francois * inst/include/Rcpp/sugar/exp.h: adapt to stricter standards on solaris/suncc 2010-07-25 Dirk Eddelbuettel * DESCRIPTION: Release 0.8.5 * debian/*: Similarly updated for new release to Debian 2010-07-17 Romain Francois * inst/include/Rcpp/vector/Vector.h: faster lhs use of names, only using callback to R if necessary. (discovered while profiling RProtoBuf) * inst/include/Rcpp/RObject.h : faster lhs and rhs use of RObject::slot, using R API functions R_do_slot and R_do_slot_assign 2010-07-16 Dirk Eddelbuettel * src/Date.cpp: Small fix which may make Solaris/SunStudio happy 2010-07-16 Romain Francois * man/Rcpp-package.Rd : removed old content and point to the Rcpp-package vignette for current guidelines. * DESCRIPTION: Updated to mention sugar and modules 2010-07-10 Romain Francois * src/Makevars: Remove last call to $shell by turning C++0x detection off (and into a switch users can edit) which should make builds more stable * src/Makevars.win: Idem * src/cxx0x/cxx0x.R: Detection script deprecated for now 2010-07-10 Romain Francois * man/CppClass-class.Rd: changed use of \linkS4Class to suppress a warning with the development version of R * man/CppObject-class.Rd: idem 2010-07-09 Dirk Eddelbuettel * DESCRIPTION: Release 0.8.4 * debian/*: Similarly updated for new release to Debian 2010-07-09 Romain Francois * src/RObject.cpp: adapt the SlotProxy class to deal with the special case of the .Data slot (slot<- changes the internal SEXP) * R/Module.R: the C++Class now inherits from "character", to facilitate S4 method dispatch * src/Module.cpp: The CppClass ctor sets the .Data of the C++Class object to an obfuscated name to avoid class names clashes at the R level. 2010-07-08 Romain Francois * inst/include/Rcpp/sugar/functions/head.h: new sugar function : head * inst/include/Rcpp/sugar/functions/tail.h: new sugar function : tail * inst/include/Rcpp/sugar/functions/tail.h: new sugar function : diag 2010-07-07 Dirk Eddelbuettel * inst/README: Updated and now pointing to all the other documentation 2010-07-07 Romain Francois * inst/include/Rcpp/sugar/functions/rep.h: version of rep that takes a primitive as the first argument 2010-07-07 Dirk Eddelbuettel * inst/unitTests/runTests.R: Reverted to running all tests now that tests are reorganised using the one-compile-per-function scheme which significantly speeds up running of the numerous unit tests 2010-07-06 Dirk Eddelbuettel * src/Date.cpp: Imported mktime() from R (which is due to Arthur Olson) 2010-07-06 Romain Francois * inst/include/Rcpp/sugar/functions/ifelse.h: using compile time dispatch based on the NA-ness of the condition type. ifelse handles primitive arguments on the lhs, rhs or both * inst/include/Rcpp/sugar/functions/rev.h: new sugar function: rev 2010-07-05 Romain Francois * inst/include/Rcpp/RcppCommon.h : no more using variadic macros in RCPP_DEBUG * inst/include/Rcpp/vector/Matrix.h: move ncol, nrow, rows and cols in Matrix (used to be in Vector) * inst/include/Rcpp/traits/matrix_interface.h: new SFINAE helper to detect matrix interface (helps matrix sugar expressions) 2010-07-03 Romain Francois * inst/include/Rcpp/traits/result_of.h : also deal with functions taking two arguments (useful for e.g. outer) * inst/include/Rcpp/vector/MatrixBase.h : new CRTP base class for Matrix to facilitate sugar syntax on matrices. * inst/include/Rcpp/sugar/matrix/outer.h : new sugar function: outer * inst/include/Rcpp/sugar/matrix/row.h: new sugar function: row * inst/include/Rcpp/sugar/matrix/col.h: new sugar function: col * inst/include/Rcpp/sugar/matrix/lower_tri.h: new sugar function: lower_tri * inst/include/Rcpp/sugar/matrix/upper_tri.h: new sugar function: upper_tri * inst/include/Rcpp/sugar/functions/rep.h: new sugar function : rep * inst/include/Rcpp/sugar/functions/rep_len.h: new sugar function : rep_len * inst/include/Rcpp/sugar/functions/rep_each.h: new sugar function : rep_each 2010-07-02 Dirk Eddelbuettel * src/RcppStringVector: Now uses std::vector * inst/include/classic/RcppStringVector.h: Idem * inst/unitTests/runit.List.R: Added simple test for RcppStringVector 2010-07-01 Dirk Eddelbuettel * src/RcppDateVector: Index argument is int here as well * src/RcppDatetimeVector: Idem * inst/include/classic/RcppDateVector.h: Idem * inst/include/classic/RcppDatetimeVector.h: Idem * inst/unitTests/runit.List.R: Added simple test for RcppList 2010-06-30 Dirk Eddelbuettel * src/DateVector: Index argument is int; throw declared * src/DatetimeVector: Idem * inst/include/Rcpp/DateVector.h: Idem * inst/include/Rcpp/DatetimeVector.h: Idem 2010-06-28 Romain Francois * inst/include/Rcpp/sugar/Im.h: * inst/include/Rcpp/sugar/Re.h: * inst/include/Rcpp/sugar/Conj.h: * inst/include/Rcpp/sugar/Mod.h: added sugar functions for complex vectors: Re, Im, Conj, Mod 2010-06-27 Dirk Eddelbuettel * DESCRIPTION: Release 0.8.3 * debian/*: Similarly updated for new release to Debian * inst/unitTests/runTests.R: Stop-gap measure to reduce the number of tests run on Windows as we now have so many tests that the build exceeds the time limit granted by the win-builder service. The forced reduction of tests can be overcome by adding --allTests as a command-line argument on Windows, or by running on another platform. 2010-06-25 Romain Francois * inst/include/Rcpp/posix.h: anticipate R 2.12.0 switch of classes POSIXt and POSIXct * inst/include/classic: New home for the 'classic' API headers. Also some refactoring of the internals so that they can interoperate better withuse the new API. 2010-06-24 Romain Francois * inst/include/Rcpp/vector/RangeIndexer.h: factored the RangeIndexer class out of Vector, so that we can at a later time specialize it for character vectors, lists, etc ... 2010-06-24 Dirk Eddelbuettel * inst/include/Rcpp/Date.h: add struct tm member variable and sensible (ie non-intra-day) accessor functions; add SEXP ctor * src/Date.cpp: Implementation of the above * inst/unitTests/runit.Date.R: tests for the above * inst/include/Rcpp/Datetime.h: New Datetime class * src/Datetime.cpp: Implementation for new Datetime class * inst/unitTests/runit.Datetime.R: first tests for Rcpp::Datetime * inst/include/Rcpp/Datetime_forward.h: API Integration * inst/include/Rcpp/DatetimeVector.h: New DatetimeVector class * src/Datetime.cpp: Implementation for new DatetimeVector class 2010-06-23 Dirk Eddelbuettel * src/Date.cpp: Import mktime00() from R's src/main/datetime.c, completed class implementation * inst/include/Rcpp/Date.h: Add mktime00() declaration * inst/include/Rcpp/DateVector.h: New DateVector class * src/Date.cpp: Implementation for new DateVector class 2010-06-23 Romain Francois * inst/include/Rcpp/Date_forward.h: forward declaration of Rcpp::Date and support for wrap( container of Rcpp::Date ), e.g. wrap( vector ) * inst/include/Rcpp/sugar/Range.h: added the concept of range to allow modification of several elements of a vector. * inst/examples/ConvolveBenchmarks: version of the convolution function using sugar indexing. 2010-06-22 Dirk Eddelbuettel * inst/include/Rcpp/Date.h: New Date class (not yet complete) * src/Date.cpp: Implementation for new Date class (not yet complete) * inst/unitTests/runit.Date.R: first tests for Rcpp::Date 2010-06-21 Dirk Eddelbuettel * inst/examples/SugarPerformance/: New example to benchmark the new syntactic 'sugar' classes 2010-06-19 Dirk Eddelbuettel * inst/include/RcppDoxygenExamples.h: Correct three wrong paths for ConvolveBenchmak example files, and add missing FastLM/ examples 2010-06-18 Romain Francois * inst/include/Rcpp/sugar/*: implementation of Rcpp sugar, covering binary operators (<,>,<=,>=,!=,==) for logical vectors or logical expressions, arithmetic operators (+,-,*,/) for vectors and expressions, and several functions similar to the R functions of the same name, currently: abs, all, any, ceiling, diff, exp, ifelse, is_na, lapply, pmin, pmax, pow, sapply, seq_along, seq_len, sign * inst/doc/Rcpp-sugar/Rcpp-sugar.Rnw: vignette documenting Rcpp sugar 2010-06-17 Romain Francois * inst/include/Rcpp/Vector.h: split into more manageable files * inst/include/Rcpp/vector/VectorBase.h: simplify the VectorBase class so that it is just implementing CRTP. It does not inherit from RObject anymore. This will help implementation of sugar. 2010-06-16 Dirk Eddelbuettel * src/RcppDateVector.cpp: Also provide non-const operator()(int i) * inst/include/RcppDateVector.h: Idem 2010-06-16 Romain Francois * inst/include/Rcpp/InternalFunction.h: new class Rcpp::InternalFunction * R/Module.R: R support for Rcpp::InternalFunction * inst/include/Rcpp/Module.h: added the LOAD_RCPP_MODULE macro to allow loading a module from C++ * R/Module.R: if the first argument is an external pointer already, Module assumes it is a module pointer. (R support for the item above) 2010-06-15 Dirk Eddelbuettel * src/RcppDatetimeVector.cpp: Use std::vector internally * inst/include/RcppDatetimeVector.h: Idem * src/RcppDateVector.cpp: Use std::vector internally * inst/include/RcppDateVector.h: Idem 2010-06-14 Dirk Eddelbuettel * src/RcppDatetimeVector.cpp: Add constructor from int * inst/include/RcppDatetimeVector.h: Idem * src/RcppDateVector.cpp: Add constructor from int * inst/include/RcppDateVector.h: Idem 2010-06-13 Dirk Eddelbuettel * src/RcppResultSet.cpp: Proper template specialisation for wrap * inst/include/RcppResultSet.h: Idem * src/RcppDateVector.cpp: Add const qualifier to operator()(int i) * inst/include/RcppDateVector.h: Idem 2010-06-13 Romain Francois * inst/include/Rcpp/Vector.h: added new factory functions for Vector: Vector::import and Vector::import_transform 2010-06-12 Dirk Eddelbuettel * src/RcppDate.cpp: Simple RcppDate(SEXP) ctor added * inst/include/RcppDate.h: Idem * src/RcppResultSet.cpp: carved out four new wrap() functions by splitting the existing code in add() methods off 2010-06-11 Romain Francois * R/help.R: workaround to allow the syntax "Rcpp ? something" to bring Rcpp documentation * inst/include/Rcpp/Module.h: support for exposing public data members * inst/doc/Rcpp-modules/Rcpp-modules.Rnw: a section to mention fields as a way to expose data members * inst/Rcpp/traits/is_na.h : new helper class Rcpp::traits::is_na 2010-06-09 Dirk Eddelbuettel * DESCRIPTION: Release 0.8.2 * debian/*: Similarly updated for new release to Debian 2010-06-08 Romain Francois * src/RcppCommon.cpp: track if demangling is available (currently only available with gcc) 2010-06-08 Dirk Eddelbuettel * DESCRIPTION: Release 0.8.1 * debian/*: Similarly updated for new release to Debian 2010-06-07 Dirk Eddelbuettel * inst/doc/Rcpp-extending*: Extended mini vignette "Rcpp-extending" 2010-06-07 Romain Francois * inst/doc/Rcpp-extending*: Added new mini vignette "Rcpp-extending" 2010-06-05 Dirk Eddelbuettel * inst/doc/Rcpp-FAQ*: Extended mini vignette "Rcpp-FAQ" 2010-06-05 Romain Francois * inst/doc/Rcpp-FAQ*: Added new mini vignette "Rcpp-FAQ" 2010-06-04 Romain Francois * inst/include/Rcpp/Module.h: * R/Module.R: support for properties of C++ objects 2010-06-03 Romain Francois * src/RcppCommn.cpp: added show method for C++Object and C++Class * inst/include/Rcpp/XPtr.h: getTag and getProtected are deprecated, will be removed in Rcpp 0.8.2. methods tag and prot should be used instead. The new methods support both lhs and rhs use. 2010-06-02 Romain Francois * inst/include/Rcpp/traits/r_type_traits.h: added missing support for std::complex, needed by RcppArmadillo * src/RcppCommon.cpp: added internal .Call function as_character_externalptr to extract the address of the pointer wrapped by an external pointer 2010-06-01 Romain Francois * inst/doc/Rcpp-package*: new mini vignette "Rcpp-package" to improve the documentation of Rcpp.package.skeleton and details the steps involved in making a package that uses Rcpp * inst/doc/Rcpp-modules/Rcpp-modules.Rnw: document how to use modules in other packages (namespace, etc ...) * R/Rcpp.package.skeleton: added the module argument * R/Module.R: prompt method for Module objects to generate skeleton of an Rd file with the list of functions and classes defined by the module. 2010-05-30 Romain Francois * R/Module.R: completion for C++ modules. 2010-05-29 Romain Francois * R/Module.R: when a Module is loaded, it creates extensions of the class C++Object for each internal class to enable S4 dispatch * R/Module.R: support for completion of methods of C++ objects 2010-05-28 Romain Francois * R/cppfunction.R: withdrawn, we now use inline::cxxfunction which is more flexible and we no longer need to depend on inline * man/cppfunction.Rd: * * inst/unitTests/runTests.R: The tests now require a recent version of inline (>= 0.3.4.2) 2010-05-27 Romain Francois * inst/include/Rcpp/Module.h: adding support for registering a free function that takes a pointer to the class of the wrapped object as first argument in class_ 2010-05-26 Romain Francois * inst/include/Rcpp/Module.h: * src/Module.cpp : limited support for exposing c++ classes in Rcpp modules * R/Module.R : classes "C++Class", "C++Object" holding external pointers and $ method dispatching internally 2010-05-24 Dirk Eddelbuettel * src/Rcpp*.cpp: Moved template code from the older API to headers headers in inst/include/*.h; removed empty source files 2010-05-21 Romain Francois * R/exceptions.R: rework rcpp_tryCatch to prevent evaluating the expression too early (reported by Doug Bates on Rcpp-devel) * src/Evaluator.cpp: rework Evaluator::run() so that it correctly evaluates inside an environment (reported by Doug Bates on Rcpp-devel) 2010-05-20 Romain Francois * inst/include/Rcpp/Vector.h : correct throw specs for vector_from_string (reported by Brian Ripley from solaris) * inst/include/Rcpp/internal/Proxy_Iterator.h: fixed constness of several operators in Proxy_Iterator to try to suite suncc/solaris * inst/include/Rcpp/config.h: define RCPP_ENABLE_MODULES to hide the experimental module features from the official api * R/getDLL.R: removed and promoted to getDynLib in inline 2010-05-19 Romain Francois * inst/include/Rcpp/as.h: add throw specification to as specialization, reported by suncc compiler on CRAN checks * inst/include/Rcpp/Module.h : adding the concept of Rcpp modules, inspired from boost.python * R/Module.R: R side support for modules * R/getDLL.R: generic (s4) function to get the DLL based on either its name e.g. getDLL( "Rcpp" ) or an object of class CFunc (from the inline package) 2010-05-17 Dirk Eddelbuettel * DESCRIPTION: Release 0.8.0 * debian/*: Similarly updated for new release to Debian 2010-05-11 Romain Francois * inst/include/Rcpp/traits/*.h: added support for long long int and unsigned long long int, which is size_t on win64 2010-05-10 Romain Francois * inst/include/Rcpp/Dimension.h: added a const operator[], requested in the Rcpp-devel thread : http://article.gmane.org/gmane.comp.lang.r.rcpp/327 * inst/include/Rcpp/preprocessor.h: added __rcpp_info__ pseudo reflection information to RCPP_XP_FIELD * inst/unitTests/runit.macros.R: testing RCPP_XP_FIELD 2010-05-06 Romain Francois * inst/include/Rcpp/DataFrame.h: DataFrame( RObject::SlotProxy ) and DataFrame( RObject::AttributeProxy ) constructors * inst/include/Rcpp/DataFrame.h: DataFrame::create now uses the R function data.frame and not as.data.frame, which respects the stringsAsFactors argument. * inst/include/Rcpp/preprocessor.h: added RCPP_XP_FIELD_SET and RCPP_XP_FIELD_SET macros to generate getter and setter for a field of a class handled by an external pointer. RCPP_XP_FIELD is modified to generate both getter and setter 2010-05-05 Romain Francois * inst/include/Rcpp/S4.h: S4 gains a "is" method to identify if an object is of a given S4 class, following Doug's advice in lme4a * inst/include/Rcpp/algo.h: new STL-like algorithms Rcpp::any and Rcpp::any_if * inst/include/Rcpp/Vector.h: Vector gains a constructor taking an RObject::SlotProxy and a constructor taking an RObject::AttributeProxy, allowing this construct NumericVector x( y.slot( "foo" ) ) 2010-05-04 Romain Francois * inst/include/Rcpp/preprocessor_generated.h: new macros to hide most of the boiler plate code RCPP_FUNCTION_0, ..., RCPP_FUNCTION_1 RCPP_FUNCTION_VOID_0, ... RCPP_XP_METHOD_0, ... RCPP_XP_METHOD_CAST_0, ... RCPP_XP_METHOD_VOID_0, ... 2010-05-03 Dirk Eddelbuettel * inst/unitTests/runit.DataFrame.R: unit tests for Rcpp::DataFrame 2010-05-03 Romain Francois * inst/include/Rcpp/exceptions.h : move the what methods of exception classes so that the symbol is defined for sure in the shared library. This seems to make a difference due to vague linkage issues. Decrypted from http://gcc.gnu.org/wiki/Visibility 2010-05-02 Romain Francois * inst/include/Rcpp/as.h: add throw(not_compatible) in Rcpp::as * inst/include/Rcpp/clone.h: the clone(SEXP) moves to the headers 2010-04-28 Romain Francois * inst/include/Rcpp/Vector.h: changed Vector( size_t ) to Vector( int ) to allow Vector( 0 ) and Vector::create() 2010-04-27 Romain Francois * inst/include/Rcpp/preprocessor.h: new macro RCPP_ENUM_TRAITS to generate traits needed to support wrap for an enum type (used in RProtoBuf) * R/Rcpp.package.skeleton.R: correctly handle the example_code argument 2010-04-26 Romain Francois * inst/include/Rcpp/DataFrame_*.h: new class Rcpp::DataFrame * inst/include/Rcpp/preprocessor.h: added RCPP_XP_FIELD macro * inst/include/Rcpp/preprocessor_generated.h: added the set of macros RCPP_WRAPPER_0, ..., RCPP_WRAPPER_65 to help wrapping existing C functions into .Call callables functions 2010-04-16 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.12 * debian/*: Similarly updated for new release to Debian * RcppLdpath.R: Remove shQuote() from trying to protect spaces in Windows pathnames as it breaks backticks expansion usage 2010-04-06 Romain Francois * inst/include/Rcpp/traits/*.h: added support for long 2010-04-04 Romain Francois * inst/include/* : headers are moved to inst/include so that they are are not duplicated on multi arch platforms * R/RcppLdPath.R: RcppCxxFlags is updated to reflect the above change * src/Makevars: simplified as the headers don't need to be copied to each arch lib directory anymore * src/Makevars.win: same * inst/include/Rcpp/Vector.h : Vector<> gains a templated assignment operator 2010-04-02 Romain Francois * src/Rcpp/Formula.h: new Rcpp::Formula class * inst/unitTests/runit.Formula.R: unit test for Rcpp::Formula 2010-03-26 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.11 * debian/*: Similarly updated for new release to Debian * inst/examples/FastLM: Updated to use new create() method * inst/unitTests/runit.Matrix.R: New unit test new Matrix constructors 2010-03-26 Romain Francois * src/Rcpp/Vector.h: Fixed bug in diag() 2010-03-23 Dirk Eddelbuettel * inst/unitTests/runit.CharacterVector.R: New unit test for bug found by Doug 2010-03-23 Romain Francois * src/Rcpp/Vector.h: fixed critical bug. Vector did not have copy constructor and assignement operators * src/exceptions.cpp: added the demangle helper function to help debugging * src/RcppCommon.h: added the DEMANGLE macro and the RCPP_DEBUG macro to help debugging. 2010-03-20 Romain Francois * src/Rcpp/Vector.h : Vector gains a templated fill method to fill all elements of a vector with the same value 2010-03-19 Romain Francois * src/Rcpp/Vector.h : Matrix gains a diag method to create diagonal matrices * src/Rcpp/Named.h: Named is no longer a class, but a templated function. This preserves all the existing interface, but also allows Named to be used in making simple vectors, e.g through the Vector::create factory functions * src/Rcpp/Vector.h: Vector gains the "create" factory methods taking up to 20 arguments that can be named (using the Argument class or the _ placeholder) * src/Rcpp/make_list.h: removed since Vector::create does the job more generically and more efficently 2010-03-19 Dirk Eddelbuettel * src/Rcpp/Vector.h: Matrix now also accepts a single int in the constructor to create matrices of square sizes * src/RcppFrame.h: Patch by Alistair Gee to make ColDatum more robust src/RcppFrame.h: Idem * inst/unitTests/runit.RcppFrame.R: New unit test for RcppFrame 2010-03-16 Romain Francois * src/Rcpp/make_list.h: set of helper factories make_list to facilitate production of named generic vectors. * src/Rcpp/Named.h: new class Rcpp::Argument similar to Named but does not contain the object, just the name. The templated Argument::operator= makes a Named. This allows an application to define a set of arguments that it uses in order to have a nicer construct. see the runit.Argument.R file for an example 2010-03-15 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.10 * debian/*: Similarly updated for new release to Debian * RcppLdpath.R: Use shQuote() to protect spaces in Windows pathnames 2010-03-15 Romain Francois * inst/codebloat/codebloat.R: script to generate code (creating a pairlist with up to n arguments). * src/Rcpp/Function.h : Function gains a body method to retrieve the body of the function (using the BODY macro from Rinternals.h) 2010-03-14 Romain Francois * src/Rcpp/S4.h : Rcpp::S4 gains a new constructor taking a string reference and building a new S4 object of that type. This throws an exception if the object is not successfully created (e.g the class is not a known S4 class) 2010-03-13 Romain Francois * src/Rcpp/S4.h : new class Rcpp::S4 2010-03-12 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.9 * debian/*: Similarly updated for new release to Debian 2010-03-12 Romain Francois * inst/unitTests/runit.environments.R: mac os has a different locale * src/Rcpp/traits/is_convertible.h: the detection is now performed without the help of cxx0x or tr1 which makes it compatible with gcc 4.2 * src/Rcpp/traits/is_same.h: new traits is_same to help detect if two types are the same (not currently used) * src/Rcpp/traits/wrap_type_traits.h: use "unsigned int" instead of "size_t" in the template specializations (64 bit compatibility) 2010-03-10 Dirk Eddelbuettel * R/RcppLdPath.R: More specific about quote-protection of path on Windows * inst/doc/Rcpp-introduction.Rnw: Applied several fixes kindly suggested by Matt Kraai 2010-03-09 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.8 * debian/*: Similarly updated for new release to Debian 2010-03-09 Romain Francois * man/Rcpp.package.skeleton.Rd: some more documentation 2010-03-07 Dirk Eddelbuettel * inst/doc/Rcpp-introduction.Rnw: Added vignette based on a recent paper 2010-03-07 Romain Francois * src/Rcpp/StringTransformer.h: new class template StringTransformer that allows using a character by character function to modify elements of a string vector (example available in package RcppExamples) * src/Rcpp/Vector.h: string_proxy::iterator is made const char* because R uses a global cache for the CHARSXP 2010-03-05 Romain Francois * src/Rcpp/Vector.h: string_proxy gains begin(), end(), size(), and operator[] for iterating over characters of the CHARSXP 2010-03-02 Romain Francois * src/Rcpp/Vector.h: Vector gains a nested r_type type that is an integral_constant to facilitate TMP * src/RcppCommon.{h,cpp}: added RCPP_CALL_VECTOR and RCPP_CALL_MATRIX macros to facilitate calling a function templated by T = Vector the macro hides the boiler-plate switch( TYPEOF(x) ){ case INTSXP : ... } 2010-03-01 Romain Francois * src/Rcpp/Vector.h: more typedef : CharacterMatrix, StringMatrix, GenericMatrix, ExpressionMatrix, ListMatrix * src/ExpressionVector.cpp : replaced by templates in Vector.h * src/Rcpp/Vector.h: use templates to cover ExpressionVector additional methods : eval() and eval(const Environment& ) 2010-02-28 Romain Francois * src/Rcpp/Vector.h : more generic code for vectors. All vector types are now generated from the template Rcpp::Vector where RTYPE is one of INTSXP, LGLSXP, REALSXP, RAWSXP, STRSXP, VECSXP or EXPRSXP. 2010-02-24 Romain Francois * src/Rcpp/exceptions.h: some exception classes factored out * src/Rcpp/VectorBase.h: now a template, using the Curiously recurring template pattern (the type parameter is the derived class) * src/Rcpp/SEXP_Vector.h: the intermediate class SEXP_Vector_Base is removed, reverting the change on 2010-02-09. This will facilitate the introduction of the Curiously recurring template pattern on vectors * src/Rcpp/MatrixRow.h : Row has been factored out of SimpleVector into a separate template class Rcpp::MatrixRow * src/Rcpp/SimpleVector.h: gains a row method that returns a SimpleVector::Row, aka MatrixRow * src/Rcpp/CharacterVector.h : gains a row method that returns a CharacterVector::Row, aka MatrixRow * src/Rcpp/SEXP_Vector.h : gains a row method that returns a SEXP_Vector::Row aka MatrixRow * src/Rcpp/MatrixColumn.h : Column class to access elements of a matrix column 2010-02-23 Romain Francois * src/Rcpp/SimpleVector.h: added the class SimpleVector::Row to support STL algorithms working on a row of a matrix. * src/Rcpp/internal/ListInitialization.h: new class that supports use of operator, (inspired from blitz) giving this notation: IntegerVector x(3); x = 0, 1, 2 ; 2010-02-21 Romain Francois * src/Rcpp/as.h: more generic as implementation. primitive types are handled through templates which for example makes it possible to as in RProtoBuf. std::deque and std::list become as'able when T is a primitive type as indicated by the Rcpp::traits::r_type_traits * src/as.cpp: removed since as is now fully implemented via templates 2010-02-19 Romain Francois * src/Rcpp/as.h: as now delegates to a template class Exporter since partial specialization was not possible with the interface of as. It is possible to partially specialize Exporter. std::vector when T is a primitive type is now handled through Exporter. Some support Exporter have been added and used in RcppArmadillo * src/Rcpp/internal/wrap.h: support for std::complex and std::complex (needed for RcppArmadillo) * src/Rcpp/traits/wrap_type_traits.h : The Importer concept has been introduced to support wrap() of more types. If a class has a typedef "r_import_type" then the following interface is assumed and used. The corresponding class must have methods int size() and r_import_type get(int). As usual further dispatch is performed based on r_import_type (primitive, etc ...). RcppArmadillo has an example of this for wrapping arma::field objects using the FieldImporter class. 2010-02-18 Romain Francois * src/Rcpp/Language.h: added fixed_call to support STL algorithms similar to generate. * inst/unitTests/runit.Language.R: unit test for fixed_call * src/Rcpp/Environment.h: Environment gains a find method which searches for a binding in the associated environment but also in all its parents, as opposed to get which just looks in the environment. 2010-02-17 Dirk Eddelbuettel * src/Makevars: Simplified as RcppExample.cpp is shipped off * src/Makevars.win: Simplified as RcppExample.cpp is shipped off 2010-02-17 Romain Francois * src/Rcpp/SEXP_Vector.h : The lhs use of operator[](string) has been improved so that if the name does not exist in the vector, the vector grows. * inst/unitTests/runit.GenericVector.R: new unit test test.List.implicit.push.back about the new operator[](string) * src/Rcpp/SimpleVector.h : new template class SimpleMatrix that derives from SimpleVector, with typedefs NumericMatrix IntegerMatrix, LogicalMatrix, RawMatrix, ComplexMatrix. The actual functionality comes from SimpleVector but SimpleMatrix has constructors and assignment operators that behave slighlty differently : they check that their input is a matrix * src/Rcpp/traits/wrap_type_traits: added support for float * src/Rcpp/Rcpp.h: now including RObject here instead of in RcppCommon.h because RObject is a client of implicit converters (attr) and so we need to leave a hook for third party code, e.g. RcppArmadillo 2010-02-16 Dirk Eddelbuettel * src/Makevars.wim: Applied improved version kindly supplied by Brian Ripley * R/RcppExample.R, man/RcppExample.Rd: Moved to RcppExamples package * man/RcppDate.Rd, man/RcppParams.Rd, man/RcppResultSet.Rd, RcppVector.Rd, src/RcppExample.cpp: Idem * inst/examples/FastLM: Slightly reworked, actual code factored out and used in a per-library demo/test script and a joint benchmark.r 2010-02-15 Dirk Eddelbuettel * inst/examples/FastLM: New example directory with two 'fast lm' implementations using, respectively, GNU GSL (in C) and Armadillo (in C++); Armadillo is seen as faster for lack of extra copying 2010-02-14 Romain Francois * src/Rcpp/Language.h: accepting Function in unary_call and binary_call to support STL algorithms using R functions. 2010-02-14 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.7 * debian/*: Similarly updated for new release to Debian 2010-02-14 Romain Francois * src/Rcpp/Language.h: fixing serious bug. The 'code bloat' constructors taking a std::string did not explicitely create a symbol, so the created calls were wrong. * src/Rcpp/Language.h: new template classes Rcpp::unary_call and Rcpp::binary_call to allow use of Language objects in STL algorithms. * inst/unitTests/runit.Language.R: unit test and example of using unary_call and binary_call 2010-02-12 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.6 * NEWS: Updated * debian/*: Similarly updated for new release to Debian 2010-02-12 Romain Francois * src/Rcpp/Environment.h: Environment gains a default constructor. This is needed for RInside. 2010-02-10 Romain Francois * src/Rcpp/SEXP_Vector.h: SEXP_Vector (and therefore ExpressionVector and GenericVector, a.k.a List) gain methods push_front, push_back and insert that are templated and use the 'implicit wrap idiom' to add an element to the front or, the back or an arbitrary (valid) position of the list, pushing other elements. Internally the SEXP is actually copied. * src/Rcpp/SEXP_Vector.h: SEXP_Vector gains an erase method modelled after std::vector<>::erase to remove elements from a list. erase has a single iterator (or int) form that removes one element, and a range based version erase(iterator first, iterator last) that erases all elements between first and last. * src/Rcpp/VectorBase.h: VectorBase gains a version of offset to support retrieving the offset of a given name of a vector: offset( const std::string& name) * src/Rcpp/SimpleVector.h : uses the new offset to perform names based indexing (FR #808) * src/Rcpp/SEXP_Vector.h: same * src/Rcpp/CharacterVector.h: same * inst/unitTests/runit.GenericVector.R: unit tests for names based indexing * inst/unitTests/runit.IntegerVector.R: same * inst/unitTests/runit.CharacterVector.R: same 2010-02-09 Dirk Eddelbuettel * inst/skeleton/Makevars: Use $R_HOME/bin indirection * inst/skeleton/Makevars.win: Idem 2010-02-09 Romain Francois * src/Rcpp/SEXP_Vector.h: The functionality of SEXP_Vector that was independent of the template parameter was factored out into a new base class SEXP_Vector_Base. This follows the advice of item 44 of Effective C++. * src/Rcpp/SEXP_Vector.h: SEXP_Vector_Base::iterator is introduced as well as methods begin() and end() to support use of stl algorithms on lists. * inst/unitTests/runit.GenericVector.R: new unit test for testing SEXP_Vector_Base::iterator and illustrating a c++ version of lapply using std::transform * src/Rcpp/CharacterVector.h: CharacterVector gains a random access iterator, begin() and end() to support STL algorithms. The iterator dereferences to a StringProxy * src/Rcpp/RObject.h: remove RObject::asFoo methods which were deprecated in Rcpp 0.7.5. The alternative is to use Rcpp::as 2010-02-08 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.5 * debian/*: Similarly updated for new release to Debian 2010-02-07 Romain Francois * src/RcppSexp.h: class RcppSexp removed (was deprecated) * src/Rcpp/*.h: defaults copy constructors and assignment operators have been added for all classes extending RObject. Otherwise the compiler generates default versions that circumvent the garbage collection management 2010-02-06 Dirk Eddelbuettel * inst/examples/functionCallback/newApiExamples.r: Added simpler version using the new API * inst/examples/functionCallback/newApiExamples.r: Updated * inst/unitTests/runit.RcppVector.R: added test for NA/NaN * inst/unitTests/runit.RcppMatrix.R: idem 2010-02-06 Romain Francois * src/Rcpp/RObject.h : asFoo methods are deprecated. * src/Rcpp/DottedPair.h : using R_len_t instead of int to anticipate future changes in R * src/Rcpp/VectorBase.h: idem * src/DottedPair.cpp: idem * src/VectorBase.cpp: idem * src/as.cpp: idem * src/Rcpp/SimpleVector.h: SimpleVector is now only parameterized by the SEXP type. The c type is automatically retrieved using the storage_type trait class. 2010-02-05 Dirk Eddelbuettel * inst/THANKS: Added in order to show our appreciation 2010-02-04 Romain Francois * src/Rcpp/DottedPair.h: code bloat to allow creation of DottedPair containing up to 5 objects without variadic templates RInside for example needs this. * src/Rcpp/Language.h: same * src/Rcpp/Pairlist.h: same * src/Rcpp/grow.h: same * src/Rcpp/internal/wrap.h : one more level of dispatch to identify if there needs a cast between the primitive iterated over and the target storage type. For example size_t needs a cast to be stored in an integer vector. This will be useful for the RProtoBuf package with e.g. types like google::protobuf::int64 which needs to be cast to double. Consequently the special handling of bool has been withdrawn as bool can now be assimilated to a primitive type that does require casting (to int) 2010-02-03 Romain Francois * src/Rcpp/VectorBase.h: VectorBase gains a names method that uses the proxy pattern to get or set the names of a vector * src/Rcpp/DottedPair.h: DottedPair gains a << operator to add an object to the queue of the list. this is much useful when variadic templates are not available * src/Rcpp/RObject.h: support for slot assignment. The slot method now uses the proxy pattern. * inst/unitTests/runit.S4.R: unit test for slot assignment 2010-02-02 Romain Francois * src/internal/r_coerce.h : coercion is now handled by a templated function r_coerce, for example r_coerce takes an int, performs coercion and returns a double * src/traits/has_iterator.h : introduce a trait that uses the SFINAE idiom to check if a class T has a nested type called "iterator". This helps wrap dispatch which now uses the range based wrap implementation in that case * src/Rcpp/wrap.h: The range based wrap function is exposed at the Rcpp:: level. The interface is wrap( InputIterator first, InputIterator last ) and dispatch is performed internally using iterator traits 2010-02-01 Romain Francois * src/traits/wrap_type_traits.h: new namespace Rcpp::traits:: to host Rcpp type traits used by the template meta programming dispatching of wrap 2010-01-31 Dirk Eddelbuettel * doxyfile: several updates plus improvements related to examples/ * src/RcppDoxygenExamples.h: A phony empty file needed mainly to define a few \example tags for Doxygen 2010-01-31 Romain Francois * src/Rcpp/internal/wrap.h: more wrap for stl templates are candidate for wrap (when T can be wrapped) std::list -> vector or list std::multiset -> vector or list std::map -> named vector or named list std::multimap -> named vector or named list std::tr1::unordered_map -> named vector or named list std::tr1::unordered_set -> vector or list std::tr1::unordered_multiset -> vector or list * inst/unitTests/runit.wrap.R : unit tests for the new wrappable types 2010-01-30 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.4 * debian/*: Similarly updated for new release to Debian * inst/unitTests/runit.RcppMatrix.R: also test STL return * inst/unitTests/runit.RcppVector.R: added 2010-01-30 Romain Francois * src/Rcpp/internal/wrap.h: rework wrap using traits and template meta programming. wrap is now really a template and has many generated specializations. This file is a private header and should only be included by RcppCommon.h * src/Rcpp/Language.h: Language gains Function aware constructors and eval methods 2010-01-28 Romain Francois * src/Rcpp/DottedPair.h: DottedPair::Proxy are no more lazy, i.e traversal of the pair list happens at construction time, so that the proxy can be created once and used many times more efficiently. * src/Rcpp/DottedPair.h: Pairlist and Language are now derived from the new virtual class DottedPair since both class were almost identical * src/Rcpp/SimpleVector.h: simple vectors gain a range based assign method and a range based assign constructor * inst/unitTests/runit.IntegerVector.R: new unit test test.IntegerVector.range.constructors * src/Rcpp/Dimension.h: new class Rcpp::Dimension to support creation of vectors with dimensions * src/Rcpp/*Vector.h: using Rcpp::Dimension * src/Rcpp/SimpleVector.h: data is initialized with 0 when the object is constructed from size or Dimension constructor * inst/unitTestsrunit.CharacterVector.R: new unit test to test constructors using Dimension * inst/unitTests/runit.IntegerVector.R: idem * inst/unitTests/runit.GenericVector.R: idem * R/unit.tests.R: new unexported function "test" to trigger unit tests using installed test cases * src/Rcpp/CharacterVector.h: minor bug fix in assign * inst/unitTest/runit.RcppResultSet.R: compare time using as.numeric to avoid timezone problems 2010-01-27 Dirk Eddelbuettel * inst/unitTests/runit.RcppMatrix.R: added * inst/unitTests/runit.RcppMatrixView.R: added * inst/unitTests/runit.RcppVector.R: added * inst/unitTests/runit.RcppVectorView.R: added 2010-01-27 Romain Francois * src/Rcpp/CharacterVector.h: CharacterVector gains a default constructor * src/Rcpp/CharacterVector.h: CharacterVector gains range constructors and range based assign methods facilitating construction from iterators * inst/unitTests/runit.CharacterVector.R: unit tests for assign and range based constructors * src/Rcpp/CharacterVector.h: CharacterVector::StringProxy gets a printing operator <<(std::ostream& ) * src/Rcpp/Environment.h: removed the static Environment::RCPP_NAMESPACE which caused problems when embedding R * src/Rcpp/RObject.h: RObject::AttributeProxy::operator RObject replaced by templated implicit conversion operator, delegating the actual work to as<>. * src/Environment.h: Binding::operator RObject is removed since it can be automatically generated by the templated implicit conversion operator * man/RcpUnitTests.Rd: fix html rendering * inst/doc/Makefile: clean the index.html file before copying it 2010-01-26 Dirk Eddelbuettel * src/RcppDatetime.cpp: New SEXP-based constructor * src/RcppDatetime.h: idem, bug fix for operator- * src/RcppDate.h: new accessor getJulian() [relative to epoch just like R's julian()] to complement getJDN() * inst/unitTests/runit.RcppDatetime.R: added 2010-01-26 Romain Francois * src/Rcpp/clone.h: explicit cloning of RObjects. The clone template function creates a new object of the same class as the object it is passed in, encapsulating a duplicate of the SEXP contained by the input RObject. * src/Rcpp/r_cast.h: new template function to handle casts from one SEXP to another. This is mostly useful internally * src/Rcpp/VectorBase.h: VectorBase gains a offset method that is responsible to calculate the correct offset based on variable number of size_t arguments. currently the number of arguments can be 1 (vector indexing) and 2 (matrix indexing) but arbitrary number of arguments will be added later for arbitrary array-like indexing. * src/Rcpp/SimpleVector.h: outsourcing offset calculation to VectorBase::offset * src/Rcpp/CharacterVector.h: use offset to implement matrix-like indexing for matrices of strings * inst/unitTests/runit.CharacterVector.R: unit test for matrix indexing (test.CharacterVector.matrix.indexing) * inst/Rcpp/SEXP_Vector.h: use offset to implement matrix like indexing on lists * inst/unitTests/runit.GenericVector.R: unit test for matrix indexing (test.List.matrix.indexing) 2010-01-26 Dirk Eddelbuettel * inst/unitTests/runit.RcppDate.R: added 2010-01-25 Romain Francois * src/Rcpp/wrap.h: wrap is back at being a template. The template parameter T is first converted to SEXP implicitely and the wrap(SEXP) method is used. This allows clients to only have to implement an implicit conversion to SEXP operator for their class and have wrap for free. * src/Rcpp/SEXP_Vector.h: factored out ExpressionVector and GenericVector into a templated SEXP_Vector class parameterized by the SEXP type (VECSXP or EXPRSXP). GenericVector and ExpressionVector now are generated from the template. This will ease adding features to both classes. * src/as.cpp: also use coercion for as, as, as as (FR #768) * src/Rcpp/as.h: smarter template as, now the template attempts to create an object by passing the SEXP as the first parameter, so any class that has a constructor taking a SEXP can be as<>'ed. see item below for how this can be useful * src/Rcpp/Environment.h: lhs use of Environment::Binding is now a bit smarter and uses as<> to implicitely convert the SEXP to the requested type, so that if as makes sense, this works: Foo foo = env["x"] ; * src/Rcpp/Environment.h: Environment::assign gains a templated form so that we can assign anything that can be wrapped to a name in an environment. * inst/unitTests/runit.environments.R: new unit test 'test.environment.assign.templated' to test the templated assign * src/Makevars(.win?): listen to the RCPP_CXX0X environment variable and if set to "yes" attempt to add c++0x support if possible 2010-01-24 Dirk Eddelbuettel * configure.in: Withdrawn as OS X universal binaries are only built when there is src/Makevars and neither src/Makefile nor configure * configure: idem * src/Makevars: Again a static file, content copied from Makevars.in, -std=c++0x selection back to simply unabling a comment 2010-01-24 Romain Francois * src/SimpleVector.h : new template to replace simple vector classes. now NumericVector, IntegerVector, LogicalVector, ComplexVector and RawVector are all generated from the same template class. A first attempt at matrix indexing is added as part of this. * inst/unitTests/runit.NumericVector.R: new unit tests about matrix indexing * src/Rcpp/VectorBase.h: added the exception not_a_matrix that is thrown when attempting to perform matrix indexing on a vector that is not a matrix. 2010-01-23 Dirk Eddelbuettel * inst/unitTests/runit.RcppParams.R: added * inst/unitTests/runit.RcppResultSet.R: added 2010-01-23 Romain Francois * src/wrap.cpp: s/copy/std::copy/ * src/RcppDateTime.h: explicitely include (win64 warning) 2010-01-22 Romain Francois * src/Makevars.win: disable c++0x entirely (for now) * src/Rcpp/Environment.h: make sure what() is const. (suncc finding) * src/RcppCommon.h: pre declare classes, as an attempt to deal with the suncc warning "RObject may not have a type qualifier." * src/Rcpp/*.h: make sure RcppCommon.h is the first included header * src/*cpp: make sure foo.cpp only include Rcpp/foo.h * src/Environment.cpp: use Evaluator instead of R_ToplevelExec * src/RcppFunction.{h,cpp}: listen to some suncc warnings * src/RcppFrame.cpp: listen to some suncc warnings * src/as.cpp: use transform instead of assign, which should make the code more portable (particularly suncc) and also deal with coercion 2010-01-21 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.3 * debian/*: Similarly updated for new release to Debian * INDEX: updated * configure.in: Some more small cleanups * inst/skeleton/Makevars.win: Add missing default file 2010-01-21 Romain Francois * configure.in: Some small cleanups, add RCPP_CXX0X env var 2010-01-20 Romain Francois * src/*: make update private virtual in RObject and couple it with setSEXP so that it gets called automatically, instead of manually * src/*: move more code depending on c++0x from cpp files to header files 2010-01-20 Dirk Eddelbuettel * configure.in: Detect C++ capabilties (via g++ major/minor) via small C++ program embedded in autoconf macro 2010-01-19 Romain Francois * configure.in: use the cxx0x.R script to discover if the compiler being used is c++0x capable * configure: regenerated from updated configure.in * src/Makevars.in: using CLINK_CPPFLAGS variable * src/Makevars.win: using CLINK_CPPFLAGS variable with the cxx0x.R discovery script 2010-01-18 Dirk Eddelbuettel * R/RcppLdpath.R: Rewrote logic for LdFlags() to decide when linking is static: default now is everywhere but Linux, and choices can be overriden as before 2010-01-18 Romain Francois * inst/discovery/cxx0x.R: replaces the cxx0x.c file to take care of compiling, etc... 2010-01-17 Romain Francois * src/exceptions.cpp: slightly less dumb exception logic on non GCC compilers. exceptions will now trigger an R error with a default message (we don't attempt to get the exception class or message because we don't know how to) * src/Rcpp/Pairlist.h: Pairlist lacked a default constructor which is needed when the variadic templates are not available * inst/unitTests/*: add -std=c++0x in inline when necessary * R/RcppLdPath.R : new script RcppCxx0xFlags() and Cxx0xFlags() that compile, load and call a simple C file in order to check the compiler version and add the -std=c++0x flag * inst/discovery/cxx0x.c: discovery script. simple C script that returns "-std=c++0x" if it is compiled with GCC >= 4.3 and "" otherwise 2010-01-16 Dirk Eddelbuettel * src/Rcpp/*h: call Rf_length() etc as ::Rf_length() to ensure we get the one from the top-level namespace 2010-01-16 Romain Francois * src/Rcpp/Environment.h: Environment gains a new_child method to create an environment enclosed by this * inst/unitTests/runit.environments.R: unit test for new_child * src/Rcpp/ExpressionVector.h: ExpressionVector gains a convenience methods eval to evaluate itself * inst/unitTests/runit.ExpressionVector.R: added unit tests for ExpressionVector::eval * src/Rcpp/ExpressionVector.h: ExpressionVector gains a constructor ExpressionVector( const std::string& ) that parses the string as R code * inst/unitTests/runit.ExpressionVector.R: added unit tests to cover the new constructor * src/Rcpp/Environment.h : the Rcpp namespace is cached because we use it in many places and retrieving it is an "expensive" operation that requires a round trip to the R side * src/Evaluator.cpp: use the cached Rcpp namespace * R/Rcpp.package.skeleton: now generating example C++ and R code that uses Rcpp, also the generated Makevars contains a hack so that the generated package can pass check (after edition of Rd files, NAMESPACE, etc ...) * inst/skeleton: added example code used by the skeleton generator 2010-01-15 Romain Francois * src/Rcpp/NumericVector.h: cache the start of the array to improve performance of operator[] * src/NumericVector.cpp: idem * src/Rcpp/IntegerVector.h: * src/Rcpp/RawVector.h: * src/Rcpp/ComplexVector.h: * src/Rcpp/LogicalVector.h: idem * src/IntegerVector.cpp: * src/RawVector.cpp: * src/ComplexVector.cpp: * src/LogicalVector.cpp: idem 2010-01-13 Romain Francois * R/cpp.package.skeleton.R: new function cpp.package.skeleton to extend the code generation performed by package.skeleton to Rcpp features * man/cpp.package.skeleton.Rd: documentation for cpp.package.skeleton * src/Rcpp/VectorBase.h: new virtual class Rcpp::VectorBase to manage common things of all vectors (length, names, etc ...) all Vector classes now derive from VectorBase * src/Rcpp/Environment.h: Environment::Binding gains a templated conversion operator, to facilitate distance 2 implicit conversion making this possible: Environment env("package:stats") ; Function f = env["rnorm"] ; * src/Rcpp/GenericVector.h: GenericVector::Proxy gains an assignement operator to deal with Environment::Binding. This is to work around distance 1 implicit conversion restrictions * src/Rcpp/NumericVector.h: operator[], begin and end are promoted to inline member functions * src/Rcpp/IntegerVector.h: idem * src/Rcpp/RawVector.h: idem * src/Rcpp/LogicalVector.h: idem 2010-01-12 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.2 * debian/*: Similarly updated for new release to Debian * .Rbuildignore: Add 'inst/doc/{html,latex,man} as we no longer ship the voluminous doxygen-generated content * inst/doc/examples/ConvolveBenchmarks/convolve2*: Added simple benchmark on the well-known vector convolution example from 'Writing R Extensions' to compare C and C++ implementations * inst/doc/examples/ConvolveBenchmarks/buildAndRun.sh: idem inst/doc/examples/ConvolveBenchmarks/exampleRCode.r: idem 2010-01-12 Romain Francois * inst/doc/examples/ConvolveBenchmarks/convolve2*: Added additional C++ examples to convolution benchmark highlighting performance gains 2010-01-11 Romain Francois * src/Rcpp/CharacterVector.h: StringProxy gains operator+= * src/CharacterVector.cpp: implementation * src/Rcpp/*Vector.h: operator[] now throws index out of bounds exception when needed (FR#770) * src/*Vector.cpp: same * src/Rcpp/Environment.h: operator[](string) for environment allowing to get/set values of a binding in this environment. The Environment::Binding class has been created to act as a proxy. * src/Environment.cpp: idem * inst/unitTests/runit.environments.R: unit tests for the above 2010-01-10 Romain Francois * src/Rcpp/Pairlist.h: operator[] for pairlist using proxies * src/Pairlist.cpp : idem * inst/unitTests/runit.Pairlist.R: new unit tests * src/Rcpp/Language.h: same for Language * src/Language.cpp : idem * inst/unitTests/runit.Language.R: new unit tests * inst/unitTests/runit.Function.R: added unit test for function throwing exceptions * src/Function.cpp: grab the condition message and not the call 2010-01-09 Romain Francois * src/Rcpp/RObject.h: attr can now be used to get or set the attribute (used to be read only). This is another manifestation of the proxy pattern. The rhs can be anything wrap can handle * inst/unitTests/runit.RObject.R: added test.RObject.attr.set unit test (setting attribute). * src/Rcpp/Function.h: Function::operator() now throws an exception if an R error occurs. 2010-01-08 Dirk Eddelbuettel * configure.in: provide basic support for c++ compiler version detection at build-time so that we can add -std=c++0x when applicable; provide defaults in case we do not use g++ * src/Makevars.in: copied from Makevars, set C++ flags from configure * configure.win: simply log what g++ version is being used 2010-01-08 Romain Francois * src/Rcpp/wrap.h: added wrap( size_t ) to disambiguate it * int/unitTests/runit.XPTr.R: forgot to set the finalizer on the external pointer * src/Rcpp/Pairlist.h: Pairlist gains a push_back, replace, length, size, remove and insert methods * src/Rcpp/Language.h: idem for Language 2010-01-07 Romain Francois * src/Rcpp/Pairlist.h: gains a push_front method * src/Rcpp/wrap.h : now the result type of the various wrap functions depends on the parameters. wrap( bool ) makes a LogicalVector, etc ... wrap(SEXP) dispatches to the appropriate Rcpp:: class depending on TYPEOF * src/Rcpp/RObject.h: added methods "isS4", "slot" and "hasSlot" to deal with S4 objects * inst/unitTests/runit.S4.R: unit tests * src/Rcpp/ComplexVector.h: new class Rcpp::ComplexVector to manage ... complex vectors (CPLXSXP) * src/ComplexVector.cpp: implementation * inst/unitTests/runit.ComplexVector.R: unit tests * src/Rcpp/Promise.h: new class Rcpp::Promise to manage promises (PROMSXP). only read access so far (no way to force the promise) * src/Promise.cpp: implementation * src/Rcpp/RObject.h: the result of attr is now an RObject rather than a SEXP. This does not change previous behavior because of the implicit conversion * src/Rcpp/ExpressionVector.h: new class Rcpp::ExpressionVector which shares a lot with GenericVector. * src/ExpressionVector.cpp: implementation * inst/unitTests/runit.ExpressionVector.R: unit tests * src/Rcpp/CharacterVector.h: new class Rcpp::CharacterVector to manage character vectors (STRSXP). StringVector is a convenience typedef equivalent to CharacterVector * src/CharacterVector.cpp: implementation * inst/unitTests/runit.CharacterVector.R: unit tests * src/Rcpp/WeakReference.h: new class Rcpp::WeakReference to wrap WEAKREFSXP with accessors to the key and value * src/WeakReference.cpp: implementation * src/Rcpp/Rcpp_Rinternals.h: borrowed from Rinternals so that we can use VECTOR_PTR (which R forbids unless we define USE_RINTERNALS, but defining it disables NO_R_REMAP) * src/Rcpp/GenericVector.h : added begin and end to allow stl type iteration over generic vectors. Now using the Proxy pattern (from Item 30 of More Effective C++) to allow getting and setting the elements of the list through the operator[]. * int/unitTests/runit.GenericVector.R: examples are reworked using [] where set and get were used. 2010-01-06 Dirk Eddelbuettel * src/RcppCommon.h: Protect definition of logTxt by #ifndef * inst/doc/Rcpp-unitTests.Rnw: Minor LaTeX tweak 2010-01-06 Romain Francois * src/Rcpp/wrap.h : wrap can now use initializer lists (available on on GCC >= 4.4). * src/wrap.cpp: implementation * int/unitTests/runit.wrap.R: unit tests * src/RObject.cpp : make methods RObject::asFoo calling Rcpp::as to avoid code duplication 2010-01-05 Romain Francois * src/Rcpp/GenericVector.h : new class Rcpp::GenericVector and an alias Rcpp::List to handle lists (VECSXP), aka generic vectors * src/GenericVector.cpp : implementation * inst/unitTests/runit.GenericVector.R: unit tests * src/Rcpp/IntegerVector.h : new class Rcpp::IntegerVector to manage integer vector (INTSXP). IntegerVector can be constructed from SEXP of appropriate type, from an int which simply allocates a vector that big, or using an initialization list (the last is GCC >= 4.4 only). Additionally IntegerVector defines begin() and end() so that they can be used in STL algorithms * src/IntegerVector.cpp : implementation * inst/unitTests/runit.IntegerVector.R: unit tests * src/Rcpp/NumericVector.h : same as above, but for numeric vectors (REALSXP) * src/NumericVector.cpp : implementation * inst/unitTests/runit.NumericVector.R: unit tests * src/Rcpp/RawVector.h : same as above, but for numeric vectors (RAWSXP) * src/RawVector.cpp : implementation * inst/unitTests/runit.RawVector.R: unit tests * src/Rcpp/LogicalVector.h : same as above, but for numeric vectors (RAWSXP) * src/LogicalVector.cpp : implementation * inst/unitTests/runit.LogicalVector.R: unit tests * src/RcppCommon.h: improve the conditional compiling logic with macros HAS_VARIADIC_TEMPLATES and HAS_INIT_LISTS instead of CXX0X. This ensures the package can be compiled with older GCC, with lower functionality * src/RcppCommon.{h,cpp}: added a capabilities function that can be used to bring the result of the two above macros to R * R/RcppLdPaths.R: added unexported function RcppCapabilities to call the internal capabilities. capabilities is an alias to RcppCapabilities so that we can call Rcpp::capabilities() 2010-01-04 Romain Francois * src/Rcpp/Function.h: new class Rcpp::Function to manage functions (closures, primitives and builtins) all share the Function class (at least for now). This is implemented as a functor taking variable number of arguments, so it looks pretty similar to the R function * src/Function.cpp: implementation * inst/unitTests/runit.Function.R: unit tests * src/Rcpp/Pairlist.h: new class Rcpp::Pairlist to manage dotted pair lists (LISTSXP). unsurprisingly this shares a lot of similarities with Language class * src/Pairlist.cpp: implementation * inst/unitTests/runit.Pairlist.R: unit tests for Rcpp::Pairlist * src/Rcpp/wrap.h: wrap no more a template. this was not a good idea as it prevented implicit conversion to SEXP behavior when wrap'ing a RObject. * src/Rcpp/Environment.h: added the remove method * src/unitTests/runit.environments.R: remove unit test * src/unitTests/runit.Language.R: remove verbose=TRUE in cfunction call (generated noise) * src/wrap.cpp: added a few missing PROTECT 2010-01-04 Dirk Eddelbuettel * src/excections.cpp: Get rid of another unused variable * src/RcppCommon.cpp: Idem 2010-01-03 Romain Francois * src/Rcpp/Environment.h: Environment gains the parent method that returns the parent environment * src/Rcpp/as.h: template as<> to convert SEXP to classic C++ types, factored out of RObject * src/as.cpp: specific implementations. as, as as, ... * inst/unitTests/runit.as.R: unit tests * src/Rcpp/wrap.h : factored out from RObject. there is now a template wrap in addition to the specific implementations. The template generates a warning and return NULL * src/wrap.cpp: specific implementations of the wrap template (factored out of RObject) * src/Rcpp/pairlist.h : variadic templates to recursively generate a pairlist (CAR and CDR) from any number of "wrap("'able objects. (factored out of Language) * src/pairlist.cpp: end of recursion for the above * src/Rcpp/grow.h : grow a pairlist with any wrappable object. Used in pairlist * src/grow.cpp : specific implementation for Named object to allow tagging the head of the pairlist. * src/Rcpp/Named.h : new class Named that is used to specify named elements in a pairlist. * src/Named.cpp: implementation * src/Rcpp/RObject.h: added wrap(const char* const) RObject factory method * src/Rcpp/RObject.h: rework the garbage collection mechanism so that it is automatic and hidden. methods preserve and release are now private to the RObject class and the SEXP may only be changed using the protected setSEXP member function. isPreserved and forgetPreserve are defunct. * src/Rcpp/RObject.h: RObject gains assignment operators and copy constructors * src/RcppCommon.h: added the CXX0X define that controls whether we can use C++0x features offered by the gcc. currently the define is hardcoded, but this will eventually be a configure guess. The canUseCXX0X function can be called to bring this back to R * R/RcppLdPath.R: added the canUseCXX0X R function to query the internal canUseCXX0X function, use this in RcppCxxFlags so that code linking against Rcpp (inline code or packages) can take advantage of it * src/Rcpp/Language.h : new class Rcpp::Language to manage calls (LANGSXP SEXP) * src/Language.cpp : implementation * inst/unitTests/runit.Language.R: unit tests * src/Rcpp/Environment.h : added constructors and made the SEXP based constructor smarter (using as.environment) * inst/unitTests/runit.environments.R: more unit tests * src/Rcpp/Symbol.h: new class Rcpp::Symbol to encapsulate symbols. This allows to use Symbol("rnorm") instead of the most cryptic Rf_install("rnorm") * src/Symbol.cpp: implementation * inst/unitTests/runit.Symbol.R: unit tests 2010-01-03 Dirk Eddelbuettel * doxyfile: updated to current doxygen standard using -u 2010-01-02 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.1 * debian/*: Similarly updated for new release to Debian 2010-01-02 Romain Francois * pkg/src/RcppSexp.h: Added to preserve existing interface, implementation use the redesigned class src/RObject.h 2010-01-01 Romain Francois * pkg/src/Rcpp/RObject.h: RObject::RObject constructors are replaced by the Rcpp::wrap set of functions. Currently the wrap functions make a RObject object but it is likely that as new classes become available in the new API, wrap will return instances of classes that extend RObject. * pkg/src/Rcpp/RObject.h: s/protect/preserve/, added methods isPreserved and forgetPreserve * ** : adapted examples, code, and unit tests to reflect both above items 2009-12-31 Romain Francois * src/Rcpp/Evaluator.h : new class Rcpp::Evaluator that eases evaluation of R expression with error capture. so that we can for example throw C++ exceptions * src/Evaluator.cpp : implementation of Rcpp::Evaluator * inst/unitTests/runit.evaluator: unit tests of Rcpp::Evaluator * inst/Rcpp/RObject.h: RObject::RObject(SEXP) now initializes isProtected * inst/src/Environment.cpp: use of exceptions 2009-12-30 Romain Francois * src/Rcpp/Environment.h : added support for environment through the Rcpp::Environment class * src/Environment.cpp: idem * inst/unitTests/runit.environments.R: testing the above * src/RcppCommon.h: now includes , needed for the environment support 2009-12-30 Romain Francois * src/Makevars* : adapt for allowong copy of the Rcpp directory * src/Rcpp_RObject.h: replace by src/Rcpp/RObject.h * src/Rcpp_XPtr.h: replaced by src/Rcpp/XPtr.h * src/*.cpp: adapt to the Rcpp directory * cleanup: idem 2009-12-30 Romain Francois * inst/unitTests/runit.RObject.R: new unit tests * inst/unitTests/runit.exceptions.R: idem * inst/unitTests/runit.XPtr.R: idem * man/RcppUnitTests.Rd: shows and link unit test reports generated at build time 2009-12-29 Romain Francois * src/Rcpp_RObject.{h,cpp}: new namespace Rcpp and new class Rcpp::RObject to replace RcppSexp with the same functionality. * src/Rcpp_XPtr.h: replaces RcppXPtr.h and the class is now Rcpp::XPtr<> and extends Rcpp::RObject * inst/examples/RcppInline/external_pointer.r: use the new namespace * inst/examples/RcppInline/RcppInlineWithLibsExamples.r: idem * inst/examples/RcppInline/RcppSexpTests.r: idem * DESCRIPTION: marked as version 0.7.0.5 * inst/doc/*: fake (empty) vignette and unit test trigger * inst/unitTests/*: prepare the space for unit tests * tests/doRUnit.R : added the usual RUnit tests trigger 2009-12-29 Romain Francois * src/RcppXPtr.h: now RcppXPtr extends RcppSexp and RcppSexp manages garbarge collection, attributes, etc ... * src/exceptions.cpp: replaces src/exception_handling.cpp * DESCRIPTION: now suggesting RUnit. 2009-12-29 Romain Francois * src/RcppXPtr.h: added operator SEXP() to class RcppXPtr to ease implicit conversion from RcppXPtr to SEXP. This means we can directly return the RcppXPtr object to R when the return type of the function is SEXP. (no need to explicitely call asSexp anymore) * src/RcppSexp.{h,cpp} : idem 2009-12-29 Romain Francois * src/RcppXPtr.h: new smart external pointer wrapper. The RcppXPtr template can be used to wrap a external pointer (SEXP) so that it looks like the dumb pointer it is wrapping (as far as the * and -> operator are concerned). The template parameter controls the type of object that is wrapped by the pointer. * src/Rcpp.h: importing the RcppXPtr.h header * src/RcppExample.cpp: added an example of RcppXPtr usage * inst/examples/RcppInline/external_pointer.r: added example using the RcppXPtr template * DESCRIPTION: marking this as 0.7.0.4 2009-12-28 Romain Francois * R/exceptions.R: s/uncaught_cpp_exception/cpp_exception/ and added a 'class' argument to hold the class name of the C++ exception (range_error, etc ...) * inst/examples/RcppInline/UncaughtExceptions.r: extend examples to show how to grab details of the C++ exception * src/exception_handling.cpp: factored out from RcppCommon.cpp, now able to grab the class name of the exception and its message. 2009-12-27 Dirk Eddelbuettel * R/RcppInline.R: Removed as we now use cfunction() from inline (>= 0.3.4) * man/{RcppInline,internals}.Rd: idem * NAMESPACE: removed entries related to cfunction and methods * DESCRIPTION: Added 'Suggests: inline (>= 0.3.4) * inst/examples/RcppInline/*R: Add library(inline) or require(inline) 2009-12-27 Romain Francois * src/RcppCommon.{h,cpp} : added experimental uncaught exception management * R/zzz.R : added .onAttach, used to register the uncaught exception management on package attach * R/exceptions.R : added R side of the exception management, unexported as it is only used by internal C++ code * inst/examples/RcppInline/UncaughtExceptions.r: demo of the uncaught exception system * src/RcppSexp.{h,cpp} : added method isNULL to test if the underlying SEXP is NULL * src/RcppSexp.{h,cpp} : added some methods to deal with attributes attributeNames : the names of the attributes as a vector hasAttribute : test whether the SEXP has the given attribute attr : extract the attribute (might return NULL) * src/RcppSexp.{h,cpp} : added RcppSexp(bool), RcppSexp(vector) constructors and RcppSexp.asBool(), RcppSexp.asStdVectorBool() methods * inst/examples/RcppInline/RcppSexpTests.r: examples/tests of the above items 2009-12-26 Romain Francois * src/RcppSexp.{h,cpp} : added std::set<{int,double,Rbyte,string}> as accepted input type for the RcppSexp class (needed by RProtoBuf) * inst/examples/RcppInline/RcppSexpTests.r: examples/tests of the above 2009-12-21 Romain Francois * src/RcppSexp.{h,cpp} : support for raw vector added into RcppSexp * inst/examples/RcppInline/RcppSexpTests.r: examples of raw vector support 2009-12-20 Dirk Eddelbuettel * inst/examples/RcppInline/RcppInlineWithLibsExamples.r: Minor simplifications using new RcppSexp types, added third example 2009-12-19 Dirk Eddelbuettel * DESCRIPTION: Release 0.7.0 * DESCRIPTION: Descrition fields reworded and expanded to explicitly mention 'inlining' ability as well as simple SEXP support. * src/RcppSexp.{h,cpp}: Switch to R_PreserveObject and R_ReleaseObject with a big thanks to Romain for the most appropriate suggestion * src/RcppSexp.{h,cpp}: Added converters for vectors of int, double, and std::string vectors * src/RcppResultsSetp.{h,cpp}: Added simple single SEXP return * src/RcppCommon.{h,cpp}: Adding simple logging facility * inst/examples/RcppInline/RcppSexpTests.r: expanded for new types 2009-12-18 Dirk Eddelbuettel * R/RcppInline.R: Another improvement for Rcpp use * inst/examples/RcppInline/RcppSimpleExamples.r: Another simple case 2009-12-17 Dirk Eddelbuettel * R/RcppInline.R: Improved / simplified in light of getting it to work on Windoze too so switched to setting env var explicitly; also split into three args for CPPFLAGS, CXXFLAGS and LIBS * man/RcppInline.Rd: Updated accordingly to reflect new args * inst/examples/RcppInline/RcppInlineWithLibsExamples.r: Idem 2009-12-16 Dirk Eddelbuettel * src/RcppSexp.{h,cpp}: Added simple RcppSexp class for simple conversion from and to single-element SEXPs -- currently limited to int, double, std::string * inst/examples/RcppInline/RcppSexpTests.r: Simple tests for this 2009-12-15 Dirk Eddelbuettel * DESCRIPTION: License changed to 'GPL (>= 2)' * COPYING: Changed from LGPL 2.1 to GPL 2 (or later) * src/*.{h,cpp}: Relicensed under GPL 2 (or later) 2009-12-13 Dirk Eddelbuettel * R/RcppInline.R: Extended to for additional header and library arguments so that we can work with arbitrary other projects * man/RcppInline.Rd: Added documentation for these arguments * inst/examples/RcppInline/RcppInlineWithLibsExamples.r: New examples using GNU GSL to show how to compile + link via inline 2009-12-11 Dirk Eddelbuettel * R/RcppInline.R: Imported function 'cfunction' from the inline package, along with small patch to directly support Rcpp. The inclusion may be temporary -- if our patch is integrated into inline we may just depend on that package * man/RcppInline.Rd: Imported from inline, plus change for Rcpp * inst/examples/RcppInline/RcppInlineExample.r: Small example taken from the 'Intro to HPC with R' tutorials * R/RcppVersion.R: Removed as unused as redundant given read.dcf() in R * man/RcppVersion.R: idem * NAMESPACE: updated accordingly * INDEX: idem 2009-11-18 Dirk Eddelbuettel * DESCRIPTION: Add Dominick back into Authors per his new request reversing his requests to be removed from last December 2009-11-17 Dirk Eddelbuettel * man/RcppParams.Rd: applied patch by Frank S. Thomas to fix example 2009-11-15 Dirk Eddelbuettel * src/RcppDateVector.{cpp,h}: Moved out of Rcpp.{h,cpp} * src/RcppDatetimeVector.{cpp,h}: idem * src/RcppFunction.{cpp,h}: idem * src/RcppMatrix.{cpp,h}: idem * src/RcppMatrixView.{cpp,h}: idem * src/RcppNumList.{cpp,h}: idem * src/RcppResultSet.{cpp,h}: idem * src/RcppStringVector.{cpp,h}: idem * src/RcppStringVectorView.{cpp,h}: idem * src/RcppVector.{cpp,h}: idem * src/RcppVectorView.{cpp,h}: idem * src/RcppCommon.cpp: takes remaining utility function from Rcpp.cpp 2009-11-09 Dirk Eddelbuettel * DESCRIPTION: Release 0.6.8 * src/RcppParams.{cpp,h}: Code reorginsation, moved out of Rcpp.{h,cpp} * src/RcppDate.{cpp,h}: idem * src/RcppDatetime.{cpp,h}: idem * src/RcppCommon.h: New header file for common defines and includes * src/Makevars{,.win}: Updated and generalised to reflect new files 2009-11-08 Dirk Eddelbuettel * DESCRIPTION: Release 0.6.7 * man/RcppVector.Rd: Remove erraneous use of \R in \title{} section noticed by the Rd parser in R-devel (with thanks to Kurt Hornik) 2009-11-06 Dirk Eddelbuettel * src/RcppList.{h,cpp}: Added a simple class to accept list() objects in order to cope with non-rectangular data-types -- this comes from the RProtoBuf code currently only on r-forge where we need accept lists that are potentially nested. The API for RcppList is not fully fleshed out and needs a few more append() member functions. Also length is currently fixed. * cleanup: Change header file removal to Rcpp*.h * inst/README: Added short README about history and status * inst/doc/: Updated doxygen documentation 2009-09-29 Dirk Eddelbuettel * inst/examples/functionCallback/*: Added simple C++ / R example of defining an R function that is passed to and called from C++ 2009-08-03 Dirk Eddelbuettel * DESCRIPTION: Release 0.6.6 * src/Rcpp.{h,cpp}: Added exists() method for RcppParams to test for existence of a named parameter. * inst/doc/: Updated doxygen documentation 2009-04-01 Dirk Eddelbuettel * DESCRIPTION: Release 0.6.5 * COPYING: Added 2009-03-30 Dirk Eddelbuettel * src/Makevars: Add $(R_ARCH) to target directory path when copying the header file as an OS X user reported not finding it with default settings. 2009-03-01 Dirk Eddelbuettel * DESCRIPTION: Release 0.6.4 * .Rbuildignore: Added to exclude debian/ from source tarball 2009-02-25 Dirk Eddelbuettel * src/Makevars.win: Renamed from Makefile.win, added missing mkdir * cleanup: Remove a few more Windows files 2009-02-24 Dirk Eddelbuettel * inst/doc/{html,latex,man}: Added new documentation of the C++ classes * doxyfile: Added Doxygen configuration file for doc generation 2009-02-22 Dirk Eddelbuettel * src/Rcpp.{h,cpp}: cleaner use of namespace 'std' by formal prefix rather than via 'using namespace std' * src/Rcpp.h: define R_NO_MAP and use Rf_* form of R API functions 2009-02-18 Dirk Eddelbuettel * src/Rcpp.{h,cpp}: Added a few explicit casts, and removed unused loop variable; all to make 'g++ -Wall' happy 2009-02-10 Dirk Eddelbuettel * src/Rcpp.{cpp,h}: Expanded a few of the throw() messages 2009-01-09 Dirk Eddelbuettel * DESCRIPTION: Release 0.6.3 * R/RcppLdpath.R: Also defined shorter functions CxxFlags() and LdFlags() which cat() the longer forms RcppCxxFlags() and RcppLdFlags() to further simplify use via litter or Rscript in Makefile or Makevars * man/Rcpp-package.Rd: Mention short form CxxFlags() and LdFlags() * src/Makevars: Applied another build correction for OS X suggested by Simon Urbanek * src/Rcpp.{cpp,h}: Added 'view-only' classes RcppVectorView, RcppMatrixView and RcppStringVectorView contributed by David Reiss 2008-12-02 Dirk Eddelbuettel * DESCRIPTION: Release 0.6.2 * R/RcppLdPath.R: Correct output for the default Linux case 2008-11-30 Dirk Eddelbuettel * DESCRIPTION: Release 0.6.1 * src/Makevars: Added, replacing src/Makefile: thanks to Simon for a rewrite that provides OS X support * src/Makefile: Retired * src/Makefile.win: Now build libRcpp.a instead of Rcpp.a * src/Rcpp.{cpp,h}: Removed #ifdef statements related to QuantLib and Date ops as we no longer need to split this off -- one build for all uses; also added another date offset for the difference between the Unix epoch of Jan 1, 1970 and what certain spreadsheets use (which is what QuantLib) follows. With this change, Rcpp is completely decoupled from QuantLib headers, yet can be used from QuantLib 0.2.10 or later. However, this also removes data conversion from R/Rcpp to QL as Rcpp no longer 'knows' QL. * R/RcppLdPath.R: Adds new functions RcppLdPath() to return lib/ directory path, and RcppLdFlags() to return arguments, including the optional rpath settings on Linux * R/RcppExample.R: Added new example 'RcppVectorExample()', extended default print method for examples * man/Rcpp-package.Rd: Expanded / updated documentation of package use when building other packages * cleanup: Removing static libraries too but do not remove src/Makevars 2008-11-05 Dirk Eddelbuettel * Release 0.6.0 * New maintainer * src/Makefile{,.win}: New files, 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 * src/Makevars.in: Removed * src/Rcpp.{cpp,h}: moved in from ../RcppSrc * src/Rcpp.{cpp,h}: Add new type RcppDatetime corresponding to POSIXct in with full support for microsecond time resolution between R and C++ * man/*: Several new manual pages added * configure{,.in,.win}: Removed as src/Makefile* can handle this more easily * DESCRIPTION: Minor cleanup and reformatting, Date: now uses svn:keyword Date property * NAMESPACE: Renamed RcppTemplateVersion to RcppVersion, deleted RcppDemo * demo/ directory removed as vignette("RcppAPI") is easier and more reliable to show vignette documentation * R/zzz.R: RcppTemplateDemo() removed, vignette("RcppAPI") is easier * man/RcppTemplateDemo.Rd removed as well * R/RcppExample.R: reindented, rewritten to set default arguments * R/RcppTemplateVersion.R: renamed to RcppVersion.R * man/RcppTemplateVersion.Rd: renamed to RcppVersion.Rd * RcppSrc/Rcpp.{cpp,h}: moved to src/ directory * RcppSrc/Makefile{,.win}: removed * inst/doc/RcppAPI.{Rnw,pdf}: Added footnote onto titlepage about how this document has not (yet) been updated along with the channges made rcpp-0.11.0/man/0000755000000000000000000000000012273203645010202 5ustar rcpp-0.11.0/man/exportAttribute.Rd0000644000000000000000000000611112253723677013707 0ustar \name{exportAttribute} \alias{exportAttribute} \title{Rcpp::export Attribute} \description{ The \code{Rcpp::export} attribute is added to a C++ function definition to indicate that it should be made available as an R function. The \code{\link{sourceCpp}} and \code{\link{compileAttributes}} functions process the \code{Rcpp::export} attribute by generating the code required to call the C++ function from R. } \arguments{ \item{name}{ Specify an alternate name for the generated R function (optional, defaults to the name of the C++ function if not specified). } } \details{ Functions marked with the \code{Rcpp::export} attribute must meet several conditions to be correctly handled: \enumerate{ \item Be defined in the global namespace (i.e. not within a C++ \code{namespace} declaration). \item Have a return type that is either void or compatible with \code{Rcpp::wrap} and parameter types that are compatible with \code{Rcpp::as} (see sections 3.1 and 3.2 of the \emph{Rcpp-introduction} vignette for more details). \item Use fully qualified type names for the return value and all parameters. However, Rcpp types may appear without the namespace qualifier (i.e. \code{DataFrame} is okay as a type name but \code{std::string} must be specified fully). } If default argument values are provided in the C++ function definition then these defaults are also used for the exported R function. For example, the following C++ function: \preformatted{ DataFrame readData( CharacterVector file, CharacterVector exclude = CharacterVector::create(), bool fill = true) } Will be exported to R as: \preformatted{ function (file, exclude = character(0), fill = TRUE) } Note that C++ rules for default arguments still apply: they must occur consecutively at the end of the function signature and unlike R can't rely on the values of other arguments. } \note{ When a C++ function has export bindings automatically generated by the \code{\link{compileAttributes}} function, it can optionally also have a direct C++ interface generated using the \code{\link[=interfacesAttribute]{Rcpp::interfaces}} attribute. The \code{Rcpp::export} attribute is specified using a syntax compatible with the new \href{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}{generalized attributes} feature of the C++11 standard. Note however that since this feature is not yet broadly supported by compilers it needs to be specified within a comment (see examples below). } \seealso{ \code{\link{sourceCpp}} and \code{\link{compileAttributes}} } \examples{ \dontrun{ #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-0.11.0/man/Module.Rd0000644000000000000000000000127012253723677011730 0ustar \name{Module} \alias{Module} \title{ Retrieves an Rcpp module } \description{ Retrieves an Rcpp module from a dynamic library, usually associated with a package. } \usage{ Module(module, PACKAGE = , where = , mustStart = ) } \arguments{ \item{module}{Name of the module, as declared in the \code{RCPP_MODULE} macro internally} \item{PACKAGE}{Passed to \code{\link{getNativeSymbolInfo}}} \item{where}{When the module is loaded, S4 classes are defined based on the internal classes. This argument is passed to \code{\link{setClass}} } \item{mustStart}{TODO} } \value{ An object of class \linkS4class{Module} collecting functions and classes declared in the module. } \keyword{programming} rcpp-0.11.0/man/loadRcppModules.Rd0000644000000000000000000000132512253723677013601 0ustar \name{loadRcppModules} \alias{loadRcppModules} \title{ Loads Rcpp modules on package startup } \description{ Function to simplify loading Rcpp modules contained in a package. This function must be called from the \code{.onLoad} function of a package. It uses the \code{RcppModules} field of the package \code{DESCRIPTION} file to query the names of the modules that the package should export, loads each module, and \code{\link{populate}} each module into the package NAMESPACE. } \usage{ loadRcppModules(direct=TRUE) } \arguments{ \item{direct}{if \code{TRUE} the content of the module is exposed in the namespace. Otherwise, the module is exposed. } } \seealso{ \code{\link{populate}} } \keyword{interface} rcpp-0.11.0/man/CppConstructor-class.Rd0000644000000000000000000000201012253723677014567 0ustar \name{C++Constructor-class} \Rdversion{1.1} \docType{class} \alias{C++Constructor-class} \title{Class "C++Constructor"} \description{ Representation of a C++ constructor } \section{Extends}{ Class \code{"\linkS4class{envRefClass}"}, directly. Class \code{"\linkS4class{.environment}"}, by class "envRefClass", distance 2. Class \code{"\linkS4class{refClass}"}, by class "envRefClass", distance 2. Class \code{"\linkS4class{environment}"}, by class "envRefClass", distance 3, with explicit coerce. Class \code{"\linkS4class{refObject}"}, by class "envRefClass", distance 3. } \keyword{classes} \section{Fields}{ \describe{ \item{\code{pointer}:}{pointer to the internal structure that represent the constructor} \item{\code{class_pointer}:}{pointer to the internal structure that represent the associated C++ class} \item{\code{nargs}:}{Number of arguments the constructor expects} \item{\code{signature}:}{C++ signature of the constructor} \item{\code{docstring}:}{Short description of the constructor} } } rcpp-0.11.0/man/CppField-class.Rd0000644000000000000000000000143712253723677013301 0ustar \name{C++Field-class} \Rdversion{1.1} \docType{class} \alias{C++Field-class} \title{Class "C++Field"} \description{ Metadata associated with a field of a class exposed through Rcpp modules } \section{Fields}{ \describe{ \item{\code{pointer}:}{external pointer to the internal (C++) object that represents fields} \item{\code{cpp_class}:}{(demangled) name of the C++ class of the field} \item{\code{read_only}:}{Is this field read only} \item{\code{class_pointer}:}{external pointer to the class this field is from. } } } \section{Methods}{ No methods defined with class "C++Field" in the signature. } \seealso{ The \code{fields} slot of the \code{\linkS4class{C++Class}} class is a list of \code{C++Field} objects } \examples{ showClass("C++Field") } \keyword{classes} rcpp-0.11.0/man/CppOverloadedMethods-class.Rd0000644000000000000000000000160312253723677015661 0ustar \name{C++OverloadedMethods-class} \Rdversion{1.1} \docType{class} \alias{C++OverloadedMethods-class} \title{Class "C++OverloadedMethods"} \description{ Set of C++ methods } \section{Extends}{ Class \code{"\linkS4class{envRefClass}"}, directly. Class \code{"\linkS4class{.environment}"}, by class "envRefClass", distance 2. Class \code{"\linkS4class{refClass}"}, by class "envRefClass", distance 2. Class \code{"\linkS4class{environment}"}, by class "envRefClass", distance 3, with explicit coerce. Class \code{"\linkS4class{refObject}"}, by class "envRefClass", distance 3. } \keyword{classes} \section{Fields}{ \describe{ \item{\code{pointer}:}{Object of class \code{externalptr} pointer to the internal structure that represents the set of methods } \item{\code{class_pointer}:}{Object of class \code{externalptr} pointer to the internal structure that models the related class } } } rcpp-0.11.0/man/CppFunction-class.Rd0000644000000000000000000000200412253723677014032 0ustar \name{C++Function-class} \Rdversion{1.1} \docType{class} \alias{C++Function-class} \alias{show,C++Function-method} \title{Class "C++Function"} \description{ Internal C++ function } \section{Objects from the Class}{ Objects can be created by the \code{Rcpp::InternalFunction} class from the \code{Rcpp} library } \section{Slots}{ \describe{ \item{\code{.Data}:}{R function that calls back to the internal function} \item{\code{pointer}:}{External pointer to a C++ object poiting to the function} \item{\code{docstring}:}{Short documentation for the function} \item{\code{signature}:}{C++ signature} } } \section{Extends}{ Class \code{"\linkS4class{function}"}, from data part. Class \code{"\linkS4class{OptionalFunction}"}, by class "function", distance 2. Class \code{"\linkS4class{PossibleMethod}"}, by class "function", distance 2. } \section{Methods}{ \describe{ \item{show}{\code{signature(object = "C++Function")}: print the object } } } \examples{ showClass("C++Function") } \keyword{classes} rcpp-0.11.0/man/formals.Rd0000644000000000000000000000054712253723677012154 0ustar \name{formals<--methods} \docType{methods} \alias{formals<--methods} \alias{formals<-,C++Function-method} \title{Set the formal arguments of a C++ function} \description{ Set the formal arguments of a C++ function } \section{Methods}{ \describe{ \item{\code{signature(fun = "C++Function")}}{ Set the formal arguments of a C++ function } }} \keyword{methods} rcpp-0.11.0/man/exposeClass.Rd0000644000000000000000000001651012253723677012777 0ustar \name{exposeClass} \alias{exposeClass} \title{ Create an Rcpp Module to Expose a C++ Class in R } \description{ The arguments specify a C++ class and some combination of constructors, fields and methods to be shared with \R by creating a corresponding reference class in \R. The information needed in the call to \code{exposeClass()} is the simplest possible in order to create a C++ module for the class; for example, fields and methods in this class need only be identified by their name. Inherited fields and methods can also be included, but more information is needed. The function writes a C++ source file, containing a module definition to expose the class to \R, plus one line of \R source to create the corresponding reference class. } \usage{ exposeClass(class, constructors = , fields = , methods = , file = , header = , module = , CppClass = class, readOnly = , rename = , Rfile = TRUE) } \arguments{ \item{class}{ The name of the class in \R. By default, this will be the same as the name of the class in C++, unless argument \code{CppClass} is supplied. } \item{constructors}{ A list of the signatures for any of the class constructors to be called from \R. Each element of the list gives the data types in C++ for the arguments to the corresponding constructor. See Details and the example. } \item{fields, methods}{ The vector of names for the fields and for the methods to be exposed in \R. For inherited fields and methods, type information needs to be supplied; see the section \dQuote{Inherited Fields and Methods}. } \item{file}{ Usually, the name for the file on which to write the C++ code, by default \code{paste0(CppClass, "Module.cpp")}. If the current working directory in \R is the top-level directory for a package, the function writes the file in the \code{"src"} subdirectory. Otherwise the file is written in the working directory. The argument may also be a connection, already open for writing. } \item{header}{ Whatever lines of C++ header information are needed to include the definition of the class. Typically this includes a file from the package where we are writing the module definition, as in the example below. } \item{module}{ The name for the Rcpp module, by default \code{paste0("class_",CppClass)}. } \item{CppClass}{ The name for the class in C++. By default and usually, the intended class name in \R. } \item{readOnly}{ Optional vector of field names. These fields will be created as read-only in the interface. } \item{rename}{ Optional named character vector, used to name fields or methods differently in \R from their C++ name. The elements of the vector are the C++ names and the corresponding elements of \code{names(rename)} the desired names in \R. So \code{c(.age = "age")} renames the C++ field or method \code{age} as \code{.age}. } \item{Rfile}{ Controls the writing of a one-line \R command to create the reference class corresponding to the C++ module information. By default, this will be a file \code{paste0(class, "Class.R")}. If the working directory is an \R package source directory, the file will be written in the \code{R} subdirectory, otherwise in the working directory itself. Supplying a character string substitutes that file name for the default. The argument may also be a connection open for writing or \code{FALSE} to suppress writing the \R source altogether. } } \details{ The file created by the call to these functions only depends on the information in the C++ class supplied. This file is intended to be part of the C++ source for an \R package. The file only needs to modified when the information changes, either because the class has changed or because you want to expose different information to \R. In that case you can either recall \code{exposeClass()} or edit the C++ file created. The Rcpp Module mechanism has a number of other optional techniques, not covered by \code{exposeClass()}. These should be entered into the C++ file created. See the \dQuote{rcpp-modules} vignette with the package for current possibilities. For fields and methods specified directly in the C++ class, the fields and method arguments to \code{exposeClass()} are character vectors naming the corresponding members of the class. For module construction, the data types of directly specified fields and of the arguments for the methods are not needed. For \emph{inherited} fields or methods, data type information is needed. See the section \dQuote{Inherited Fields and Methods}. For exposing class constructors, the module needs to know the signatures of the constructors to be exposed; each signature is a character vector of the corresponding C++ data types. } \section{Inherited Fields and Methods}{ If the C++ class inherits from one or more other classes, the standard Rcpp \code{Module} mechanism can not be used to expose inherited fields or methods. An indirect mechanism is used, generating free functions in C++ to expose the inherited members in \R. This mechanism requires data type information in the call to \code{exposeClass()}. This is provided by naming the corresponding element of the \code{fields} or \code{methods} argument with the name of the member. The actual element of the \code{fields} argument is then the single data type of the field. For the \code{methods} argument the argument will generally need to be a named list. The corresponding element of the list is the vector of data types for the return value and for the arguments, if any, to the method. For example, if C++ method \code{foo()} took a single argument of type \code{NumericVector} and returned a value of type \code{long}, the \code{methods} argument would be \code{list(foo = c("long", "NumericVector"))}. See the second example below. } \value{ Nothing, called for its side effect. } \author{ John Chambers } \seealso{ \code{\link{setRcppClass}}, which must be called from some \R source in the package. } \examples{ \dontrun{ ### Given the following C++ class, defined in file PopBD.h, ### the call to exposeClass() shown below will write a file ### src/PopBDModule.cpp containing a corresponding module definition. ### class PopBD { ### public: ### PopBD(void); ### PopBD(NumericVector initBirth, NumericVector initDeath); ### ### std::vector birth; ### std::vector death; ### std::vector lineage; ### std::vector size; ### void evolve(int); ### ### }; ### A file R/PopBDClass.R will be written containing the one line: ### PopBD <- setRcppClass("PopBD") ### ### The call below exposes the lineage and size fields, read-only, ### and the evolve() method. exposeClass("PopBD", constructors = list("", c("NumericVector", "NumericVector")), fields = c("lineage", "size"), methods = "evolve", header = '#include "PopBD.h"', readOnly = c("lineage", "size")) ### Example with inheritance: the class PopCount inherits from ### the previous class, and adds a method table(). It has the same ### constructors as the previous class. ### To expose the table() method, and the inherited evolve() method and size field: exposeClass("PopCount", constructors = list("", c("NumericVector", "NumericVector")), fields = c(size = "std::vector"), methods = list("table", evolve = c("void", "int")), header = '#include "PopCount.h"', readOnly = "size") } } \keyword{ programming } \keyword{ classes } rcpp-0.11.0/man/setRcppClass.Rd0000644000000000000000000001071112253723677013111 0ustar \name{setRcppClass} \alias{setRcppClass} \alias{loadRcppClass} \alias{RcppClass-class} \title{ Create a Class Extending a C++ Class } \description{ These routines create a class definition in \R for an exposed C++ class, setting up and executing a load action to incorporate the C++ pointer information. Neither function should normally need to be called directly; for most applications, a call to \code{\link{exposeClass}()} will create both C++ and \R code files to expose the C++ class. } \usage{ setRcppClass(Class, CppClass = , module = , fields = list(), contains = , methods = , saveAs = Class, where = , ...) loadRcppClass(Class, CppClass = , module = , fields = character(), contains = character(), methods = , saveAs = Class, where = , ...) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{Class}{ The name for the new class. } \item{CppClass}{ The C++ class defined in the C++ code for the package that this class extends. By default, the same as \code{Class}. } \item{module}{ The Rcpp module in which the class is defined. The module does not have to be loaded separately; \code{setRcppClass()} will arrange to load the module. By default, \code{"class_"} followed by the C++ class name. If \code{\link{exposeClass}()} has been called, the necessary module code will have been written in the \code{src} directory of the package. } \item{fields, contains, methods}{ Additional fields, superclasses and method definitions in \R{} that extend the C++ class. These arguments are passed on to \code{\link{setRefClass}()}. } \item{saveAs}{ Save a generator object for the class in the package's namespace under this name. By default, the generator object has the name of the class. To avoid saving any generator object, supply this argument as \code{NULL}. (This argument is currently needed because the actual class definition must take place at package load time, to include C++ pointer information. Therefore the value returned by \code{setRcppClass()} when called during package installation is not the generator object returned by \code{setRefClass()}. We may be able to hack around this problem in the future.) } \item{where}{ The environment in which to save the class definition. By default, will be the namespace of the package in which the \code{setRcppClass()} call is included. } \item{\dots}{ Arguments, if any, to pass on to \code{\link{setRefClass}()}. } } \details{ The call to these functions normally appears in the source code for a package; in particular, a call is written in an \R source file when \code{\link{exposeClass}()} is called. \R{} code for this class or (preferably) a subclass can define new fields and methods for the class. Methods for the \R{} class can refer to methods and fields defined in C++ for the C++ class, if those have been exposed. The fields and methods defined can include overriding C++ fields or methods. Keep in mind, however, that \R{} methods can refer to C++ fields and methods, but not the reverse. If you override a C++ field or method, you essentially need to revise all code that refers to that field or method. Otherwise, the C++ code will continue to use the old C++ definition. } \value{ At load time, a generator for the new class is created and stored according to the \code{saveAs} argument, typically under the name of the class. The value returned at installation time is a dummy. Future revisions of the function may allow us to return a valid generator at install time. We recommend using the standard style of assigning the value to the name of the class, as one would do with \code{\link{setRefClass}}. } \author{ John Chambers } \note{ This function and function \code{\link{loadModule}()} require version 2.15.0 of \R{} or later, in order to use load actions, introduced in that version. A subtle way this can fail is by somehow loading a legitimate binary version of your package (installed under a valid version of \R{}) into a session with an older \R{}. In this case the load actions created in the binary package will simply not be called. None of the modules will be loaded and none of the classes created. If your symptom is that classes or other objects from modules don't exist, check the \R{} version. } \examples{ \dontrun{ setRcppClass("World", module = "yada", fields = list(more = "character"), methods = list( test = function(what) message("Testing: ", what, "; ", more)), saveAs = "genWorld" ) } } \keyword{ classes } rcpp-0.11.0/man/Rcpp.plugin.maker.Rd0000644000000000000000000000220712253723677014003 0ustar \name{Rcpp.plugin.maker} \alias{Rcpp.plugin.maker} \title{ Facilitating making package plugins } \description{ This function helps packages making inline plugins. } \usage{ Rcpp.plugin.maker( include.before = "", include.after = "", LinkingTo = unique(c(package, "Rcpp")), Depends = unique(c(package, "Rcpp")), libs = "", Makevars = NULL, Makevars.win = NULL, package = "Rcpp" ) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{include.before}{Code to be included before the \samp{Rcpp.h} file} \item{include.after}{Code to be included after the \samp{Rcpp.h} file } \item{LinkingTo}{Packages to be added to the \samp{LinkingTo} field } \item{Depends}{Packages to be added to the \samp{Depends} field } \item{libs}{library flags} \item{Makevars}{content for a \samp{Makevars} file, or \code{NULL}} \item{Makevars.win}{content for a \samp{Makevars.win} file, or \code{NULL}} \item{package}{The package this plugin is for. } } \value{ A function that is suitable as a plugin. See for example the \samp{RcppArmadillo} package that uses this to create its inline plugin. } \keyword{interface} rcpp-0.11.0/man/populate.Rd0000644000000000000000000000051012253723677012330 0ustar \name{populate} \alias{populate} \title{ Populates a namespace or an environment with the content of a module } \description{ Populates a namespace or an environment with the content of a module } \usage{ populate(module, env) } \arguments{ \item{module}{Rcpp module} \item{env}{environment or namespace} } \keyword{manip} rcpp-0.11.0/man/cppFunction.Rd0000644000000000000000000000640412253723677012777 0ustar \name{cppFunction} \alias{cppFunction} \title{ Define an R Function with a C++ Implementation } \description{ Dynamically define an R function with C++ source code. Compiles and links a shared library with bindings to the C++ function then defines an R function that uses \code{.Call} to invoke the library. } \usage{ cppFunction(code, depends = character(), plugins = character(), includes = character(), env = parent.frame(), rebuild = FALSE, showOutput = verbose, verbose = getOption("verbose")) } \arguments{ \item{code}{ Source code for the function definition. } \item{depends}{ Character vector of packages that the compilation depends on. Each package listed will first be queried for an \link[inline:plugins]{inline plugin} to determine header files to include. If no plugin is defined for the package then a header file based the package's name (e.g. \code{PkgName.hpp}) will be included. } \item{plugins}{ Character vector of \link[inline:plugins]{inline plugins} to use for the compliation. } \item{includes}{ Character vector of user includes (inserted after the includes provided by \code{depends}). } \item{env}{ The \link[base:environment]{environment} in which to define the R function. May be \code{NULL} in which case the defined function can be obtained from the return value of \code{cppFunction}. } \item{rebuild}{ Force a rebuild of the shared library. } \item{showOutput}{ \code{TRUE} to print \code{R CMD SHLIB} output to the console. } \item{verbose}{ \code{TRUE} to print detailed information about generated code to the console. } } \details{ Functions defined using \code{cppFunction} must have return types that are compatible with \code{Rcpp::wrap} and parameter types that are compatible with \code{Rcpp::as}. The shared library will not be rebuilt if the underlying code has not changed since the last compilation. } \value{ An R function that uses \code{.Call} to invoke the underlying C++ function. } \note{ You can also define R functions with C++ implementations using the \code{\link{sourceCpp}} function, which allows you to separate the C++ code into it's own source file. For many use cases this is an easier and more maintainable approach. } \seealso{ \code{\link{sourceCpp}}, \code{\link{evalCpp}} } \examples{ \dontrun{ cppFunction( 'int fibonacci(const int x) { if (x == 0) return(0); if (x == 1) return(1); return (fibonacci(x - 1)) + fibonacci(x - 2); }') cppFunction(depends = "RcppArmadillo", 'List fastLm(NumericVector yr, NumericMatrix Xr) { int n = Xr.nrow(), k = Xr.ncol(); arma::mat X(Xr.begin(), n, k, false); arma::colvec y(yr.begin(), yr.size(), false); arma::colvec coef = arma::solve(X, y); arma::colvec resid = y - X*coef; double sig2 = arma::as_scalar(arma::trans(resid)*resid/(n-k) ); arma::colvec stderrest = arma::sqrt( sig2 * arma::diagvec(arma::inv(arma::trans(X)*X))); return List::create(Named("coefficients") = coef, Named("stderr") = stderrest ); }') cppFunction(plugins=c("cpp11"), ' int useCpp11() { auto x = 10; return x; }') } } rcpp-0.11.0/man/Rcpp.package.skeleton.Rd0000644000000000000000000000761312273016501014612 0ustar \name{Rcpp.package.skeleton} \alias{Rcpp.package.skeleton} \title{ Create a skeleton for a new package depending on Rcpp } \description{ \code{Rcpp.package.skeleton} automates the creation of a new source package that intends to use features of Rcpp. It is based on the \link[utils]{package.skeleton} function which it executes first. } \usage{ Rcpp.package.skeleton(name = "anRpackage", list = character(), environment = .GlobalEnv, path = ".", force = FALSE, code_files = character(), cpp_files = character(), example_code = TRUE, attributes = TRUE, module = FALSE, author = "Who wrote it", maintainer = if(missing( author)) "Who to complain to" else author, email = "yourfault@somewhere.net", license = "What Licence is it under ?" ) } \arguments{ \item{name}{See \link[utils]{package.skeleton}} \item{list}{See \link[utils]{package.skeleton}} \item{environment}{See \link[utils]{package.skeleton}} \item{path}{See \link[utils]{package.skeleton}} \item{force}{See \link[utils]{package.skeleton}} \item{code_files}{See \link[utils]{package.skeleton}} \item{cpp_files}{A character vector with the paths to C++ source files to add to the package. } \item{example_code}{If TRUE, example c++ code using Rcpp is added to the package. } \item{attributes}{If TRUE, example code makes use of Rcpp attributes.} \item{module}{If TRUE, an example \code{\link{Module}} is added to the skeleton. } \item{author}{Author of the package.} \item{maintainer}{Maintainer of the package.} \item{email}{Email of the package maintainer.} \item{license}{License of the package.} } \details{ In addition to \link[utils]{package.skeleton} : The \samp{DESCRIPTION} file gains an Imports line requesting that the package depends on Rcpp and a LinkingTo line so that the package finds Rcpp header files. The \samp{NAMESPACE} gains a \code{useDynLib} directive as well as an \code{importFrom(Rcpp, evalCpp} to ensure instantiation of Rcpp. The \samp{src} directory is created if it does not exists and a \samp{Makevars} file is added setting the environment variables \samp{PKG_LIBS} to accomodate the necessary flags to link with the Rcpp library. If \code{cpp_files} are provided then they will be copied to the \samp{src} directory. If the \code{example_code} argument is set to \code{TRUE}, example files \samp{rcpp_hello_world.h} and \samp{rcpp_hello_world.cpp} are also created in the \samp{src}. An R file \samp{rcpp_hello_world.R} is expanded in the \samp{R} directory, the \code{rcpp_hello_world} function defined in this files makes use of the C++ function \samp{rcpp_hello_world} defined in the C++ file. These files are given as an example and should eventually by removed from the generated package. If the \code{attributes} argument is \code{TRUE}, then rather than generate the example files as described above, a single \samp{rcpp_hello_world.cpp} file is created in the \samp{src} directory and it's attributes are compiled using the \code{\link{compileAttributes}} function, so files \samp{RcppExports.R} and \samp{RcppExports.cpp} are generated as well. If the \code{module} argument is \code{TRUE}, a sample Rcpp module will be generated as well. } \value{ Nothing, used for its side effects } \seealso{ \link[utils]{package.skeleton} } \references{ Read the \emph{Writing R Extensions} manual for more details. Once you have created a \emph{source} package you need to install it: see the \emph{R Installation and Administration} manual, \code{\link{INSTALL}} and \code{\link{install.packages}}. } \examples{ \dontrun{ # simple package Rcpp.package.skeleton( "foobar" ) # package using attributes Rcpp.package.skeleton( "foobar", attributes = TRUE ) # package with a module Rcpp.package.skeleton( "testmod", module = TRUE ) # the Rcpp-package vignette vignette( "Rcpp-package" ) # the Rcpp-modules vignette for information about modules vignette( "Rcpp-modules" ) } } \keyword{ programming } rcpp-0.11.0/man/Module-class.Rd0000644000000000000000000000151412253723677013034 0ustar \name{Module-class} \Rdversion{1.1} \docType{class} \alias{Module-class} \alias{$,Module-method} \alias{prompt,Module-method} \alias{show,Module-method} \alias{initialize,Module-method} \title{Rcpp modules} \description{ Collection of internal c++ functions and classes exposed to R } \section{Objects from the Class}{ modules are created by the \code{link{Module}} function } \section{Methods}{ \describe{ \item{$}{\code{signature(x = "Module")}: extract a function or a class from the module. } \item{prompt}{\code{signature(object = "Module")}: generates skeleton of a documentation for a Module. } \item{show}{\code{signature(object = "Module")}: summary information about the module. } \item{initialize}{\code{signature(.Object = "Module")}: ... } } } \seealso{ The \code{\link{Module}} function } \keyword{classes} rcpp-0.11.0/man/pluginsAttribute.Rd0000644000000000000000000000200712253723677014047 0ustar \name{pluginsAttribute} \alias{pluginsAttribute} \title{Rcpp::plugins Attribute} \description{ The \code{Rcpp::plugins} attribute is added to a C++ source file to specify the \link[inline:plugins]{inline plugins} that should be used in the compilation. \preformatted{ // [[Rcpp::plugins(plugin1, plugin2)]] } } \arguments{ \item{\dots}{ Plugins to add to the compilation. } } \details{ Plugins must be registered using the \code{\link{registerPlugin}} function. When included within a \code{\link{sourceCpp}} translation unit, the configuration-related fields of the plugin (e.g. \code{env} and \code{LinkingTo}) are utilized, however the code-generation fields (e.g. \code{includes} and \code{body}) are not. } \note{ \pkg{Rcpp} includes a built-in \code{cpp11} plugin that adds the flags required to enable \code{C++11} features in the compiler. } \seealso{ \code{\link{registerPlugin}} } \examples{ \dontrun{ // [[Rcpp::plugins(cpp11)]] // [[Rcpp::export]] int useCpp11() { auto x = 10; return x; } } } rcpp-0.11.0/man/RcppUnitTests.Rd0000644000000000000000000000215712253723677013277 0ustar \name{RcppUnitTests} \alias{RcppUnitTests} \title{Rcpp : unit tests results} \description{ Unit tests results for package Rcpp. Unit tests are run automatically at build time and reports are included in the \samp{doc} directory as html or text. } \seealso{ \ifelse{latex}{}{\ifelse{html}{\url{../doc/unitTests-results/Rcpp-unitTests.html}: html formatted unit test report}{\samp{../doc/unitTests-results/Rcpp-unitTests.html}: html formatted unit test report}} } \details{ \ifelse{latex}{}{\ifelse{html}{\out{
}}{}}
\Sexpr[echo=FALSE,results=text]{ 
txt <- system.file( "doc", "unitTests-results", "Rcpp-unitTests.txt", package = "Rcpp" )
if( file.exists( txt ) ) paste( readLines( txt ), collapse = "\n\n" ) else ""
}
\ifelse{latex}{}{\ifelse{html}{\out{
}}{}} } \examples{ # unit tests are in the unitTests directory of the package list.files( system.file("unitTests", package = "Rcpp" ), pattern = "^runit", full = TRUE ) # trigger the unit tests preparation, follow printed instructions # on how to run them \dontrun{ source( system.file("unitTests", "runTests.R", package = "Rcpp" ) ) } } \keyword{programming} rcpp-0.11.0/man/RcppLdFlags.Rd0000644000000000000000000000144412253723677012647 0ustar \name{LdFlags} \alias{LdFlags} \alias{RcppLdFlags} \title{(Deprecated) Rcpp Linker Flags} \description{ In previous versions of Rcpp, \code{LdFlags} and \code{RcppLdFlags} were used to return the required flags and options for the system linker to link to the Rcpp user library. Since we no longer build or ship a user library, these functions now return an empty string. } \usage{ LdFlags() RcppLdFlags() } \value{ An empty string. } \references{ Dirk Eddelbuettel and Romain Francois (2011). \pkg{Rcpp}: Seamless R and C++ Integration. \emph{Journal of Statistical Software}, \bold{40(8)}, 1-18. URL http://www.jstatsoft.org/v40/i08/ and available as \code{vignette("Rcpp-introduction")}. } \author{Dirk Eddelbuettel and Romain Francois} \keyword{programming} \keyword{interface} rcpp-0.11.0/man/CppObject-class.Rd0000644000000000000000000000130212253723677013453 0ustar \name{C++Object-class} \Rdversion{1.1} \docType{class} \alias{C++Object-class} \alias{$,C++Object-method} \alias{$<-,C++Object-method} \alias{show,C++Object-method} \title{c++ internal objects} \description{ C++ internal objects instanciated from a class exposed in an Rcpp module } \section{Objects from the Class}{ This is a virtual class. Actual C++ classes are subclasses. } \section{Methods}{ \describe{ \item{$}{\code{signature(x = "C++Object")}: invokes a method on the object, or retrieves the value of a property } \item{$<-}{\code{signature(x = "C++Object")}: set the value of a property } \item{show}{\code{signature(object = "C++Object")}: print the object } } } \keyword{classes} rcpp-0.11.0/man/CppClass-class.Rd0000644000000000000000000000234512253723677013322 0ustar \name{C++Class-class} \Rdversion{1.1} \docType{class} \alias{C++Class-class} \alias{$,C++Class-method} \alias{show,C++Class-method} \title{Reflection information for an internal c++ class} \description{ Information about an internal c++ class. } \section{Objects from the Class}{ Objects are usually extracted from a \linkS4class{Module} using the dollar extractor. } \section{Slots}{ \describe{ \item{\code{.Data}:}{mangled name of the class} \item{\code{pointer}:}{external pointer to the internal infomation} \item{\code{module}:}{external pointer to the module} \item{\code{fields}:}{list of \linkS4class{C++Field} objects} \item{\code{constructors}:}{list of \linkS4class{C++Constructor} objects} \item{\code{methods}:}{list of \linkS4class{C++OverloadedMethods} objects} \item{generator}{the generator object for the class} \item{docstring}{description of the class} \item{typeid}{unmangled typeid of the class} \item{enums}{enums of the class} \item{parents}{names of the parent classes of this class} } } \section{Methods}{ \describe{ \item{show}{\code{signature(object = "C++Class")}: prints the class. } \item{$}{\code{signature(object = "C++Class")}: ... } } } \keyword{classes} rcpp-0.11.0/man/interfacesAttribute.Rd0000644000000000000000000000653112253723677014517 0ustar \name{interfacesAttribute} \alias{interfacesAttribute} \title{Rcpp::interfaces Attribute} \description{ The \code{Rcpp::interfaces} attribute is added to a C++ source file to specify which languages to generate bindings for from exported functions. For example: \preformatted{ // [[Rcpp::interfaces(r, cpp)]] } } \arguments{ \item{\dots}{ Interfaces to generate for exported functions within the source file. Valid values are \code{r} and \code{cpp}, and more than one interface can be specified. } } \details{ The \code{Rcpp::interfaces} attribute is used to determine which bindings to generate for exported functions. The default behavior if no \code{Rcpp::interfaces} attribute is specified is to generate only an R interface. When \code{cpp} bindings are requested code is generated as follows: \enumerate{ \item Bindings are generated into a header file located in the \code{inst/include} directory of the package using the naming convention \emph{PackageName_RcppExports.h} \item If not already present, an additional header file named \emph{PackageName.h} is also generated which in turn includes the Rcpp exports header. In the case that you already have a \emph{PackageName.h} header for your package then you can manually add an include of the Rcpp exports header to it to make the exported functions available to users of your package. \item The generated header file allows calling the exported C++ functions without any linking dependency on the package (this is based on using the \code{R_RegisterCCallable} and \code{R_GetCCallable} functions). \item The exported functions are defined within a C++ namespace that matches the name of the package. } For example, an exported C++ function \code{foo} could be called from package \code{MyPackage} as follows: \preformatted{ // [[Rcpp::depends(MyPackage)]] #include void foo() { MyPackage::bar(); } } The above example assumes that the \code{sourceCpp} function will be used to compile the code. If rather than that you are building a package then you don't need to include the \code{Rcpp::depends} attribute, but instead should add an entry for the referenced package in the \code{Depends} and \code{LinkingTo} fields of your package's \code{DESCRIPTION} file. } \note{ If a file by the name of \emph{PackageName.h} that wasn't generated by \code{compileAttributes} already exists in in the \code{inst/include} directory then it will not be overwritten (rather, an error will occur). A static naming scheme for generated header files and namespaces is used to ensure consistent usage semantics for clients of exported \code{cpp} interfaces. Packages that wish to export more complex interfaces or additional C++ types are therefore typically better off not using this mechanism. The \code{Rcpp::interfaces} attribute is specified using a syntax compatible with the new \href{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}{generalized attributes} feature of the C++11 standard. Note however that since this feature is not yet broadly supported by compilers it needs to be specified within a comment (see examples below). } \seealso{ \code{\link{compileAttributes}}, \code{\link[=exportAttribute]{Rcpp::export}}, \code{\link[=dependsAttribute]{Rcpp::depends}} } \examples{ \dontrun{ // [[Rcpp::interfaces(r, cpp)]] } } rcpp-0.11.0/man/Rcpp-package.Rd0000644000000000000000000000341012253723677012776 0ustar \name{Rcpp-package} \alias{Rcpp-package} \alias{Rcpp} \docType{package} \title{R / C++ interface} \description{The \pkg{Rcpp} package provides C++ classes that greatly facilitate interfacing C or C++ code in \R packages using the \code{.Call} interface provided by \R. } \section{Introduction}{ \pkg{Rcpp} provides C++ classes to facilitate manipulation of a large number of R data structures : vectors, functions, environments, ... The \dQuote{Rcpp-introduction} vignette gives an introduction on the package } \section{Usage for package building}{ The \dQuote{Rcpp-package} vignette documents how to use Rcpp in client packages. } \author{Dirk Eddelbuettel and Romain Francois} \references{ Dirk Eddelbuettel and Romain Francois (2011). \pkg{Rcpp}: Seamless R and C++ Integration. \emph{Journal of Statistical Software}, \bold{40(8)}, 1-18. URL \url{http://www.jstatsoft.org/v40/i08/} and available as \code{vignette("Rcpp-introduction")}. Eddelbuettel, Dirk (2013) Seamless R and C++ Integration with \pkg{Rcpp}. Springer, New York. ISBN 978-1-4614-6867-7. } \section{History}{ The initial versions of Rcpp were written by Dominick Samperi during 2005 and 2006. Dirk Eddelbuettel made some additions, and became maintainer in 2008. Dirk Eddelbuettel and Romain Francois have been extending Rcpp since 2009. } \seealso{ Development for \pkg{Rcpp} can be followed via the GitHub repository at \url{http://github.com/RcppCore/Rcpp}. Extensive examples with full documentation are available at \url{http://gallery.rcpp.org}. } \examples{ \dontrun{ # introduction to Rcpp vignette("Rcpp-introduction") # information on how to build a package that uses Rcpp vignette("Rcpp-package") } } \keyword{programming} \keyword{interface} rcpp-0.11.0/man/loadModule.Rd0000644000000000000000000000634312253723677012576 0ustar \name{loadModule} \alias{loadModule} \title{ Load an Rcpp Module into a Package } \description{ One or more calls to \code{loadModule} will be included in the source code for a package to load modules and optionally expose objects from them. The actual extraction of the module takes place at load time. } \usage{ loadModule(module, what = , loadNow, env =) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{module}{ The name of the C++ module to load. The code for the module should be in the same package as the \R{} call to \code{loadModule}. } \item{what}{ The objects to expose in the package's namespace corresponding to objects in the module. By default, nothing is exposed. The special value \code{TRUE} says to load all the objects in the module that have syntactically standard \R{} names (which all objects in a module will normally have). Otherwise, if supplied this should be a character vector, the elements being objects defined in the module. The vector can have a names attribute, in which case the non-empty names will be used to rename the objects; otherwise, the name of the object in the package namespace will be the same as the name in the C++ module. } \item{loadNow, env}{ A logical flag to say whether the load actions should happen now, and the environment into which the objects should be inserted. When called from the source of a package, both of these arguments should usually be omitted. The value of \code{loadNow} will be set by checking the module's status. At package installation time, the module cannot be started, in which case a load action (see \code{\link{setLoadAction}}) is scheduled to do the actual module load. The value of \code{env} will default to the package's namespace. } } \details{ If the purpose of loading the module is to define classes based on C++ classes, see \code{\link{setRcppClass}()}, which does the necessary module loading for you. When the module can be started (at namespace load time), the function \code{\link{Module}()} returns an environment with a description of the module's contents. Function \code{loadModule()} saves this as a metadata object in the package namespace. Therefore multiple calls to \code{loadModule()} are an efficient way to extract different objects from the module. Requesting an object that does not exist in the module produces a warning. Since assignments from the call cannot take place until namespace loading time, any computations using the objects must also be postponed until this time. Use load actions (\code{\link{setLoadAction}}) and make sure that the load action is specified after the call to \code{loadModule()}. } \value{ If the load takes place, the module environment is returned. Usually however the function is called for its side effects. } \note{ This function requires version 2.15.0 of \R{} or later, in order to use load actions, introduced in that version. See the note in the help page for \code{\link{setRcppClass}()} for details. } \author{ John Chambers } \seealso{ \code{\link{setRcppClass}()} to avoid the explicit call. \code{\link{loadRcppModules}()} for a shotgun procedure to load all modules. } \examples{ \dontrun{ loadModule("yada", TRUE) # load all the objects from module "yada" } } \keyword{ programming } rcpp-0.11.0/man/evalCpp.Rd0000644000000000000000000000241312253723677012075 0ustar \name{evalCpp} \alias{evalCpp} \alias{areMacrosDefined} \title{ Evaluate a C++ Expression } \description{ Evaluates a C++ expression. This creates a C++ function using \code{\link{cppFunction}} and calls it to get the result. } \usage{ evalCpp(code, depends = character(), includes = character(), rebuild = FALSE, showOutput = verbose, verbose = getOption("verbose")) areMacrosDefined(names, depends = character(), includes = character(), rebuild = FALSE, showOutput = verbose, verbose = getOption("verbose")) } \arguments{ \item{code}{ C++ expression to evaluate } \item{names}{ names of the macros we want to test } \item{depends}{ see \code{\link{cppFunction}} } \item{includes}{ see \code{\link{cppFunction}} } \item{rebuild}{ see \code{\link{cppFunction}} } \item{showOutput}{ see \code{\link{cppFunction}} } \item{verbose}{ see \code{\link{cppFunction}} } } \note{ The result type of the C++ expression must be compatible with \code{Rcpp::wrap}. } \value{ The result of the evaluated C++ expression. } \seealso{ \code{\link{sourceCpp}}, \code{\link{cppFunction}} } \examples{ \dontrun{ evalCpp( "__cplusplus" ) evalCpp( "std::numeric_limits::max()" ) areMacrosDefined( c("__cplusplus", "HAS_TR1" ) ) } } rcpp-0.11.0/man/registerPlugin.Rd0000644000000000000000000000126712253723677013514 0ustar \name{registerPlugin} \alias{registerPlugin} \title{ Register an inline plugin } \description{ Register an \link[inline:plugins]{inline plugin} for use with \code{\link{sourceCpp}} or \code{\link{cppFunction}}. Inline plugins are functions that return a list with additional includes, environment variables, and other compilation context. } \usage{ registerPlugin(name, plugin) } \arguments{ \item{name}{Name of the inline plugin} \item{plugin}{Inline plugin function} } \details{ Plugins can be added to \code{\link{sourceCpp}} compilations using the \code{\link[=pluginsAttribute]{Rcpp::plugins}} attribute. } \seealso{ \code{\link[=pluginsAttribute]{Rcpp::plugins}} } rcpp-0.11.0/man/sourceCpp.Rd0000644000000000000000000001016612273203645012440 0ustar \name{sourceCpp} \alias{sourceCpp} \title{ Source C++ Code from a File or String } \description{ \code{sourceCpp} parses the specified C++ file or source code and looks for functions marked with the \code{\link[=exportAttribute]{Rcpp::export}} attribute and RCPP_MODULE declarations. A shared library is then built and its exported functions and Rcpp modules are made available in the specified environment. } \usage{ sourceCpp(file = "", code = NULL, env = globalenv(), embeddedR = TRUE, rebuild = FALSE, showOutput = verbose, verbose = getOption("verbose")) } \arguments{ \item{file}{ A character string giving the path name of a file } \item{code}{ A character string with source code. If supplied, the code is taken from this string instead of a file. } \item{env}{ Environment where the R functions and modules should be made available. } \item{embeddedR}{ \code{TRUE} to run embedded R code chunks. } \item{rebuild}{ Force a rebuild of the shared library. } \item{showOutput}{ \code{TRUE} to print \code{R CMD SHLIB} output to the console. } \item{verbose}{ \code{TRUE} to print detailed information about generated code to the console. } } \details{ If the \code{code} parameter is provided then the \code{file} parameter is ignored. Functions exported using \code{sourceCpp} must meet several conditions, including being defined in the global namespace and having return types that are compatible with \code{Rcpp::wrap} and parameter types that are compatible with \code{Rcpp::as}. See the \code{\link[=exportAttribute]{Rcpp::export}} documentation for more details. Content of Rcpp Modules will be automatically loaded into the specified environment using the \code{\link[=Module]{Module}} and \code{\link[=populate]{populate}} functions. If the source file has compilation dependencies on other packages (e.g. \pkg{Matrix}, \pkg{RcppArmadillo}) then an \code{\link[=dependsAttribute]{Rcpp::depends}} attribute should be provided naming these dependencies. It's possible to embed chunks of R code within a C++ source file by including the R code within a block comment with the prefix of \code{/*** R}. For example: \preformatted{ /*** R # Call the fibonacci function defined in C++ fibonacci(10) */ } Multiple R code chunks can be included in a C++ file. R code is sourced after the C++ compliation is completed so all functions and modules will be available to the R code. } \value{ Returns (invisibly) a list with two elements: \tabular{ll}{ \code{functions} \tab Names of exported functions\cr \code{modules} \tab Names of Rcpp modules\cr } } \note{ The \code{sourceCpp} function will not rebuild the shared library if the source file has not changed since the last compilation. The \code{sourceCpp} function is designed for compiling a standalone source file whose only dependencies are R packages. If you are compiling more than one source file or have external dependencies then you should create an R package rather than using \code{sourceCpp}. Note that the \code{\link[=exportAttribute]{Rcpp::export}} attribute can also be used within packages via the \code{\link{compileAttributes}} function. If you are sourcing a C++ file from within the \code{src} directory of a package then the package's \code{LinkingTo} dependencies, \code{inst/include}, and \code{src} directories are automatically included in the compilation. If no \code{Rcpp::export} attributes or \code{RCPP_MODULE} declarations are found within the source file then a warning is printed to the console. You can disable this warning by setting the \code{rcpp.warnNoExports} option to \code{FALSE}. } \seealso{ \code{\link[=exportAttribute]{Rcpp::export}}, \code{\link[=dependsAttribute]{Rcpp::depends}}, \code{\link{cppFunction}}, \code{\link{evalCpp}} } \examples{ \dontrun{ sourceCpp("fibonacci.cpp") sourceCpp(code=' #include // [[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-0.11.0/man/dependsAttribute.Rd0000644000000000000000000000257512253723677014022 0ustar \name{dependsAttribute} \alias{dependsAttribute} \title{Rcpp::depends Attribute} \description{ The \code{Rcpp::depends} attribute is added to a C++ source file to indicate that it has a compilation dependency on one or more other packages. For example: \preformatted{ // [[Rcpp::depends(RcppArmadillo)]] } } \arguments{ \item{\dots}{ Packages which the source file depends on for compilation } } \details{ The \code{Rcpp::depends} attribute is used by the implementation of the \code{\link{sourceCpp}} function to correctly setup the build environment for \code{R CMD SHLIB}. The include directories of the specified packages are added to the \code{CLINK_CPPFLAGS} environment variable. In addition, if the referenced package provides an \link[inline:plugins]{inline plugin} it is called to determine additional environment variables required to successfully build. } \note{ The \code{Rcpp::depends} attribute is specified using a syntax compatible with the new \href{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}{generalized attributes} feature of the C++11 standard. Note however that since this feature is not yet broadly supported by compilers it needs to be specified within a comment (see examples below). } \seealso{ \code{\link{sourceCpp}} } \examples{ \dontrun{ // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::depends(Matrix, RcppGSL)]] } } rcpp-0.11.0/man/Rcpp-internal.Rd0000644000000000000000000000131012253723677013214 0ustar \name{Rcpp-internal} \alias{Rcpp-internal} \alias{cpp_object_initializer} \alias{cpp_object_dummy} \title{Rcpp internal functions} \description{The \pkg{Rcpp} utilizes several internal functions which need to visible within its namespace, yet are not user-facing. This page provides basic documentation for them. } \usage{ cpp_object_initializer(.self, .refClassDef, ..., .object_pointer) cpp_object_dummy(.self, .refClassDef) } \arguments{ \item{.self}{A reference to the object being modified} \item{.refClassDef}{The definition of a reference class} \item{...}{Further arguments} \item{.object_pointer}{Optional external pointer} } \keyword{programming} \keyword{interface} \keyword{internal} rcpp-0.11.0/man/compileAttributes.Rd0000644000000000000000000000452412253723677014207 0ustar \name{compileAttributes} \alias{compileAttributes} \title{ Compile Rcpp Attributes for a Package } \description{ Scan the source files within a package for attributes and generate code as required. Generates the bindings required to call C++ functions from R for functions adorned with the \code{Rcpp::export} attribute. } \usage{ compileAttributes(pkgdir = ".", verbose = getOption("verbose")) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{pkgdir}{ Directory containing the package to compile attributes for (defaults to the current working directory). } \item{verbose}{ \code{TRUE} to print detailed information about generated code to the console. } } \details{ The source files in the package directory given by \code{pkgdir} are scanned for attributes and code is generated as required based on the attributes. For C++ functions adorned with the \code{Rcpp::export} attribute, the C++ and R source code required to bind to the function from R is generated and added (respectively) to \code{src/RcppExports.cpp} or \code{R/RcppExports.R}. In order to access the declarations for custom \code{Rcpp::as} and \code{Rcpp::wrap} handlers the \code{compileAttributes} function will also call any \link[inline:plugins]{inline plugins} available for packages listed in the \code{LinkingTo} field of the \code{DESCRIPTION} file. } \value{ Returns (invisibly) a character vector with the paths to any files that were updated as a result of the call. } \note{ The \code{compileAttributes} function deals only with exporting C++ functions to R. If you want the functions to additionally be publicly available from your package's namespace another step may be required. Specifically, if your package \code{NAMESPACE} file does not use a pattern to export functions then you should add an explicit entry to \code{NAMESPACE} for each R function you want publicly available. In addition to exporting R bindings for C++ functions, the \code{compileAttributes} function can also generate a direct C++ interface to the functions using the \code{\link[=interfacesAttribute]{Rcpp::interfaces}} attribute. } \seealso{ \code{\link[=exportAttribute]{Rcpp::export}}, \code{\link[=interfacesAttribute]{Rcpp::interfaces}} } \examples{ \dontrun{ # Compile attributes for package in the current working dir compileAttributes() } } rcpp-0.11.0/man/DollarNames-methods.Rd0000644000000000000000000000075512253723677014354 0ustar \name{.DollarNames-methods} \docType{methods} \alias{.DollarNames-methods} \alias{.DollarNames,ANY-method} \alias{.DollarNames,C++Object-method} \alias{.DollarNames,Module-method} \title{ completion } \description{ completion } \section{Methods}{ \describe{ \item{\code{signature(x = "ANY")}}{} \item{\code{signature(x = "C++Object")}}{ completes fields and methods of C++ objects } \item{\code{signature(x = "Module")}}{ completes functions and classes of modules } }} \keyword{methods} rcpp-0.11.0/man/demangle.Rd0000644000000000000000000000277012253723677012265 0ustar \name{demangle} \alias{demangle} \alias{sizeof} \alias{print.bytes} \title{ c++ type information } \description{ \code{demangle} gives the demangled type, \code{sizeof} its size (in bytes). } \usage{ demangle(type = "int", ...) sizeof(type = "int", ...) } \arguments{ \item{type}{The type we want to demangle} \item{\dots}{Further argument for \code{\link{cppFunction}} } } \details{ The following function is compiled and invoked: \preformatted{% SEXP demangle_this_type(){ typedef %s type ; return wrap( DEMANGLE(type) ) ; } SEXP sizeof_this_type(){ typedef %s type ; return wrap( sizeof(type) ) ; } } \code{DEMANGLE} is a macro in \samp{Rcpp} that does the work. } \value{ The demangled type, as a string. } \references{ See this \href{http://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_demangling.html}{chapter} from the GNU C++ library manual. } \author{ Romain Francois } \note{ We only know how to demangle with gcc. If you know how to demangle types with your compiler, let us know. } \seealso{ \code{\link{cppFunction}} is used to compile the function \code{demangle} creates. } \examples{ \dontrun{ demangle( "int64_t" ) demangle( "uint64_t" ) demangle( "NumericVector" ) demangle( "std::map" ) sizeof( "long" ) sizeof( "long long" ) } } \keyword{programming} rcpp-0.11.0/NAMESPACE0000644000000000000000000000163712273011271010645 0ustar useDynLib(Rcpp, .registration = TRUE) import(methods) importFrom(utils, capture.output, assignInNamespace, .DollarNames, prompt, packageDescription) 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, setRcppClass, loadRcppClass, loadModule, cppFunction, exposeClass, evalCpp, sourceCpp, compileAttributes, registerPlugin, RcppLdFlags, LdFlags, demangle, sizeof, cpp_object_initializer, cpp_object_dummy, Rcpp.plugin.maker ) S3method( print, bytes ) exportClass(RcppClass) rcpp-0.11.0/vignettes/0000755000000000000000000000000012273452733011443 5ustar rcpp-0.11.0/vignettes/Rcpp-unitTests.Rnw0000644000000000000000000000466412273216120015035 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-unitTests} %\VignetteKeywords{R,Rcpp,unit tests} %\VignetteDepends{Rcpp} \usepackage{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ <>= require(Rcpp) prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") library(RUnit) @ \usepackage[colorlinks]{hyperref} \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{\textbf{Rcpp}: Unit testing results} \date{Rcpp version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \section*{Test Execution} <>= pkg <- "Rcpp" if( Sys.getenv( "TRAVIS" ) == "true" ){ writeLines( "not running any tests as part of checking the vignette when doing continuous integration with travis" ) } else { ## Check the environemnt variable to see if all tests should be run if (Sys.getenv("RunAllRcppTests") != "yes") { writeLines("The environment variable 'RunAllRcppTests' was not set to 'yes', so skipping some tests.") } if (file.exists("unitTests-results")) unlink("unitTests-results", recursive = TRUE) dir.create("unitTests-results") path <- system.file("unitTests", package=pkg) testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), dirs=path) tests <- runTestSuite(testSuite) err <- getErrors(tests) if (err$nFail > 0) stop(sprintf("unit test problems: %d failures", err$nFail)) if (err$nErr > 0) stop( sprintf("unit test problems: %d errors", err$nErr)) printHTMLProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.html", pkg)) printTextProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.txt" , pkg)) if (file.exists("/tmp")) { invisible(sapply(c("txt", "html"), function(ext) { fname <- sprintf("unitTests-results/%s-unitTests.%s", pkg, ext) file.copy(fname, "/tmp", overwrite=TRUE) })) } } @ \section*{Test Results} \begin{verbatim} <>= results <- "unitTests-results/Rcpp-unitTests.txt" if (file.exists(results)) { writeLines(readLines(results)) } else{ writeLines("Unit test results not available") } @ \end{verbatim} \end{document} rcpp-0.11.0/vignettes/Rcpp-modules.Rnw0000644000000000000000000007441512273015473014514 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-modules} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, module} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color, alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\code}[1]{\texttt{#1}} \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= suppressMessages(require(Rcpp)) prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{Exposing \proglang{C++} functions and classes with \pkg{Rcpp} modules} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This note discusses \textsl{Rcpp modules}. \textsl{Rcpp modules} allow programmers to expose \proglang{C++} functions and classes to \proglang{R} with relative ease. \textsl{Rcpp modules} are inspired from the \pkg{Boost.Python} \proglang{C++} library \citep{Abrahams+Grosse-Kunstleve:2003:Boost.Python} which provides similar features for \proglang{Python}. } \section{Motivation} Exposing \proglang{C++} functionality to \proglang{R} is greatly facilitated by the \pkg{Rcpp} package and its underlying \proglang{C++} library \citep{CRAN:Rcpp,JSS:Rcpp}. \pkg{Rcpp} smoothes many of the rough edges in \proglang{R} and \proglang{C++} integration by replacing the traditional \proglang{R} Application Programming Interface (API) described in `\textsl{Writing R Extensions}' \citep{R:Extensions} with a consistent set of \proglang{C++} classes. The `\textsl{Rcpp-introduction}' vignette \citep{CRAN:Rcpp,JSS:Rcpp} describes the API and provides an introduction to using \pkg{Rcpp}. These \pkg{Rcpp} facilities offer a lot of assistance to the programmer wishing to interface \proglang{R} and \proglang{C++}. At the same time, these facilities are limited as they operate on a function-by-function basis. The programmer has to implement a \code{.Call} compatible function (to conform to the \proglang{R} API) using classes of the \pkg{Rcpp} API as described in the next section. \subsection{Exposing functions using \pkg{Rcpp}} Exposing existing \proglang{C++} functions to \proglang{R} through \pkg{Rcpp} usually involves several steps. One approach is to write an additional wrapper function that is responsible for converting input objects to the appropriate types, calling the actual worker function and converting the results back to a suitable type that can be returned to \proglang{R} (\texttt{SEXP}). Consider the \texttt{norm} function below: <>= double norm( double x, double y ) { return sqrt( x*x + y*y ); } @ This simple function does not meet the requirements set by the \texttt{.Call} convention, so it cannot be called directly by \proglang{R}. Exposing the function involves writing a simple wrapper function that does match the \texttt{.Call} requirements. \pkg{Rcpp} makes this easy. <>= using namespace Rcpp; RcppExport SEXP norm_wrapper(SEXP x_, SEXP y_) { // step 0: convert input to C++ types double x = as(x_), y = as(y_); // step 1: call the underlying C++ function double res = norm( x, y ); // step 2: return the result as a SEXP return wrap( res ); } @ Here we use the (templated) \pkg{Rcpp} converter \texttt{as()} which can transform from a \texttt{SEXP} to a number of different \proglang{C++} and \pkg{Rcpp} types. The \pkg{Rcpp} function \texttt{wrap()} offers the opposite functionality and converts many known types to a \texttt{SEXP}. This process is simple enough, and is used by a number of CRAN packages. However, it requires direct involvement from the programmer, which quickly becomes tiresome when many functions are involved. \textsl{Rcpp modules} provides a much more elegant and unintrusive way to expose \proglang{C++} functions such as the \texttt{norm} function shown above to \proglang{R}. We should note that \pkg{Rcpp} now has \textsl{Rcpp attributes} which extends certain aspect of \textsl{Rcpp modules} and makes binding to simple functions such as this one even easier. With \textsl{Rcpp attribues} we can just write <>= # include // [[Rcpp::export]] double norm(double x, double y) { return sqrt(x*x + y*y); } @ See the corresponding vignette \citep{CRAN:Rcpp:Attributes} for details, but read on for \textsl{Rcpp modules} which contains to provide features not covered by \textsl{Rcpp attributes}, particularly when it comes to binding entire C++ classes and more. \subsection{Exposing classes using Rcpp} Exposing \proglang{C++} classes or structs is even more of a challenge because it requires writing glue code for each member function that is to be exposed. Consider the simple \texttt{Uniform} class below: <>= class Uniform { public: Uniform(double min_, double max_) : min(min_), max(max_) {} NumericVector draw(int n) { RNGScope scope; return runif( n, min, max ); } private: double min, max; }; @ To use this class from R, we at least need to expose the constructor and the \texttt{draw} method. External pointers \citep{R:Extensions} are the perfect vessel for this, and using the \texttt{Rcpp:::XPtr} template from \pkg{Rcpp} we can expose the class with these two functions: <>= using namespace Rcpp; /// create an external pointer to a Uniform object RcppExport SEXP Uniform__new(SEXP min_, SEXP max_) { // convert inputs to appropriate C++ types double min = as(min_), max = as(max_); // create a pointer to an Uniform object and wrap it // as an external pointer Rcpp::XPtr ptr( new Uniform( min, max ), true ); // return the external pointer to the R side return ptr; } /// invoke the draw method RcppExport SEXP Uniform__draw( SEXP xp, SEXP n_ ) { // grab the object as a XPtr (smart pointer) to Uniform Rcpp::XPtr ptr(xp); // convert the parameter to int int n = as(n_); // invoke the function NumericVector res = ptr->draw( n ); // return the result to R return res; } @ As it is generally a bad idea to expose external pointers `as is', they usually get wrapped as a slot of an S4 class. Using \code{cxxfunction()} from the \pkg{inline} package, we can build this example on the fly. Suppose the previous example code assigned to a text variable \texttt{unifModcode}, we could then do %% DE 21 Sep 2013: there must a bug somewhere in the vignette processing %% as the following example produces only empty lines preceded %% by '+' -- same for 0.10.4 release and current 0.10.5 pre-release %% hence shortened example to not show code again <>= f1 <- cxxfunction( , "", includes = unifModCode, plugin = "Rcpp" ) getDynLib(f1) ## will display information about 'f1' just created @ The following listing shows some \textsl{manual} wrapping to access the code, we will see later how this can be automated: <>= setClass( "Uniform", representation( pointer = "externalptr" ) ) # helper Uniform_method <- function(name) { paste( "Uniform", name, sep = "__" ) } # syntactic sugar to allow object$method( ... ) setMethod( "$", "Uniform", function(x, name ) { function(...) .Call( Uniform_method(name) , x@pointer, ... ) } ) # syntactic sugar to allow new( "Uniform", ... ) setMethod( "initialize", "Uniform", function(.Object, ...) { .Object@pointer <- .Call( Uniform_method("new"), ... ) .Object } ) u <- new( "Uniform", 0, 10 ) u$draw( 10L ) @ \pkg{Rcpp} considerably simplifies the code that would be involved for using external pointers with the traditional \proglang{R} API. Yet this still involves a lot of mechanical code that quickly becomes hard to maintain and error prone. \textsl{Rcpp modules} offer an elegant way to expose the \texttt{Uniform} class in a way that makes both the internal \proglang{C++} code and the \proglang{R} code easier. \section{Rcpp modules} \label{sec:modules} The design of Rcpp modules has been influenced by \proglang{Python} modules which are generated by the \texttt{Boost.Python} library \citep{Abrahams+Grosse-Kunstleve:2003:Boost.Python}. Rcpp modules provide a convenient and easy-to-use way to expose \proglang{C++} functions and classes to \proglang{R}, grouped together in a single entity. A Rcpp module is created in a \texttt{cpp} file using the \texttt{RCPP\_MODULE} macro, which then provides declarative code of what the module exposes to \proglang{R}. \subsection{Exposing \proglang{C++} functions using Rcpp modules} Consider the \texttt{norm} function from the previous section. We can expose it to \proglang{R} : <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod) { function( "norm", &norm ); } @ The code creates an Rcpp module called \texttt{mod} that exposes the \texttt{norm} function. \pkg{Rcpp} automatically deduces the conversions that are needed for input and output. This alleviates the need for a wrapper function using either \pkg{Rcpp} or the \proglang{R} API. On the \proglang{R} side, the module is retrieved by using the \code{Module} function from \pkg{Rcpp} <>= inc <- ' using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod) { function( "norm", &norm ); } ' fx <- cxxfunction(signature(), plugin="Rcpp", include=inc) mod <- Module("mod", getDynLib(fx)) @ Note that this example assumed that the previous code segment defining the module was returned by the \code{cxxfunction()} (from the \pkg{inline} package) as callable R function \code{fx} from which we can extract the relevant pointer using \code{getDynLib()}. In the case of using Rcpp modules via a package (which is detailed in Section~\ref{sec:package} below), modules are actually loaded differently and we would have used <>= require(nameOfMyModulePackage) mod <- new( mod ) mod$norm( 3, 4 ) @ where the module is loaded upon startup and we use the constructor directly. More details on this aspect follow below. A module can contain any number of calls to \texttt{function} to register many internal functions to \proglang{R}. For example, these 6 functions : <>= std::string hello() { return "hello"; } int bar( int x) { return x*2; } double foo( int x, double y) { return x * y; } void bla( ) { Rprintf( "hello\\n" ); } void bla1( int x) { Rprintf( "hello (x = %d)\\n", x ); } void bla2( int x, double y) { Rprintf( "hello (x = %d, y = %5.2f)\\n", x, y ); } @ can be exposed with the following minimal code: <>= RCPP_MODULE(yada) { using namespace Rcpp; function("hello" , &hello); function("bar" , &bar ); function("foo" , &foo ); function("bla" , &bla ); function("bla1" , &bla1 ); function("bla2" , &bla2 ); } @ which can then be used from \proglang{R}: <>= require( Rcpp ) yd <- Module("yada", getDynLib(fx)) yd$bar(2L) yd$foo(2L, 10.0) yd$hello() yd$bla() yd$bla1(2L) yd$bla2(2L, 5.0) @ In the case of a package (as for example the one created by \code{Rcpp.package.skeleton()} with argument \code{module=TRUE}; more on that below), we can use <>= require(myModulePackage) ## or whichever name was chose bar(2L) foo(2L, 10.0) hello() bla() bla1(2L) bla2(2L, 5.0) @ The requirements for a function to be exposed to \proglang{R} via Rcpp modules are: \begin{itemize} \item The function takes between 0 and 65 parameters. \item The type of each input parameter must be manageable by the \texttt{Rcpp::as} template. \item The return type of the function must be either \texttt{void} or any type that can be managed by the \texttt{Rcpp::wrap} template. \item The function name itself has to be unique in the module. In other words, no two functions with the same name but different signatures are allowed. C++ allows overloading functions. This might be added in future versions of modules. \end{itemize} \subsubsection{Documentation for exposed functions using Rcpp modules} In addition to the name of the function and the function pointer, it is possible to pass a short description of the function as the third parameter of \texttt{function}. <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod) { function( "norm", &norm, "Provides a simple vector norm" ); } @ The description is used when displaying the function to the R prompt: <>= mod <- Module("mod", getDynLib(fx)) show(mod$norm) @ \subsubsection{Formal arguments specification} \texttt{function} also gives the possibility to specify the formal arguments of the R function that encapsulates the C++ function, by passing a \texttt{Rcpp::List} after the function pointer. <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod_formals) { function("norm", &norm, List::create( _["x"] = 0.0, _["y"] = 0.0 ), "Provides a simple vector norm"); } @ A simple usage example is provided below: <>= norm <- mod$norm norm() norm( y = 2 ) norm( x = 2, y = 3 ) args( norm ) @ To set formal arguments without default values, simply omit the rhs. <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod_formals2) { function("norm", &norm, List::create( _["x"], _["y"] = 0.0 ), "Provides a simple vector norm"); } @ This can be used as follows: <>= norm <- mod$norm args(norm) @ The ellipsis (\texttt{...}) can be used to denote that additional arguments are optional; it does not take a default value. <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod_formals3) { function( "norm", &norm, List::create( _["x"], _["..."] ), "documentation for norm"); } @ <>= norm <- mod$norm args( norm ) @ \subsection{Exposing \proglang{C++} classes using Rcpp modules} Rcpp modules also provide a mechanism for exposing \proglang{C++} classes, based on the reference classes introduced in R 2.12.0. \subsubsection{Initial example} A class is exposed using the \texttt{class\_} keyword. The \texttt{Uniform} class may be exposed to \proglang{R} as follows: <>= using namespace Rcpp; class Uniform { public: Uniform(double min_, double max_) : min(min_), max(max_) {} NumericVector draw(int n) const { RNGScope scope; return runif( n, min, max ); } double min, max; }; double uniformRange( Uniform* w) { return w->max - w->min; } RCPP_MODULE(unif_module) { class_( "Uniform" ) .constructor() .field( "min", &Uniform::min ) .field( "max", &Uniform::max ) .method( "draw", &Uniform::draw ) .method( "range", &uniformRange ) ; } @ <>= ## assumes fx_unif <- cxxfunction(...) has ben run unif_module <- Module( "unif_module", getDynLib(fx_unif ) ) Uniform <- unif_module$Uniform u <- new( Uniform, 0, 10 ) u$draw( 10L ) u$range() u$max <- 1 u$range() u$draw( 10 ) @ \texttt{class\_} is templated by the \proglang{C++} class or struct that is to be exposed to \proglang{R}. The parameter of the \texttt{class\_} constructor is the name we will use on the \proglang{R} side. It usually makes sense to use the same name as the class name. While this is not enforced, it might be useful when exposing a class generated from a template. Then constructors, fields and methods are exposed. \subsubsection{Exposing constructors using Rcpp modules} Public constructors that take from 0 and 6 parameters can be exposed to the R level using the \texttt{.constuctor} template method of \texttt{.class\_}. Optionally, \texttt{.constructor} can take a description as the first argument. <>= .constructor("sets the min and max value of the distribution") @ Also, the second argument can be a function pointer (called validator) matching the following type : <>= typedef bool (*ValidConstructor)(SEXP*,int); @ The validator can be used to implement dispatch to the appropriate constructor, when multiple constructors taking the same number of arguments are exposed. The default validator always accepts the constructor as valid if it is passed the appropriate number of arguments. For example, with the call above, the default validator accepts any call from R with two \texttt{double} arguments (or arguments that can be cast to \texttt{double}). TODO: include validator example here \subsubsection{Exposing fields and properties} \texttt{class\_} has three ways to expose fields and properties, as illustrated in the example below : <>= using namespace Rcpp; class Foo { public: Foo(double x_, double y_, double z_ ): x(x_), y(y_), z(z_) {} double x; double y; double get_z() { return z; } void set_z( double z_ ) { z = z_; } private: double z; }; RCPP_MODULE(mod_foo) { class_( "Foo" ) .constructor() .field( "x", &Foo::x ) .field_readonly( "y", &Foo::y ) .property( "z", &Foo::get_z, &Foo::set_z ) ; } @ The \texttt{.field} method exposes a public field with read/write access from R. \texttt{field} accepts an extra parameter to give a short description of the field: <>= .field( "x", &Foo::x, "documentation for x" ) @ The \texttt{.field\_readonly} exposes a public field with read-only access from R. It also accepts the description of the field. <>= .field_readonly( "y", &Foo::y, "documentation for y" ) @ The \texttt{.property} method allows indirect access to fields through a getter and a setter. The setter is optional, and the property is considered read-only if the setter is not supplied. A description of the property is also allowed: <>= // with getter and setter .property( "z", &Foo::get_z, &Foo::set_z, "Documentation for z" ) // with only getter .property( "z", &Foo::get_z, "Documentation for z" ) @ The type of the field (\textbf{T}) is deduced from the return type of the getter, and if a setter is given its unique parameter should be of the same type. Getters can be member functions taking no parameter and returning a \textbf{T} (for example \texttt{get\_z} above), or a free function taking a pointer to the exposed class and returning a \textbf{T}, for example: <>= double z_get( Foo* foo ) { return foo->get_z(); } @ Setters can be either a member function taking a \texttt{T} and returning void, such as \texttt{set\_z} above, or a free function taking a pointer to the target class and a \textbf{T} : <>= void z_set( Foo* foo, double z ) { foo->set_z(z); } @ Using properties gives more flexibility in case field access has to be tracked or has impact on other fields. For example, this class keeps track of how many times the \texttt{x} field is read and written. <>= class Bar { public: Bar(double x_) : x(x_), nread(0), nwrite(0) {} double get_x( ) { nread++; return x; } void set_x( double x_) { nwrite++; x = x_; } IntegerVector stats() const { return IntegerVector::create(_["read"] = nread, _["write"] = nwrite); } private: double x; int nread, nwrite; }; RCPP_MODULE(mod_bar) { class_( "Bar" ) .constructor() .property( "x", &Bar::get_x, &Bar::set_x ) .method( "stats", &Bar::stats ) ; } @ Here is a simple usage example: <>= Bar <- mod_bar$Bar b <- new( Bar, 10 ) b$x + b$x b$stats() b$x <- 10 b$stats() @ \subsubsection{Exposing methods using Rcpp modules} \texttt{class\_} has several overloaded and templated \texttt{.method} functions allowing the programmer to expose a method associated with the class. A legitimate method to be exposed by \texttt{.method} can be: \begin{itemize} \item A public member function of the class, either const or non const, that returns void or any type that can be handled by \texttt{Rcpp::wrap}, and that takes between 0 and 65 parameters whose types can be handled by \texttt{Rcpp::as}. \item A free function that takes a pointer to the target class as its first parameter, followed by 0 or more (up to 65) parameters that can be handled by \texttt{Rcpp::as} and returning a type that can be handled by \texttt{Rcpp::wrap} or void. \end{itemize} \paragraph{Documenting methods} \texttt{.method} can also include a short documentation of the method, after the method (or free function) pointer. <>= .method("stats", &Bar::stats, "vector indicating the number of times x has been read and written" ) @ TODO: mention overloading, need good example. \paragraph{Const and non-const member functions} \texttt{method} is able to expose both \texttt{const} and \texttt{non const} member functions of a class. There are however situations where a class defines two versions of the same method, differing only in their signature by the \texttt{const}-ness. It is for example the case of the member functions \texttt{back} of the \texttt{std::vector} template from the STL. <>= reference back ( ); const_reference back ( ) const; @ To resolve the ambiguity, it is possible to use \texttt{const\_method} or \texttt{nonconst\_method} instead of \texttt{method} in order to restrict the candidate methods. \paragraph{Special methods} \pkg{Rcpp} considers the methods \texttt{[[} and \texttt{[[<-} special, and promotes them to indexing methods on the \proglang{R} side. \subsubsection{Object finalizers} The \texttt{.finalizer} member function of \texttt{class\_} can be used to register a finalizer. A finalizer is a free function that takes a pointer to the target class and return \texttt{void}. The finalizer is called before the destructor and so operates on a valid object of the target class. It can be used to perform operations, releasing resources, etc ... The finalizer is called automatically when the \proglang{R} object that encapsulates the \proglang{C++} object is garbage collected. \subsubsection{S4 dispatch} When a \proglang{C++} class is exposed by the \texttt{class\_} template, a new S4 class is registered as well. The name of the S4 class is obfuscated in order to avoid name clashes (i.e. two modules exposing the same class). This allows implementation of \proglang{R}-level (S4) dispatch. For example, one might implement the \texttt{show} method for \proglang{C++} \texttt{World} objects: <>= setMethod( "show", yada$World , function(object) { msg <- paste( "World object with message : ", object$greet() ) writeLines( msg ) } ) @ TODO: mention R inheritance (John ?) \subsubsection{Full example} % TODO: maybe replace this by something from wls or RcppModels ? The following example illustrates how to use Rcpp modules to expose the class \texttt{std::vector} from the STL. <>= typedef std::vector vec; // convenience typedef void vec_assign( vec* obj, Rcpp::NumericVector data ) { // helpers obj->assign( data.begin(), data.end() ); } void vec_insert( vec* obj, int position, Rcpp::NumericVector data) { vec::iterator it = obj->begin() + position; obj->insert( it, data.begin(), data.end() ); } Rcpp::NumericVector vec_asR( vec* obj ) { return Rcpp::wrap( *obj ); } void vec_set( vec* obj, int i, double value ) { obj->at( i ) = value; } RCPP_MODULE(mod_vec) { using namespace Rcpp; // we expose the class std::vector as "vec" on the R side class_( "vec") // exposing constructors .constructor() .constructor() // exposing member functions .method( "size", &vec::size) .method( "max_size", &vec::max_size) .method( "resize", &vec::resize) .method( "capacity", &vec::capacity) .method( "empty", &vec::empty) .method( "reserve", &vec::reserve) .method( "push_back", &vec::push_back ) .method( "pop_back", &vec::pop_back ) .method( "clear", &vec::clear ) // specifically exposing const member functions .const_method( "back", &vec::back ) .const_method( "front", &vec::front ) .const_method( "at", &vec::at ) // exposing free functions taking a std::vector* // as their first argument .method( "assign", &vec_assign ) .method( "insert", &vec_insert ) .method( "as.vector", &vec_asR ) // special methods for indexing .const_method( "[[", &vec::at ) .method( "[[<-", &vec_set ) ; } @ <>= ## for code compiled on the fly using cxxfunction() into 'fx_vec', we use mod_vec <- Module( "mod_vec", getDynLib(fx_vec), mustStart = TRUE ) vec <- mod_vec$vec ## and that is not needed in a package setup as e.g. one created ## via Rcpp.package.skeleton(..., module=TRUE) v <- new( vec ) v$reserve( 50L ) v$assign( 1:10 ) v$push_back( 10 ) v$size() v$capacity() v[[ 0L ]] v$as.vector() @ \section{Using modules in other packages} \label{sec:package} \subsection{Namespace import/export} \subsubsection{Import all functions and classes} When using \pkg{Rcpp} modules in a packages, the client package needs to import \pkg{Rcpp}'s namespace. This is achieved by adding the following line to the \texttt{NAMESPACE} file. <>= options( prompt = " ", continue = " " ) @ <>= import( Rcpp ) @ The simplest way to load all functions and classes from a module directly into a package namespace is to use the \code{loadRcppModules} function within the \code{.onLoad} body. <>= .onLoad <- function(libname, pkgname) { loadRcppModules() } @ This will look in the package's DESCRIPTION file for the \texttt{RcppModules} field, load each declared module and populate their contents into the package's namespace. For example, both the \pkg{testRcppModule} package (which is part of large unit test suite for \pkg{Rcpp}) and the package created via \code{Rcpp.package.skeleton("somename", module=TRUE)} have this declaration: \begin{verbatim} RcppModules: yada, stdVector, NumEx \end{verbatim} The \code{loadRcppModules} function has a single argument \texttt{direct} with a default value of \texttt{TRUE}. With this default value, all content from the module is exposed directly in the package namespace. If set to \texttt{FALSE}, all content is exposed as components of the module. Starting with release 0.9.11, an alternative is provided by the \code{loadModule()} function which takes the module name as an argument. It can be placed in any \code{.R} file in the package. This is useful as it allows to load the module from the same file as some auxiliary \proglang{R} functions using the module. For the example module, the equivalent code to the \code{.onLoad()} use shown above then becomes <>= loadModule("yada") loadModule("stdVector") loadModule("NumEx") @ This feature is also used in the new Rcpp Classes introduced with Rcpp 0.9.11. \subsubsection{Just expose the module} Alternatively, it is possible to just expose the module to the user of the package, and let them extract the functions and classes as needed. This uses lazy loading so that the module is only loaded the first time the user attempts to extract a function or a class with the dollar extractor. <>= yada <- Module( "yada" ) .onLoad <- function(libname, pkgname) { # placeholder } @ <>= options( prompt = "> ", continue = "+ " ) @ \subsection{Support for modules in skeleton generator} The \code{Rcpp.package.skeleton} function has been improved to help \pkg{Rcpp} modules. When the \texttt{module} argument is set to \texttt{TRUE}, the skeleton generator installs code that uses a simple module. <>= Rcpp.package.skeleton( "testmod", module = TRUE ) @ Creating a new package using \textsl{Rcpp modules} is easiest via the call to \code{Rcpp.package.skeleton()} with argument \code{module=TRUE} as a working package with three example Modules results. \subsection{Module documentation} \pkg{Rcpp} defines a \code{prompt} method for the \code{Module} class, allowing generation of a skeleton of an Rd file containing some information about the module. <>= yada <- Module( "yada" ) prompt( yada, "yada-module.Rd" ) @ We strongly recommend using a package when working with Modules. But in case a manually compiled shared library has to loaded, the return argument of the \texttt{getDynLib()} function can be supplied as the \texttt{PACKAGE} argument to the \texttt{Module()} function as well. \section{Future extensions} \label{sec:future} \texttt{Boost.Python} has many more features that we would like to port to Rcpp modules : class inheritance, default arguments, enum types, ... \section{Known shortcomings} \label{sec:misfeatures} There are some things \textsl{Rcpp modules} is not good at: \begin{itemize} \item serialization and deserialization of objects: modules are implemented via an external pointer using a memory location, which is non-constant and varies between session. Objects have to be re-created, which is different from the (de-)serialization that R offers. So these objects cannot be save from session to session. \item mulitple inheritance: currently, only simple class structures are representable via \textsl{Rcpp modules}. \end{itemize} \section{Summary} This note introduced \textsl{Rcpp modules} and illustrated how to expose \proglang{C++} function and classes more easily to \proglang{R}. We hope that \proglang{R} and \proglang{C++} programmers find \textsl{Rcpp modules} useful. \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/vignettes/Rcpp.bib0000644000000000000000000004667412273230413013033 0ustar @String{CRAN = "http://CRAN.R-Project.org/" } @String{manuals = CRAN # "doc/manuals/" } @String{RCoreTeam = "{R Development Core Team}" } @String{RFoundation = "R Foundation for Statistical Computing" } @String{R-Forge = "http://R-Forge.R-Project.org/" } @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 = "http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372", urlansi = "http://webstore.ansi.org/RecordDetail.aspx?sku=ISO/IEC%2014882:2011" } @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 = "http://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} } @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 = {http://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 = {http://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 = {http://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 = {http://www.icce.rug.nl/documents/cplusplus/} } @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: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} } @Manual{CRAN:RInside, title = {RInside: C++ classes to embed R in C++ applications}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, year = 2012, note = {R package version 0.2.10}, 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 = 2014, note = {R package version 0.4.0}, url = CRAN # "package=RProtoBuf" } @Manual{CRAN:RQuantLib, title = {RQuantLib: {R} interface to the {QuantLib} library}, author = {Dirk Eddelbuettel and Khanh Nguyen}, year = 2014, note = {R package version 0.3.11}, url = CRAN # "package=RQuantLib" } @Manual{CRAN:rbenchmark, title = {\pkg{rbenchmark}: Benchmarking routine for \proglang{R}}, author = {Wacek Kusnierczyk}, year = 2012, note = {R package version 1.0.0}, url = CRAN # "package=rbenchmark" } @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 = {http://www.jstatsoft.org/v40/i08/}, } @Manual{CRAN:Rcpp, title = {{Rcpp}: Seamless {R} and {C++} Integration}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois and JJ Allaire and John Chambers and Douglas Bates and Kevin Ushey}, year = 2014, note = {R package version 0.11.0}, 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 = 2013, 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 = 2014, 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 = 2014, 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 = {Romain Fran\c{c}ois and Dirk Eddelbuettel and Douglas Bates}, year = 2014, note = {R package version 0.4.000.2}, url = CRAN # "package=RcppArmadillo" } @Manual{CRAN:RcppClassic, title = {RcppClassic: Deprecated 'classic' Rcpp API}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, year = 2014, note = {R package version 0.9.5}, url = CRAN # "package=RcppClassic" } @Manual{CRAN:RcppDE, title = {RcppDE: Global optimization by differential evolution in C++}, author = {Dirk Eddelbuettel}, year = 2013, note = {R package version 0.1.2}, url = CRAN # "package=RcppDE" } @Manual{CRAN:RcppEigen, title = {RcppEigen: Rcpp integration for the Eigen templated linear algebra library}, author = {Douglas Bates and Romain Fran\c{c}ois and Dirk Eddelbuettel}, year = 2014, note = {{R} package version 0.3.2.0.2}, url = CRAN # "package=RcppEigen" } @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 = {http://www.jstatsoft.org/v52/i05/}, } @Manual{CRAN:RcppExamples, title = {RcppExamples: Examples using {Rcpp} to interface {R} and {C++}}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, year = 2013, note = {R package version 0.1.6}, url = CRAN # "package=RcppExamples" } @Manual{CRAN:RcppGSL, title = {RcppGSL: Rcpp integration for GNU GSL vectors and matrices}, author = {Romain Fran\c{c}ois and Dirk Eddelbuettel}, year = 2012, note = {R package version 0.2.0}, url = CRAN # "package=RcppGSL" } @Manual{CRAN:Rserve, title = {Rserve: Binary R server}, author = {Simon Urbanek}, year = 2013, note = {R package version 1.7-3}, 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:highlight, title = {highlight: Syntax highlighter}, author = {Romain Fran\c{c}ois}, year = 2013, note = {R package with version 0.4.4}, 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}, year = 2013, note = {R package version 0.3.13}, url = CRAN # "package=inline" } @Manual{CRAN:Matrix, title = {\pkg{Matrix}: Sparse and Dense Matrix Classes and Methods}, author = {Douglas Bates and Martin Maechler}, year = 2014, note = {R package version 1.1-2}, url = CRAN # "package=Matrix" } @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 = 2012, note = {R package version 1.2.2}, url = CRAN # "package=minqa" } @Manual{CRAN:roxygen2, title = {roxygen2: In-source documentation for R}, author = {Hadley Wickham and Peter Danenberg and Manuel Eugster}, year = 2014, note = {R package version 3.1.0}, url = CRAN # "package=roxygen2" } @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{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 = {http://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 = {http://dx.doi.org/10.1016/j.csda.2013.02.005} } ; see http://eigen.tuxfamily.org/index.php?title=BibTeX ; replaced 'howpublished' with 'url' and updated year to 2011, and again to 2012 @MISC{Eigen:Web, author = {Ga\"{e}l Guennebaud and Beno\^{i}t Jacob and others}, title = {Eigen v3}, year = 2012, url = {http://eigen.tuxfamily.org}, } @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} } @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 = {http://dx.doi.org/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}} @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 = {http://www.gnu.org/software/gsl} } @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 = {http://sphhp.buffalo.edu/biostat/research/techreports/UB_Biostatistics_TR0702.pdf}, month = {July}, year = 2007 } @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 } @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}, } @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{R:Administration, author = RCoreTeam, organization = RFoundation, address = {Vienna, Austria}, year = 2013, title = "R Installation and Administration", note = {{ISBN} 3-900051-09-7}, url = manuals # "R-admin.html" } @manual{R:Extensions, author = RCoreTeam, organization = RFoundation, address = {Vienna, Austria}, year = 2012, 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 = 2013, title = "R internals", annote = {{ISBN} 3-900051-14-3}, url = manuals # "R-ints.html" } @manual{R:Main, title = {R: A Language and Environment for Statistical Computing}, author = RCoreTeam, organization = RFoundation, address = {Vienna, Austria}, year = 2013, url = {http://www.R-project.org/}, } @manual{R:Language, author = RCoreTeam, organization = RFoundation, address = {Vienna, Austria}, year = 2013, title = "R language", annote = {{ISBN} 3-900051-13-5}, url = manuals # "R-lang.html" } @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} } @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" } @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 = "http://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{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{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 = {http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}, note = {{N2761=08-0271}} } @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 = {http://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}, } @misc{KDE-TechBase:2012, author = {KDE-TechBase}, title = {Binary Compatibility Issues With {C++}}, url = "http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++", year = 2012, note = "[Online; accessed 24-November-2012]" } rcpp-0.11.0/vignettes/Rcpp-FAQ.Rnw0000644000000000000000000011345612273027604013451 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-FAQ} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, FAQ} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color,alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} \newcommand{\code}[1]{\texttt{#1}} %% defined as a stop-gap measure til interaction with highlight is sorted out \newcommand{\hlboxlessthan}{ \hlnormalsizeboxlessthan} \newcommand{\hlboxgreaterthan}{\hlnormalsizeboxgreaterthan} \newcommand{\hlboxopenbrace}{ \hlnormalsizeboxopenbrace} \newcommand{\hlboxclosebrace}{ \hlnormalsizeboxclosebrace} \newcommand{\hlboxbacktick}{ \hlnormalsizeboxbacktick} \newcommand{\hlboxunderscore}{ \hlnormalsizeboxunderscore} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} \newcommand{\faq}[1]{FAQ~\ref{#1}} \newcommand{\rdoc}[2]{\href{http://www.rdocumentation.org/packages/#1/functions/#2}{\code{#2}}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") require(inline) require(highlight) @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{Frequently Asked Questions about \pkg{Rcpp}} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This document attempts to answer the most Frequently Asked Questions (FAQ) regarding the \pkg{Rcpp} \citep{CRAN:Rcpp,JSS:Rcpp,Eddelbuettel:2013:Rcpp} package. } \section{Getting started} \subsection{How do I get started ?} If you have \pkg{Rcpp} installed, please execute the following command in \proglang{R} to access the introductory vignette (which is a variant of the \citet{JSS:Rcpp} paper) for a detailed introduction: <>= vignette("Rcpp-introduction") @ If you do not have \pkg{Rcpp} installed, the document should also be available whereever you found this document, \textsl{i.e.,} on every mirror of CRAN site. \subsection{What do I need ?} Obviously, \proglang{R} must be installed. \pkg{Rcpp} provides a \proglang{C++} API as an extension to the \proglang{R} system. As such, it is bound by the choices made by \proglang{R} and is also influenced by how \proglang{R} is configured. In general, the standard environment for building a CRAN package from source (particularly when it contains \proglang{C} or \proglang{C++} code) is required. This means one needs: \begin{itemize} \item a development environment with a suitable compiler (see below), header files and required libraries; \item \proglang{R} should be built in a way that permits linking and possibly embedding of \proglang{R}; this is typically ensured by the \texttt{--enable-shared-lib} option; \item standard development tools such as \texttt{make} etc. \end{itemize} Also see the \href{http://www.rstudio.com/ide/docs/packages/prerequisites}{RStudio documentation} on pre-requisites for R package development. \subsection{What compiler can I use ?} On almost all platforms, the GNU Compiler Collection (or \texttt{gcc}, which is also the name of its \proglang{C} language compiler) has to be used along with the corresponding \texttt{g++} compiler for the \proglang{C++} language. A minimal suitable version is a final 4.2.* release; earlier 4.2.* were lacking some \proglang{C++} features (and even 4.2.1, still used on OS X, has issues). Generally speaking, and as of early 2011, the default compilers on all the common platforms are suitable. Specific per-platform notes: \begin{description} \item[Windows] users need the \texttt{Rtools} package from the site maintained by Duncan Murdoch which contains all the required tools in a single package; complete instructions specific to Windows are in the `R Administration' manual \citep[Appendix D]{R:Administration}. \item[OS X] users, as noted in the `R Administration' manual \citep[Appendix C.4]{R:Administration}, need to install the Apple Developer Tools (\textsl{e.g.}, \texttt{Xcode}) (as well as \texttt{gfortran} if \proglang{R} or Fortran-using packages are to be built); also see \faq{q:OSX} below. \item[Linux] user need to install the standard developement packages. Some distributions provide helper packages which pull in all the required packages; the \texttt{r-base-dev} package on Debian and Ubuntu is an example. \end{description} The \texttt{clang} and \texttt{clang++} compilers from the LLVM project can also be used as they are inter-operable with \texttt{gcc} et al. The \texttt{clang++} compiler is particularly interesting as it emits much more comprehensible error messages than \texttt{g++}. The Intel \texttt{icc} family has also been used successfully as its output files can also be combined with those from \texttt{gcc}. \subsection{What other packages are useful ?} Additional packages that we have found useful are \begin{description} \item[\pkg{inline}] which is invaluable for direct compilation, linking and loading of short code snippets---but now effectively superseded by the Rcpp Attributes (see \faq{using-attributes} and \faq{prototype-using-attributes}) feature provided by \pkg{Rcpp}; \item[\pkg{RUnit}] is used for unit testing; the package is recommended and will be needed to re-run some of our tests but it is not strictly required during use of \pkg{Rcpp}; \item[\pkg{rbenchmark}] to run simple timing comparisons and benchmarks; it is also recommended but not required. \item[\pkg{microbenchmark}] is an alternative for benchmarking. \item[\pkg{devtools}] can help the process of building, compiling and testing a package but it too is entirely optional. \end{description} \section{Compiling and Linking} \subsection{How do I use \pkg{Rcpp} in my package ?} \label{make-package} \pkg{Rcpp} has been specifically designed to be used by other packages. Making a package that uses \pkg{Rcpp} depends on the same mechanics that are involved in making any \proglang{R} package that use compiled code --- so reading the \textsl{Writing R Extensions} manual \citep{R:Extensions} is a required first step. Further steps, specific to \pkg{Rcpp}, are described in a separate vignette. <>= vignette("Rcpp-package") @ \subsection{How do I quickly prototype my code?} There are two toolchains which can help with this: \begin{itemize} \item The older one is provided by the \pkg{inline} package and described in Section~\ref{using-inline}. \item Starting with \pkg{Rcpp} 0.10.0, the Rcpp Attributes feature (described in Section~\ref{using-attributes}) offered an even easier alternative via the function \rdoc{Rcpp}{evalCpp}, \rdoc{Rcpp}{cppFunction} and \rdoc{Rcpp}{sourceCpp}. \end{itemize} The next two subsections show an example each. \subsubsection{Using inline} \label{using-inline} The \pkg{inline} package \citep{CRAN:inline} provides the functions \rdoc{inline}{cfunction} and \rdoc{inline}{cxxfunction}. Below is a simple function that uses \texttt{accumulate} from the (\proglang{C++}) Standard Template Library to sum the elements of a numeric vector. <<>>= fx <- cxxfunction(signature(x = "numeric"), 'NumericVector xx(x); return wrap(std::accumulate(xx.begin(), xx.end(), 0.0));', plugin = "Rcpp") res <- fx(seq(1, 10, by=0.5)) res <>= stopifnot(identical(res, sum(seq(1, 10, by=0.5)))) @ %\pkg{Rcpp} uses \pkg{inline} to power its entire unit test suite. Consult the %\texttt{unitTests} directory of \pkg{Rcpp} for several hundred further examples. % %< < eval=FALSE>>= % \list.files( system.file( "unitTests", package = "Rcpp" ), pattern = "^runit[.]" ) % @ One might want to use code that lives in a \proglang{C++} file instead of writing the code in a character string in R. This is easily achieved by using \rdoc{base}{readLines}: <>= fx <- cxxfunction(signature(), paste(readLines("myfile.cpp"), collapse="\n"), plugin = "Rcpp") @ The \texttt{verbose} argument of \rdoc{inline}{cxxfunction} is very useful as it shows how \pkg{inline} runs the show. \subsubsection{Using Rcpp Attributes} \label{using-attributes} Rcpp Attributes \citep{CRAN:Rcpp:Attributes}, and also discussed in \faq{prototype-using-attributes} below, permits an even easier route to integrating R and C++. It provides three key functions. First, \rdoc{Rcpp}{evalCpp} provide a means to evaluate simple C++ expression which is often useful for small tests, or to simply check if the toolchain is set up correctly. Second, \rdoc{Rcpp}{cppFunction} can be used to create C++ functions for R use on the fly. Third, \code{Rcpp}{sourceCpp} can integrate entire files in order to define multiple functions. The example above can now be rewritten as: <<>>= cppFunction('double accu(NumericVector x) { return(std::accumulate(x.begin(), x.end(), 0.0)); }') res <- accu(seq(1, 10, by=0.5)) res @ The \rdoc{Rcpp}{cppFunction} parses the supplied text, extracts the desired function names, creates the required scaffolding, compiles, links and loads the supplied code and makes it available under the selected identifier. Similarly, \rdoc{Rcpp}{sourceCpp} can read in a file and compile, link and load the code therein. \subsection{How do I convert my prototyped code to a package ?} \label{from-inline-to-package} Since release 0.3.5 of \pkg{inline}, one can combine \faq{using-inline} and \faq{make-package}. See \verb|help("package.skeleton-methods")| once \pkg{inline} is loaded and use the skeleton-generating functionality to transform a prototyped function into the minimal structure of a package. After that you can proceed with working on the package in the spirit of \faq{make-package}. Rcpp Attributes \citep{CRAN:Rcpp:Attributes} also offers a means to convert functions written using Rcpp Attributes into a function via the \rdoc{Rdoc}{compileAttributes} function; see the vignette for details. \subsection{How do I quickly prototype my code in a package?} \label{using-a-package} The simplest way may be to work directly with a package. Changes to both the \proglang{R} and \proglang{C++} code can be compiled and tested from the command line via: <>= $ R CMD INSTALL mypkg && Rscript --default-packages=mypkg -e 'someFunctionToTickle(3.14)' @ This first installs the packages, and then uses the command-line tool \rdoc{utils}{Rscript} (which ships with \code{R}) to load the package, and execute the \proglang{R} expression following the \code{-e} switch. Such an expression can contain multiple statements separated by semicolons. \rdoc{utils}{Rscript} is available on all three core operating systems. On Linux, one can also use \code{r} from the \code{littler} package by Horner and Eddelbuettel which is an alternative front end to \proglang{R} designed for both \verb|#!| (hashbang) scripting and command-line use. It has slightly faster start-up times than \rdoc{utils}{Rscript}; and both give a guaranteed clean slate as a new session is created. The example then becomes <>= $ R CMD INSTALL mypkg && r -l mypkg -e 'someFunctionToTickle(3.14)' @ The \code{-l} option calls 'suppressMessages(library(mypkg))' before executing the \proglang{R} expression. Several packages can be listed, separated by a comma. More choice are provide by the \pkg{devtools} package, and by using RStudio. See the respective documentation for details. \subsection{But I want to compile my code with R CMD SHLIB !} \label{using-r-cmd-shlib} The recommended way is to create a package and follow \faq{make-package}. The alternate recommendation is to use \pkg{inline} and follow \faq{using-inline} because it takes care of all the details. However, some people have shown that they prefer not to follow recommended guidelines and compile their code using the traditional \texttt{R CMD SHLIB}. To do so, we need to help \texttt{SHLIB} and let it know about the header files that \pkg{Rcpp} provides and the \proglang{C++} library the code must link against. On the Linux command-line, you can do the following:\newline <>= $ export PKG_LIBS=`Rscript -e "Rcpp:::LdFlags()"` # if Rcpp older than 0.11.0 $ export PKG_CXXFLAGS=`Rscript -e "Rcpp:::CxxFlags()"` $ R CMD SHLIB myfile.cpp @ which first defines and exports two relevant environment variables which \texttt{R CMD SHLIB} then relies on. On other operating systems, appropriate settings may have to be used to define the environment variables. This approach corresponds to the very earliest ways of building programs and can still be found in some deprecated documents (as \textit{e.g.} some of Dirk's older 'Intro to HPC with R' tutorial slides). It is still not recommended as there are tools and automation mechanisms that can do the work for you. \pkg{Rcpp} versions 0.11.0 or later can do with the definition of \code{PKG\_LIBS} as a user-facing library is no longer needed (and hence no longer shipped with the package). One still needs to set \code{PKG\_CXXFLAGS} to tell R where the \pkg{Rcpp} headers files are located. Once \code{R CMD SHLIB} has created the dyanmically-loadable file (with extension \code{.so} on Linux, \code{.dylib} on OS X or \code{.dll} on Windows), it can be loaded in an R session via \rdoc{base}{dyn.load}, and the function can be executed via \rdoc{base}{.Call}. Needless to say, we \emph{strongly} recommend using a package, or at least Rcpp Attributes as either approach takes care of a lot of these tedious and error-prone manual steps. \subsection{But R CMD SHLIB still does not work !} We have had reports in the past where build failures occurred when users had non-standard code in their \verb|~/.Rprofile| or \texttt{Rprofile.site} (or equivalent) files. If such code emits text on \texttt{stdout}, the frequent and implicit invocation of \texttt{Rscript -e "..."} (as in \faq{using-r-cmd-shlib} above) to retrieve settings directly from \pkg{Rcpp} will fail. You may need to uncomment such non-standard code, or protect it by wrapping it inside \texttt{if (interactive())}, or possibly try to use \texttt{Rscript --vanilla} instead of plain \texttt{Rscript}. \subsection{What about \texttt{LinkingTo} ?} \proglang{R} has only limited support for cross-package linkage. We now employ the \texttt{LinkingTo} field of the \texttt{DESCRIPTION} file of packages using \pkg{Rcpp}. But this only helps in having \proglang{R} compute the location of the header files for us. The actual library location and argument still needs to be provided by the user. How to do so has been shown above, and we recommned you use either \faq{make-package} or \faq{using-inline} both which use the \pkg{Rcpp} function \texttt{Rcpp:::LdFlags()}. If and when \texttt{LinkingTo} changes and lives up to its name, we will be sure to adapt \pkg{Rcpp} as well. An important change arrive with \pkg{Rcpp} release 0.11.0 and concern the automatic registration of functions; see Section~\ref{function-registration} below. \subsection{Does \pkg{Rcpp} work on windows ?} Yes of course. See the Windows binaries provided by CRAN. \subsection{Can I use \pkg{Rcpp} with Visual Studio ?} Not a chance. And that is not because we are meanies but because \proglang{R} and Visual Studio simply do not get along. As \pkg{Rcpp} is all about extending \proglang{R} with \proglang{C++} interfaces, we are bound by the available toolchain. And \proglang{R} simply does not compile with Visual Studio. Go complain to its vendor if you are still upset. \subsection{I am having problems building Rcpp on OS X, any help ?} \label{q:OSX} OS X used to be a little more conservative with compiler versions as Apple stuck with gcc-4.2. Following the 'Mavericks' release, it is the opposite as only llvm is provide in Xcode---while the R build provided by CRAN still has hardwired settings for the gcc/g++ combination. Until that is resolved, users either need to create softlinks (say, in, \code{/usr/local/bin}) or override the \code{CC} and \code{CXX} variables via a file \code{~/.R/Makevars} or its system-equivalent in R's \code{etc/} directory. See the \code{r-sig-mac} mailing for further details. Compilation from source is recommended. %At the time of writing this paragraph (in the spring of 2011), \pkg{Rcpp} %(just like CRAN) supports all OS X releases greater or equal to 10.5. %However, building \pkg{Rcpp} from source (or building packages using %\pkg{Rcpp}) also requires a recent-enough version of Xcode. For the %\textsl{Leopard} release of OS X, the current version is 3.1.4 which can be %downloaded free of charge from the Apple Developer site. Users may have to %manually select \code{g++-4.2} via the symbolic link \code{/usr/bin/g++}. %The \textsl{Snow Leopard} release already comes with Xcode 3.2.x and work as %is. \subsection{Does \pkg{Rcpp} work on solaris/suncc ?} Yes, it generally does. But as we do not have access to such systems, some issues persist on the CRAN test systems. \subsection{Does \pkg{Rcpp} work with Revolution R ?} We have not tested it yet. \pkg{Rcpp} might need a few tweaks to work with the compilers used by Revolution R (if those differ from the defaults). \subsection{Is it related to CXXR ?} CXXR is an ambitious project that aims to totally refactor the \proglang{R} interpreter in \proglang{C++}. There are a few similaritites with \pkg{Rcpp} but the projects are unrelated. CXXR and \pkg{Rcpp} both want \proglang{R} to make more use of \proglang{C++} but they do it in very different ways. \subsection{How do I quickly prototype my code using Attributes?} \label{prototype-using-attributes} \pkg{Rcpp} version 0.10.0 and later offer a new feature 'Rcpp Attributes' which is described in detail in its own vignette \citep{CRAN:Rcpp:Attributes}. In short, it offers functions \rdoc{Rcpp}{evalCpp}, \rdoc{Rcpp}{cppFunction} and \rdoc{Rcpp}{sourceCpp} which extend the functionality of the \rdoc{Rcpp}{cxxfunction} function. \subsection{What about the new 'no-linking' feature??} \label{function-registration} Starting with \pkg{Rcpp} 0.11.0, functionality provided by \pkg{Rcpp} and used by packages built with \pkg{Rcpp} accessed via the registration facility offered by R (and which is used by \pkg{lme4} and \pkg{Matrix}, as well as by \pkg{xts} and \pkg{zoo}). This requires no effort from the user / programmer, and even frees us from explicit linking instruction. In most cases, the files \code{src/Makevars} and \code{src/Makevars.win} can now be removed. Exceptions are the use of \pkg{RcppArmadillo} (which needs an entry \verb|PKG_LIBS=$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)|) and packages linking to external libraries they use. But for most packages using \pkg{Rcpp}, only two things are required: \begin{itemize} \item an entry in \code{DESCRIPTION} such as \code{Imports: Rcpp} (which may be versioned as in \code{Imports: Rcpp (>= 0.11.0)}), and \item an entry in \code{NAMESPACE} to ensure \pkg{Rcpp} is correctly instantiated, for example \code{importFrom(Rcpp, evalCpp)}. \end{itemize} The name of the symbol does really matter; once one symbol is important all should be available. \section{Examples} The following questions were asked on the \href{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel}{Rcpp-devel} mailing list, which is our preferred place to ask questions as it guarantees exposure to a number of advanced Rcpp users. The \href{http://stackoverflow.com/questions/tagged/rcpp}{StackOverflow tag for rcpp} is an alternative; that site is also easily searchable. Several dozen fully documented examples are provided at the \href{http://gallery.rcpp.org}{Rcpp Gallery} -- which is also open for new contributions. \subsection{Can I use templates with \pkg{Rcpp} ? } \begin{quote} \emph{I'm curious whether one can provide a class definition inline in an R script and then initialize an instance of the class and call a method on the class, all inline in R.} \end{quote} This question was initially about using templates with \pkg{inline}, and we show that (older) answer first. It is also easy with Rcpp Attributes which is what we show below. \subsubsection{Using inline} \noindent Most certainly, consider this simple example of a templated class which squares its argument: <>= inc <- 'template class square : public std::unary_function { public: T operator()( T t) const { return t*t ;} }; ' src <- ' double x = Rcpp::as(xs); int i = Rcpp::as(is); square sqdbl; square sqint; return Rcpp::DataFrame::create(Rcpp::Named("x", sqdbl(x)), Rcpp::Named("i", sqint(i))); ' fun <- cxxfunction(signature(xs="numeric", is="integer"), body=src, include=inc, plugin="Rcpp") fun(2.2, 3L) @ \subsubsection{Using Rcpp Attributes} We can also use 'Rcpp Attributes' \citep{CRAN:Rcpp:Attributes}---as described in \faq{using-attributes} and \faq{prototype-using-attributes} above. Simply place the following code into a file and use \rdoc{Rcpp}{sourceCpp} on it. It will even run the R part at the end. <>= #include template class square : public std::unary_function { public: T operator()( T t) const { return t*t ;} }; // [[Rcpp::export]] Rcpp::DataFrame fun(double x, int i) { square sqdbl; square sqint; return Rcpp::DataFrame::create(Rcpp::Named("x", sqdbl(x)), Rcpp::Named("i", sqint(i))); } /*** R fun(2.2, 3L) */ @ \subsection{Can I do matrix algebra with \pkg{Rcpp} ?} \label{matrix-algebra} \begin{quote} \emph{\pkg{Rcpp} allows element-wise operations on vector and matrices through operator overloading and STL interface, but what if I want to multiply a matrix by a vector, etc ...} \end{quote} \noindent Currently, \pkg{Rcpp} does not provide binary operators to allow operations involving entire objects. Adding operators to \pkg{Rcpp} would be a major project (if done right) involving advanced techniques such as expression templates. We currently do not plan to go in this direction, but we would welcome external help. Please send us a design document. However, we have developed the \pkg{RcppArmadillo} package \citep{CRAN:RcppArmadillo,Eddelbuettel+Sanderson:2014:RcppArmadillo} that provides a bridge between \pkg{Rcpp} and \pkg{Armadillo} \citep{Sanderson:2010:Armadillo}. \pkg{Armadillo} supports binary operators on its types in a way that takes full advantage of expression templates to remove temporaries and allow chaining of operations. That is a mouthful of words meaning that it makes the code go faster by using fiendishly clever ways available via the so-called template meta programming, an advanced \proglang{C++} technique. Also, the \pkg{RcppEigen} package \citep{JSS:RcppEigen} provides an alternative using the \href{http://eigen.tuxfamily.org}{Eigen} template library. \subsubsection{Using inline} The following example is adapted from the examples available at the project page of Armadillo. It calculates $ x' \times Y^{-1} \times z$ <>= // copy the data to armadillo structures arma::colvec x = Rcpp::as (x_); arma::mat Y = Rcpp::as(Y_) ; arma::colvec z = Rcpp::as(z_) ; // calculate the result double result = arma::as_scalar(arma::trans(x) * arma::inv(Y) * z); // return it to R return Rcpp::wrap( result ); @ %% Running this now makes the package depend on RcppArmadillo being installed %% and would require at least a Suggests If stored in a file \code{myfile.cpp}, we can use it via \pkg{inline}: <>= fx <- cxxfunction(signature(x_="numeric", Y_="matrix", z_="numeric" ), paste(readLines("myfile.cpp"), collapse="\n"), plugin="RcppArmadillo" ) fx(1:4, diag(4), 1:4) @ <>= unlink("myfile.cpp") @ The focus is on the code \verb|arma::trans(x) * arma::inv(Y) * z|, which performs the same operation as the R code \verb|t(x) %*% solve(Y) %*% z|, although Armadillo turns it into only one operation, which makes it quite fast. Armadillo benchmarks against other \proglang{C++} matrix algebra libraries are provided on \href{http://arma.sourceforge.net/speed.html}{the Armadillo website}. It should be noted that code below depends on the version \texttt{0.3.5} of \pkg{inline} and the version \texttt{0.2.2} of \pkg{RcppArmadillo} \subsubsection{Using Rcpp Attributes} We can also write the same example for use with Rcpp Attributes: <>= #include // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] double fx(arma::colvec x, arma::mat Y, arma::colvec z) { // calculate the result double result = arma::as_scalar(arma::trans(x) * arma::inv(Y) * z); return result; } /*** R fx(1:4, diag(4), 1:4) */ @ Here, the additional \code{Rcpp::depends(RcppArmadillo)} ensures that code can be compiled against the \pkg{RcppArmadillo} header, and that the correct libraries are linked to the function built from the supplied code example. Note how we do not have to concern ourselves with conversion; R object automatically become (Rcpp)Armadillo objects and we can focus on the single computing a (scalar) result. \subsection{Can I use code from the Rmath header and library with \pkg{Rcpp} ?} \begin{quote} \emph{Can I call functions defined in the Rmath header file and the standalone math library for R--as for example the random number generators?} \end{quote} \noindent Yes, of course. This math library exports a subset of R, but \pkg{Rcpp} has access to much more. Here is another simple example. Note how we have to use and instance of the \texttt{RNGScope} class to set and re-set the random-number generator. This also illustrates Rcpp sugar as we are using a vectorised call to \texttt{rnorm}. Moreover, because the RNG is reset, the two calls result in the same random draws. If we wanted to control the draws, we could explicitly set the seed after the \texttt{RNGScope} object has been instantiated. <<>>= fx <- cxxfunction(signature(), 'RNGScope(); return rnorm(5, 0, 100);', plugin="Rcpp") set.seed(42) fx() fx() @ Newer versions of Rcpp also provide the actual Rmath function in the \code{R} namespace, \textsl{i.e.} as \code{R::rnorm(m,s)} to obtain a scalar random variable distributed as $N(m,s)$. Using Rcpp Attributes, this can be as simple as <<>>= cppFunction('Rcpp::NumericVector ff(int n) { return rnorm(n, 0, 100); }') set.seed(42) ff(5) ff(5) set.seed(42) rnorm(5, 0, 100) rnorm(5, 0, 100) @ This illustrates the Rcpp Attributes adds the required \code{RNGScope} object for us. It also shows how setting the seed from R affects draws done via C++ as well as R, and that identical random number draws are obtained. \subsection{Can I use NA and Inf with \pkg{Rcpp} ?} \begin{quote} \emph{R knows about NA and Inf. How do I use them from C++?} \end{quote} \noindent Yes, see the following example: <<>>= src <- 'Rcpp::NumericVector v(4); v[0] = R_NegInf; // -Inf v[1] = NA_REAL; // NA v[2] = R_PosInf; // Inf v[3] = 42; // see the Hitchhiker Guide return Rcpp::wrap(v);' fun <- cxxfunction(signature(), src, plugin="Rcpp") fun() @ Similarly, for Rcpp Attributes: <>= #include // [[Rcpp::export]] Rcpp::NumericVector fun(void) { Rcpp::NumericVector v(4); v[0] = R_NegInf; // -Inf v[1] = NA_REAL; // NA v[2] = R_PosInf; // Inf v[3] = 42; // see the Hitchhiker Guide return v; } @ \subsection{Can I easily multiply matrices ?} \begin{quote} \emph{Can I multiply matrices easily?} \end{quote} \noindent Yes, via the \pkg{RcppArmadillo} package which builds upon \pkg{Rcpp} and the wonderful Armadillo library described above in \faq{matrix-algebra}: <>= txt <- 'arma::mat Am = Rcpp::as< arma::mat >(A); arma::mat Bm = Rcpp::as< arma::mat >(B); return Rcpp::wrap( Am * Bm );' mmult <- cxxfunction(signature(A="numeric", B="numeric"), body=txt, plugin="RcppArmadillo") A <- matrix(1:9, 3, 3) B <- matrix(9:1, 3, 3) C <- mmult(A, B) @ % < < echo=FALSE,print=FALSE > > = % A <- matrix(1:9, 3, 3) % B <- matrix(9:1, 3, 3) % A %*% B % @ Armadillo supports a full range of common linear algebra operations. The \pkg{RcppEigen} package provides an alternative using the \href{http://eigen.tuxfamily.org}{Eigen} template library. Rcpp Attributes, once again, makes this even easier: <>= #include // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] arma::mat mult(arma::mat A, arma::mat B) { return A*B; } /*** R A <- matrix(1:9, 3, 3) B <- matrix(9:1, 3, 3) mult(A,B) */ @ which can be built, and run, from R via a simple \rdoc{Rcpp}{sourceCpp} call---and will also run the small R example at the end. \subsection{How do I write a plugin for \pkg{inline} and/or Rcpp Attributes?} \begin{quote} \emph{How can I create my own plugin for use by the \pkg{inline} package?} \end{quote} \noindent Here is an example which shows how to it using GSL libraries as an example. This is merely for demonstration, it is also not perfectly general as we do not detect locations first---but it serves as an example: <>= ## simple example of seeding RNG and drawing one random number gslrng <- ' int seed = Rcpp::as(par) ; gsl_rng_env_setup(); gsl_rng *r = gsl_rng_alloc (gsl_rng_default); gsl_rng_set (r, (unsigned long) seed); double v = gsl_rng_get (r); gsl_rng_free(r); return Rcpp::wrap(v);' plug <- Rcpp:::Rcpp.plugin.maker( include.before = "#include ", libs = paste("-L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp", "-Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib", "-L/usr/lib -lgsl -lgslcblas -lm")) registerPlugin("gslDemo", plug ) fun <- cxxfunction(signature(par="numeric"), gslrng, plugin="gslDemo") fun(0) @ % Here the \pkg{Rcpp} function \code{Rcpp.plugin.maker} is used to create a plugin 'plug' which is then registered, and subsequently used by \pkg{inline}. The same plugins can be used by Rcpp Attributes as well. \subsection{How can I pass one additional flag to the compiler?} \begin{quote} \emph{How can I pass another flag to the \code{g++} compiler without writing a new plugin?} \end{quote} The quickest way is to modify the return value from an existing plugin. Here we use the default one from \pkg{Rcpp} itself in order to pass the new flag \verb|-std=c++0x|. As it does not set the \verb|PKG_CXXFLAGS| variable, we simply assign this. For other plugins, one may need to append to the existing values instead. <>= myplugin <- getPlugin("Rcpp") myplugin$env$PKG_CXXFLAGS <- "-std=c++11" f <- cxxfunction(signature(), settings=myplugin, body=' + std::vector x = { 1.0, 2.0, 3.0 }; // fails without -std=c++0x + return Rcpp::wrap(x); + ') f() @ For Rcpp Attributes, the attributes \code{Rcpp::plugin()} can be used. Currently supported plugins are for C++11 as well as for OpenMP. \subsection{How can I set matrix row and column names ?} \begin{quote} \emph{Ok, I can create a matrix, but how do I set its row and columns names?} \end{quote} Pretty much the same way as in \proglang{R} itself: We define a list with two character vectors, one each for row and column names, and assign this to the \code{dimnames} attribute: <>= src <- ' Rcpp::NumericMatrix x(2,2); x.fill(42); // or more interesting values Rcpp::List dimnms = // two vec. with static names Rcpp::List::create(Rcpp::CharacterVector::create("cc", "dd"), Rcpp::CharacterVector::create("ee", "ff")); // and assign it x.attr("dimnames") = dimnms; return(x); ' fun <- cxxfunction(signature(), body=src, plugin="Rcpp") fun() @ % The same logic, but used with Rcpp Attributes: <>= #include // [[Rcpp::export]] Rcpp::List fun(void) { Rcpp::NumericMatrix x(2,2); x.fill(42); // or more interesting values Rcpp::List dimnms = // two vec. with static names Rcpp::List::create(Rcpp::CharacterVector::create("cc", "dd"), Rcpp::CharacterVector::create("ee", "ff")); // and assign it x.attr("dimnames") = dimnms; return(x); } @ \subsection{Why can long long types not be cast correctly?} That is a good and open question. We rely on the basic \proglang{R} types, notably \code{integer} and \code{numeric}. These can be cast to and from \proglang{C++} types without problems. But there are corner cases. The following example, contributed by a user, shows that we cannot reliably cast \code{long} types (on a 64-bit machines). <>= BigInts <- cxxfunction(signature(), 'std::vector bigints; bigints.push_back(12345678901234567LL); bigints.push_back(12345678901234568LL); Rprintf("Difference of %ld\\n", 12345678901234568LL - 12345678901234567LL); return wrap(bigints);', plugin="Rcpp", includes="#include ") retval<-BigInts() # Unique 64-bit integers were cast to identical lower precision numerics # behind my back with no warnings or errors whatsoever. Error. stopifnot(length(unique(retval)) == 2) @ % While the difference of one is evident at the \proglang{C++} level, it is no longer present once cast to \proglang{R}. The 64-bit integer values get cast to a floating point types with a 53-bit mantissa. We do not have a good suggestion or fix for casting 64-bit integer values: 32-bit integer values fit into \code{integer} types, up to 53 bit precision fits into \code{numeric} and beyond that truly large integers may have to converted (rather crudely) to text and re-parsed. Using a different representation as for example from the \href{http://gmplib.org/}{GNU Multiple Precision Arithmetic Library} may be an alternative. \section{Support} \subsection{Is the API documented ?} You bet. We use \proglang{doxygen} to generate html, latex and man page documentation from the source. The html documentation is available for \href{http://dirk.eddelbuettel.com/code/rcpp/html/index.html}{browsing}, as a \href{http://dirk.eddelbuettel.com/code/rcpp/Rcpp_refman.pdf}{very large pdf file}, and all three formats are also available a zip-archives: \href{http://dirk.eddelbuettel.com/code/rcpp/rcpp-doc-html.zip}{html}, \href{http://dirk.eddelbuettel.com/code/rcpp/rcpp-doc-latex.zip}{latex}, and \href{http://dirk.eddelbuettel.com/code/rcpp/rcpp-doc-man.zip}{man}. \subsection{Does it really work ?} We take quality seriously and have developped an extensive unit test suite to cover many possible uses of the \pkg{Rcpp} API. We are always on the look for more coverage in our testing. Please let us know if something has not been tested enough. \subsection{Where can I ask further questions ?} The \href{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel}{Rcpp-devel} mailing list hosted at R-forge is by far the best place. You may also want to look at the list archives to see if your question has been asked before. You can also use \href{http://stackoverflow.com/questions/tagged/rcpp}{Stack Overflow via its 'rcpp' tag}. \subsection{Where can I read old questions and answers ?} The normal \href{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel}{Rcpp-devel} mailing list hosting at R-forge contains an archive, which can be \href{http://lists.r-forge.r-project.org/mailman/swish.cgi?query=listname=rcpp-devel}{searched via swish}. Alternatively, one can also use \href{http://thread.gmane.org/gmane.comp.lang.r.rcpp/}{Gmane on Rcpp-devel} as well as \href{http://www.mail-archive.com/rcpp-devel@lists.r-forge.r-project.org/info.html}{Mail-Archive on Rcpp-devel} both of which offer web-based interfaces, including searching. \subsection{I like it. How can I help ?} \label{helping} We maintain a list of \href{https://github.com/RcppCore/Rcpp/issues?state=open}{open issues in the Github repository}. We welcome pull requests and suggest that code submissions come corresponding unit tests and, if applicable, documentation. If you are willing to donate time and have skills in C++, let us know. If you are willing to donate money to sponsor improvements, let us know too. You can also spread the word about \pkg{Rcpp}. There are many packages on CRAN that use \proglang{C++}, yet are not using \pkg{Rcpp}. You could blog about it, or get the word out otherwise. Last but not least the \href{http://gallery.rcpp.org}{Rcpp Gallery} is open for user contributions. \subsection{I don't like it. How can I help ?} It is very generous of you to still want to help. Perhaps you can tell us what it is that you dislike. We are very open to \emph{constructive} criticism. \subsection{Can I have commercial support for \pkg{Rcpp} ?} Sure you can. Just send us an email, and we will be happy to discuss the request. \subsection{I want to learn quickly. Do you provide training courses ?} Yes. Just send us an email. \subsection{Where is the code repository ?} From late 2008 to late 2013, we used the \href{https://r-forge.r-project.org/scm/?group_id=155}{Subversion repository at R-Forge} which contained Rcpp and a number of related packages. It still has the full history as well as number of support files. We have since switched to a \href{http://github.com/RcppCore/Rcpp}{Git repository at Github} for Rcpp (as well as RcppArmadillo and RcppEigen). \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/vignettes/Rcpp-introduction.Rnw0000644000000000000000000013360012253723677015567 0ustar %% use JSS class -- use 'nojss' to turn off header \documentclass[shortnames,nojss,article]{jss} \usepackage{booktabs,flafter,thumbpdf} %\VignetteIndexEntry{Rcpp-introduction} %\VignetteKeywords{Rcpp, foreign function interface, .Call, C++, R} %\VignetteDepends{Rcpp} \author{Dirk Eddelbuettel\\Debian Project \And Romain Fran\c{c}ois\\\proglang{R} Enthusiasts} \Plainauthor{Dirk Eddelbuettel, Romain Fran\c{c}ois} \title{\pkg{Rcpp}: Seamless \proglang{R} and \proglang{C++} Integration} \Plaintitle{Rcpp: Seamless R and C++ Integration} \Abstract{ The \pkg{Rcpp} package simplifies integrating \proglang{C++} code with \proglang{R}. It provides a consistent \proglang{C++} class hierarchy that maps various types of \proglang{R} objects (vectors, matrices, functions, environments, \dots) to dedicated \proglang{C++} classes. Object interchange between \proglang{R} and \proglang{C++} is managed by simple, flexible and extensible concepts which include broad support for \proglang{C++} Standard Template Library idioms. \proglang{C++} code can both be compiled, linked and loaded on the fly, or added via packages. Flexible error and exception code handling is provided. \pkg{Rcpp} substantially lowers the barrier for programmers wanting to combine \proglang{C++} code with \proglang{R}. } \Keywords{\proglang{R}, \proglang{C++}, foreign function interface, \code{.Call}} \Plainkeywords{R, C++, foreign function interface, .Call} \Volume{40} \Issue{8} \Month{April} \Year{2011} \Submitdate{2010-11-15} \Acceptdate{2011-03-21} \Address{ Dirk Eddelbuettel \\ Debian Project \\ River Forest, IL, United States of America\\ E-mail: \email{edd@debian.org}\\ URL: \url{http://dirk.eddelbuettel.com/}\\ Romain Fran\c{c}ois\\ Professional \proglang{R} Enthusiast\\ 1 rue du Puits du Temple\\ 34 000 Montpellier, France \\ E-mail: \email{romain@r-enthusiasts.com}\\ URL: \url{http://romainfrancois.blog.free.fr/} } %% need no \usepackage{Sweave.sty} <>= library(Rcpp) rcpp.version <- packageDescription("Rcpp")$Version rcpp.date <- packageDescription("Rcpp")$Date now.date <- strftime(Sys.Date(), "%B %d, %Y") @ % \begin{document} \vspace*{-0.25cm} \section{Introduction} \proglang{R} \citep{R:Main} is an extensible system. The `Writing \proglang{R} Extensions' manual \citep{R:Extensions} describes in detail how to augment \proglang{R} with compiled code, focusing mostly on the \proglang{C} language, but also mentioning \proglang{C++} and \proglang{Fortran}. The \proglang{R} application programming interface (API) described in `Writing \proglang{R} Extensions' is based on a set of functions and macros operating on \code{SEXP} (pointers to \code{SEXPREC} or `\proglang{S} expression' structures, see the `\proglang{R} Language' manual \citealp{R:Language} for details) which are the internal representation of \proglang{R} objects. In this article, we discuss the functionality of the \pkg{Rcpp} package \citep{CRAN:Rcpp}, which simplifies the usage of \proglang{C++} code in \proglang{R}. Combining \proglang{R} and \proglang{C++} is not a new idea, so we start with a short review of other approaches and give some historical background on the development of \pkg{Rcpp}. The \pkg{Rcpp} package provides a consistent API for seamlessly accessing, extending or modifying \proglang{R} objects at the \proglang{C++} level. The API is a rewritten and extented version of an earlier API which we refer to as the `classic \pkg{Rcpp} API'. It is still provided in the \pkg{RcppClassic} package \citep{CRAN:RcppClassic} to ensure compatibility, but its use is otherwise deprecated. All new development should use the richer second API which is enclosed in the \pkg{Rcpp} \proglang{C++} namespace, and corresponds to the redesigned code base. This article highlights some of the key design and implementation choices of the new API: Lightweight encapsulation of \proglang{R} objects in \proglang{C++} classes, automatic garbage collection strategy, code inlining, data interchange between \proglang{R} and \proglang{C++}, and error handling. Several examples are included to illustrate the benefits of using \pkg{Rcpp} as opposed to the traditional \proglang{R} API. Many more examples are available within the package, both as explicit examples and as part of the numerous unit tests. % The \pkg{Rcpp} package is available from the Comprehensive \proglang{R} Archive Network (CRAN) at \url{http://CRAN.R-project.org/package=Rcpp}. \makeatletter \if@nojss This vignette corresponds to the paper published in the \textsl{Journal of Statistical Software}. It is currently still identical to the published paper. Over time, this vignette version may receive minor updates. For citations, please use the \cite{JSS:Rcpp} or \cite{Eddelbuettel:2013:Rcpp}; details are also provided in \proglang{R} via \texttt{citation("Rcpp")}. This version corresponds to \pkg{Rcpp} version \Sexpr{rcpp.version} and was typeset on \Sexpr{now.date}. \fi \makeatother \subsection{Historical context} \pkg{Rcpp} first appeared in 2005 as a contribution (by Dominick Samperi) to the \pkg{RQuantLib} package \citep{CRAN:RQuantLib} and became a CRAN package in early 2006. Several releases (all by Samperi) followed in quick succession under the name \pkg{Rcpp}. The package was then renamed to \pkg{RcppTemplate}; several more releases followed during 2006 under the new name. However, no further releases were made during 2007, 2008 or most of 2009. Following a few updates in late 2009, it was withdrawn from CRAN. Given the continued use of the package, Eddelbuettel decided to revitalize it. New releases, using the initial name \pkg{Rcpp}, started in November 2008. These included an improved build and distribution process, additional documentation, and new functionality---while retaining the existing `classic \pkg{Rcpp}' interface. While not described here, this API will be provided for the foreseeable future via the \pkg{RcppClassic} package. Reflecting evolving \proglang{C++} coding standards \citep[see][]{Meyers:2005:EffectiveC++}, Eddelbuettel and Fran\c{c}ois started a significant redesign of the code base in 2009. This added numerous new features several of which are described in this article as well as in multiple vignettes included with the package. This new API is our current focus, and we intend to both extend and support the API in future development of the \pkg{Rcpp} package. \subsection{Related work} Integration of \proglang{C++} and \proglang{R} has been addressed by several authors; the earliest published reference is probably \cite{Bates+DebRoy:2001:C++Classes}. An unpublished paper by \cite{Java+Gaile+Manly:2007:RCpp} expresses several ideas that are close to some of our approaches, though not yet fully fleshed out. The \pkg{Rserve} package \citep{Urbanek:2003:Rserve,CRAN:Rserve} acts as a socket server for \proglang{R}. On the server side, \pkg{Rserve} translates \proglang{R} data structures into a binary serialization format and uses TCP/IP for transfer. On the client side, objects are reconstructed as instances of \proglang{Java} or \proglang{C++} classes that emulate the structure of \proglang{R} objects. The packages \pkg{rcppbind} \citep{Liang:2008:rcppbind}, \pkg{RAbstraction} \citep{Armstrong:2009:RAbstraction} and \pkg{RObjects} \citep{Armstrong:2009:RObjects} are all implemented using \proglang{C++} templates. None of them have matured to the point of a CRAN release. \pkg{CXXR} \citep{Runnalls:2009:CXXR} approaches this topic from the other direction: Its aim is to completely refactor \proglang{R} on a stronger \proglang{C++} foundation. \pkg{CXXR} is therefore concerned with all aspects of the \proglang{R} interpreter, read-eval-print loop (REPL), and threading; object interchange between \proglang{R} and \proglang{C++} is but one part. A similar approach is discussed by \cite{TempleLang:2009:ModestProposal} who suggests making low-level internals extensible by package developers in order to facilitate extending \proglang{R}. \cite{TempleLang:2009:RGCCTranslationUnit}, using compiler output for references on the code in order to add bindings and wrappers, offers a slightly different angle. \subsection[Rcpp use cases]{\pkg{Rcpp} use cases} \label{sec:classic_rcpp} The core focus of \pkg{Rcpp} has always been on helping the programmer to more easily add \proglang{C++}-based functions. Here, we use `function' in the standard mathematical sense of providing results (output) given a set of parameters or data (input). This was facilitated from the earliest releases using \proglang{C++} classes for receiving various types of \proglang{R} objects, converting them to \proglang{C++} objects and allowing the programmer to return the results to \proglang{R} with relative ease. This API therefore supports two typical use cases. First, existing \proglang{R} code may be replaced by equivalent \proglang{C++} code in order to reap performance gains. This case is conceptually easy when there are (built- or run-time) dependencies on other \proglang{C} or \proglang{C++} libraries. It typically involves setting up data and parameters---the right-hand side components of a function call---before making the call in order to provide the result that is to be assigned to the left-hand side. Second, \pkg{Rcpp} facilitates calling functions provided by other libraries. The use resembles the first case but with an additional level of abstraction: data and parameters are passed via \pkg{Rcpp} to a function set-up to call code from an external library. Apart from this `vertical mode' of calling \proglang{C++} from \proglang{R}, additional features in the new API also support a more `horizontal mode' of directly calling \pkg{Rcpp} objects. This was motivated by the needs of other projects such as \pkg{RInside} \citep{CRAN:RInside} for easy embedding of \proglang{R} in \proglang{C++} applications and \pkg{RProtoBuf} \citep{CRAN:RProtoBuf} to interface with the Protocol Buffers library. This use will be touched upon in the next section, but a more detailed discussion is outside the scope of this paper. Lastly, the more recent additions `\pkg{Rcpp} modules' and `\pkg{Rcpp} sugar' also expand the use cases; see Section~\ref{sec:ongoing} below. \section[The Rcpp API]{The \pkg{Rcpp} API} \label{sec:new_rcpp} \subsection{A first example} We can illustrate the \pkg{Rcpp} API by revisiting the convolution example from the `Writing \proglang{R} Extensions' manual \citep[Chapter 5]{R:Extensions}. Using \pkg{Rcpp}, this function can be written as follows: % \begin{Code} #include RcppExport SEXP convolve3cpp(SEXP a, SEXP b) { Rcpp::NumericVector xa(a); Rcpp::NumericVector xb(b); int n_xa = xa.size(), 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; } \end{Code} % We can highlight several aspects. \begin{enumerate} \item Only a single header file \code{Rcpp.h} is needed to use the \pkg{Rcpp} API. \item \code{RcppExport} is a convenience macro helping with calling a \proglang{C} function from \proglang{C++}. \item Given two arguments of type \code{SEXP}, a third is returned (as using only \code{SEXP} types for input and output is prescribed by the \code{.Call()} interface of the \proglang{R} API). \item Both inputs are converted to \proglang{C++} vector types provided by \pkg{Rcpp} (and we have more to say about these conversions below). \item The usefulness of these classes can be seen when we query the vectors directly for their size---using the \code{size()} member function---in order to reserve a new result type of appropriate length, and with the use of the \verb|operator[]| to extract and set individual elements of the vector. \item The computation itself is straightforward embedded looping just as in the original examples in the `Writing \proglang{R} Extensions' manual \citep{R:Extensions}. \item The return conversion from the \code{NumericVector} to the \code{SEXP} type is also automatic. \end{enumerate} We argue that this \pkg{Rcpp}-based usage is much easier to read, write and debug than the \proglang{C} macro-based approach supported by \proglang{R} itself. \subsection[Rcpp class hierarchy]{\pkg{Rcpp} class hierarchy} The \code{Rcpp::RObject} class is the basic class of the new \pkg{Rcpp} API. An instance of the \code{RObject} class encapsulates an \proglang{R} object (itself represented by the \proglang{R} type \code{SEXP}), exposes methods that are appropriate for all types of objects and transparently manages garbage collection. The most important aspect of the \code{RObject} class is that it is a very thin wrapper around the \code{SEXP} it encapsulates. The \code{SEXP} is indeed the only data member of an \code{RObject}. The \code{RObject} class does not interfere with the way \proglang{R} manages its memory and does not perform copies of the object into a suboptimal \proglang{C++} representation. Instead, it merely acts as a proxy to the object it encapsulates so that methods applied to the \code{RObject} instance are relayed back to the \code{SEXP} in terms of the standard \proglang{R} API. The \code{RObject} class takes advantage of the explicit life cycle of \proglang{C++} objects to manage exposure of the underlying \proglang{R} object to the garbage collector. The \code{RObject} effectively treats its underlying \code{SEXP} as a resource. The constructor of the \code{RObject} class takes the necessary measures to guarantee that the underlying \code{SEXP} is protected from the garbage collector, and the destructor assumes the responsibility to withdraw that protection. By assuming the entire responsibility of garbage collection, \pkg{Rcpp} relieves the programmer from writing boiler plate code to manage the protection stack with \code{PROTECT} and \code{UNPROTECT} macros. The \code{RObject} class defines a set of member functions applicable to any \proglang{R} object, regardless of its type. This ranges from querying properties of the object (\texttt{isNULL}, \texttt{isObject}, \texttt{isS4}), management of the attributes (\texttt{attributeNames}, \texttt{hasAttribute}, \texttt{attr}) to handling of slots\footnote{Member functions dealing with slots are only applicable to \proglang{S}4 objects; otherwise an exception is thrown.} (\texttt{hasSlot}, \texttt{slot}). \subsection{Derived classes} Internally, an \proglang{R} object must have one type amongst the set of predefined types, commonly referred to as SEXP types. The `\proglang{R} Internals' manual \citep{R:Internals} documents these various types. \pkg{Rcpp} associates a dedicated \proglang{C++} class for most SEXP types, and therefore only exposes functionality that is relevant to the \proglang{R} object that it encapsulates. For example \code{Rcpp::Environment} contains member functions to manage objects in the associated environment. Similarly, classes related to vectors---\code{IntegerVector}, \code{NumericVector}, \code{RawVector}, \code{LogicalVector}, \code{CharacterVector}, \code{GenericVector} (also known as \code{List}) and \code{ExpressionVector}---expose functionality to extract and set values from the vectors. The following sections present typical uses of \pkg{Rcpp} classes in comparison with the same code expressed using functions and macros of the \proglang{R} API. \subsection{Numeric vectors} The next code snippet is taken from `Writing \proglang{R} Extensions' \citep[Section 5.9.1]{R:Extensions}. It allocates a \code{numeric} vector of two elements and assigns some values to it using the \proglang{R} API. % \begin{Code} SEXP ab; PROTECT(ab = allocVector(REALSXP, 2)); REAL(ab)[0] = 123.45; REAL(ab)[1] = 67.89; UNPROTECT(1); \end{Code} % Although this is one of the simplest examples in `Writing \proglang{R} Extensions', it seems verbose and yet it is not obvious at first sight what is happening. Memory is allocated by \code{allocVector}; we must also supply it with the type of data (\code{REALSXP}) and the number of elements. Once allocated, the \code{ab} object must be protected from garbage collection. Lastly, the \code{REAL} macro returns a pointer to the beginning of the actual array; its indexing does not resemble either \proglang{R} or \proglang{C++}. The code can be simplified using the \code{Rcpp::NumericVector} class: % \begin{Code} Rcpp::NumericVector ab(2); ab[0] = 123.45; ab[1] = 67.89; \end{Code} % The code contains fewer idiomatic decorations. The \code{NumericVector} constructor is given the number of elements the vector contains (2), which hides the call to the \code{allocVector} in the original code example. Also hidden is protection of the object from garbage collection, which is a behavior that \code{NumericVector} inherits from \code{RObject}. Values are assigned to the first and second elements of the vector as \code{NumericVector} overloads the \code{operator[]}. The snippet can also be written more concisely as a single statement using the \code{create} static member function of the \code{NumericVector} class: % \begin{Code} Rcpp::NumericVector ab = Rcpp::NumericVector::create(123.45, 67.89); \end{Code} \subsection{Character vectors} A second example deals with character vectors and emulates this \proglang{R} code: % \begin{CodeInput} R> c("foo", "bar") \end{CodeInput} % Using the traditional \proglang{R} API, the vector can be allocated and filled as such: % \begin{Code} SEXP ab; PROTECT(ab = allocVector(STRSXP, 2)); SET_STRING_ELT( ab, 0, mkChar("foo") ); SET_STRING_ELT( ab, 1, mkChar("bar") ); UNPROTECT(1); \end{Code} % This imposes on the programmer knowledge of \code{PROTECT}, \code{UNPROTECT}, \code{SEXP}, \code{allocVector}, \code{SET\_STRING\_ELT}, and \code{mkChar}. % Using the \code{Rcpp::CharacterVector} class, we can express the same code more concisely: % \begin{Code} Rcpp::CharacterVector ab(2); ab[0] = "foo"; ab[1] = "bar"; \end{Code} \section[R and C++ data interchange]{\proglang{R} and \proglang{C++} data interchange} In addition to classes, the \pkg{Rcpp} package contains two functions to perform conversion of \proglang{C++} objects to \proglang{R} objects and back. \subsection[C++ to R: wrap]{\proglang{C++} to \proglang{R}: \code{wrap}} The \proglang{C++} to \proglang{R} conversion is performed by the \code{Rcpp::wrap} templated function. It uses advanced template metaprogramming techniques\footnote{A discussion of template metaprogramming \citep{Vandevoorde+Josuttis:2003:Templates,Abrahams+Gurtovoy:2004:TemplateMetaprogramming} is beyond the scope of this article.} to convert a wide and extensible set of types and classes to the most appropriate type of \proglang{R} object. The signature of the \code{wrap} template is as follows: % \begin{Code} template SEXP wrap(const T& object); \end{Code} % The templated function takes a reference to a `wrappable' object and converts this object into a \code{SEXP}, which is what \proglang{R} expects. Currently wrappable types are: \begin{itemize} \item primitive types: \code{int}, \code{double}, \code{bool}, \dots which are converted into the corresponding atomic \proglang{R} vectors; \item \code{std::string} objects which are converted to \proglang{R} atomic character vectors; \item Standard Template Library (STL) containers such as \code{std::vector} or \code{std::map}, as long as the template parameter type \code{T} is itself wrappable; \item STL maps which use \code{std::string} for keys ({e.g.}, \code{std::map}); as long as the type \code{T} is wrappable; \item any type that implements implicit conversion to \code{SEXP} through the \code{operator SEXP()}; \item any type for which the \code{wrap} template is fully specialized. \end{itemize} Wrappability of an object type is resolved at compile time using modern techniques of template meta programming and class traits. The \code{Rcpp-extending} vignette in the \pkg{Rcpp} package discusses in depth how to extend \code{wrap} to third-party types. The \pkg{RcppArmadillo} \citep*{CRAN:RcppArmadillo} and \pkg{RcppGSL} \citep{CRAN:RcppGSL} packages feature several examples. The following segment of code illustrates that the design allows composition: \begin{Code} RcppExport SEXP someFunction() { std::vector > v; std::map m1; std::map m2; m1["foo"]=1; m1["bar"]=2; m2["foo"]=1; m2["bar"]=2; m2["baz"]=3; v.push_back( m1 ); v.push_back( m2 ); return Rcpp::wrap( v ); } \end{Code} % In this example, the STL types \verb+vector+ and \verb+map+ are used to create a list of two named vectors. The member function \verb+push_back+ insert a given element into a vector. This example is equivalent to the result of this \proglang{R} statement: % \begin{Code} list(c(bar = 2L, foo = 1L), c(bar = 2L, baz = 3L, foo = 1L)) \end{Code} \subsection[R to C++: as]{\proglang{R} to \proglang{C++}: \code{as}} The reverse conversion from an \proglang{R} object to a \proglang{C++} object is implemented by variations of the \code{Rcpp::as} template whose signature is: % \begin{Code} template T as(SEXP x); \end{Code} % It offers less flexibility and currently handles conversion of \proglang{R} objects into primitive types ({e.g.}, \code{bool}, \code{int}, \code{std::string}, \dots), STL vectors of primitive types ({e.g.}, \code{std::vector}, \code{std::vector}, \dots) and arbitrary types that offer a constructor that takes a \code{SEXP}. In addition \code{as} can be fully or partially specialized to manage conversion of \proglang{R} data structures to third-party types as can be seen for example in the \pkg{RcppArmadillo} package which eases transfer of \proglang{R} matrices and vectors to the optimised data structures in the \pkg{Armadillo} linear algebra library \citep{Sanderson:2010:Armadillo}. \subsection{Implicit use of converters} The converters offered by \code{wrap} and \code{as} provide a very useful framework to implement code logic in terms of \proglang{C++} data structures and then explicitly convert data back to \proglang{R}. In addition, the converters are also used implicitly in various places in the \code{Rcpp} API. Consider the following code that uses the \code{Rcpp::Environment} class to interchange data between \proglang{C++} and \proglang{R}. It accesses a vector \texttt{x} from the global environment, creates an STL \texttt{map} of string types and pushes this back to \proglang{R}: % \begin{Code} Rcpp::Environment global = Rcpp::Environment::global_env(); std::vector vx = global["x"]; std::map map; map["foo"] = "oof"; map["bar"] = "rab"; global["y"] = map; \end{Code} % In the first part of the example, the code extracts a \code{std::vector} from the global environment. In order to achieve this, the \code{operator[]} of \code{Environment} uses the proxy pattern \citep{Meyers:1995:MoreEffectiveC++} to distinguish between left hand side (LHS) and right hand side (RHS) use. The output of the \code{operator[]} is an instance of the nested class \code{Environment::Binding}. This class defines a templated implicit conversion operator. It is this conversion operator which allows a \code{Binding} object to be assigned to any type that \code{Rcpp::as} is able to handle. In the last part of the example, the LHS use of the \code{Binding} instance is implemented through its assignment operator. This is also templated and uses \code{Rcpp::wrap} to perform the conversion to a \code{SEXP} that can be assigned to the requested symbol in the global environment. The same mechanism is used throughout the API. Examples include access/modification of object attributes, slots, elements of generic vectors (lists), function arguments, nodes of dotted pair lists, language calls and more. \section{Function calls} \label{sec:functions} \begin{table}[t!] \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Environment: Using the \pkg{Rcpp} API}} \begin{Code} Environment stats("package:stats"); Function rnorm = stats["rnorm"]; return rnorm(10, Named("sd", 100.0)); \end{Code} \end{minipage} \begin{minipage}{0.06\linewidth} \phantom{XXX} \end{minipage} \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Environment: Using the \proglang{R} API}} \begin{Code} SEXP stats = PROTECT( R_FindNamespace( mkString("stats"))); SEXP rnorm = PROTECT( findVarInFrame(stats, install("rnorm"))); SEXP call = PROTECT( LCONS( rnorm, CONS(ScalarInteger(10), CONS(ScalarReal(100.0), R_NilValue)))); SET_TAG(CDDR(call),install("sd")); SEXP res = PROTECT(eval(call, R_GlobalEnv)); UNPROTECT(4); return res; \end{Code} \end{minipage} \bigskip \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Language: Using the \pkg{Rcpp} API}} \begin{Code} Language call("rnorm", 10, Named("sd",100.0)); return call.eval(); \end{Code} \end{minipage} \begin{minipage}{0.06\linewidth} \phantom{XXX} \end{minipage} \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Language: Using the \proglang{R} API}} \begin{Code} SEXP call = PROTECT( LCONS(install("rnorm"), CONS(ScalarInteger(10), CONS(ScalarReal(100.0), R_NilValue)))); SET_TAG(CDDR(call),install("sd")); SEXP res = PROTECT(eval(call, R_GlobalEnv)); UNPROTECT(2); return res; \end{Code} \end{minipage} \bigskip \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Sugar: Using the \pkg{Rcpp} API}} \begin{Code} RNGScope scope; return rnorm(10, 0, 100); \end{Code} \end{minipage} \begin{minipage}{0.06\linewidth} \phantom{XXX} \end{minipage} \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Sugar: Using the \proglang{R} API}} \medskip (not applicable) \end{minipage} \bigskip \caption{\pkg{Rcpp} versus the \proglang{R} API: Five ways of calling \code{rnorm(10L, sd = 100)} in \proglang{C}/\proglang{C++}.} \label{fig:rnormCode} \medskip \small Note that we have removed the \code{Rcpp::} prefix for readability; this corresponds to adding a directive \texttt{using namespace Rcpp;} in the code. The versions that use callbacks to \proglang{R} do not require handling of the state of the random number generator. The version that uses \pkg{Rcpp} sugar requires it, which is done via the instantiation of the \code{RNGScope} variable. \end{table} The next example shows how to use \pkg{Rcpp} to emulate the \proglang{R} code \code{rnorm(10L, sd = 100.0)}. As shown in Table~\ref{fig:rnormCode}, the code can be expressed in several ways in either \pkg{Rcpp} or the standard \proglang{R} API. The first version shows the use of the \code{Environment} and \code{Function} classes by \pkg{Rcpp}. The second version shows the use of the \code{Language} class, which manages calls (LANGSXP). For comparison, we also show both versions using the standard \proglang{R} API. Finally, we also show a variant using `\pkg{Rcpp} sugar', a topic which is discussed in Sections~\ref{sec:perfcomp} and \ref{sec:ongoing} below. This example illustrates that the \pkg{Rcpp} API permits us to work with code that is easier to read, write and maintain. More examples are available as part of the documentation included in the \pkg{Rcpp} package, as well as among its over seven hundred and fifty unit tests. \section{Using code `inline'} \label{sec:inline} Extending \proglang{R} with compiled code requires a mechanism for reliably compiling, linking, and loading the code. While using a package is preferable in the long run, it may be too involved for quick explorations. An alternative is provided by the \pkg{inline} package \citep{CRAN:inline} which compiles, links and loads a \proglang{C}, \proglang{C++} or \proglang{Fortran} function---directly from the \proglang{R} prompt using simple functions \code{cfunction} and \code{cxxfunction}. The latter provides an extension which works particularly well with \pkg{Rcpp} via so-called `plugins' which provide information about additional header file and library locations. The use of \pkg{inline} is possible as \pkg{Rcpp} can be installed and updated just like any other \proglang{R} package using, for examples, the \code{install.packages()} function for initial installation as well as \code{update.packages()} for upgrades. So even though \proglang{R}/\proglang{C++} interfacing would otherwise require source code, the \pkg{Rcpp} library is always provided ready for use as a pre-built library through the CRAN package mechanism.\footnote{This presumes a platform for which pre-built binaries are provided. \pkg{Rcpp} is available in binary form for Windows and OS~X users from CRAN, and as a \code{.deb} package for Debian and Ubuntu users. For other systems, the \pkg{Rcpp} library is automatically built from source during installation or upgrades.} The library and header files provided by \pkg{Rcpp} for use by other packages are installed along with the \pkg{Rcpp} package. The \code{LinkingTo:}~\code{Rcpp} directive in the \code{DESCRIPTION} file lets \proglang{R} properly reference the header files. The \pkg{Rcpp} package provides appropriate information for the \code{-L} switch needed for linking via the function \code{Rcpp:::LdFlags()}. It can be used by \code{Makevars} files of other packages, and \pkg{inline} makes use of it internally so that all of this is done behind the scenes without the need for explicitly setting compiler or linker options. The convolution example provided above can be rewritten for use by \pkg{inline} as shown below. The function body is provided by the \proglang{R} character variable \code{src}, the function header is defined by the argument \code{signature}, and we only need to enable \code{plugin = "Rcpp"} to obtain a new \proglang{R} function \code{fun} based on the \proglang{C++} code in \code{src}: % \begin{CodeChunk} \begin{CodeInput} R> src <- ' + Rcpp::NumericVector xa(a); + Rcpp::NumericVector xb(b); + int n_xa = xa.size(), n_xb = xb.size(); + + Rcpp::NumericVector xab(n_xa + n_xb - 1); + 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; + ' R> fun <- cxxfunction(signature(a = "numeric", b = "numeric"), + src, plugin = "Rcpp") R> fun(1:3, 1:4) \end{CodeInput} \begin{CodeOutput} [1] 1 4 10 16 17 12 \end{CodeOutput} \end{CodeChunk} % With one assignment to the \proglang{R} variable \code{src}, and one call of the \proglang{R} function \code{cxxfunction} (provided by the \pkg{inline} package), we have created a new \proglang{R} function \code{fun} that uses the \proglang{C++} code we assigned to \code{src}---and all this functionality can be used directly from the \proglang{R} prompt making prototyping with \proglang{C++} functions straightforward. \textsl{Update}: \pkg{Rcpp} version 0.10.0 and later contain new and powerful feature called 'Rcpp Attributes' which provides an even more powerful mechanism; see \cite{CRAN:Rcpp:Attributes} for more details. \section{Using Standard Template Library algorithms} The STL offers a variety of generic algorithms designed to be used on ranges of elements \citep{Plauger+Et+Al:2000:STL}. A range is any sequence of objects that can be accessed through iterators or pointers. All \pkg{Rcpp} classes from the new API representing vectors (including lists) can produce ranges through their member functions \code{begin()} and \code{end()}, effectively supporting iterating over elements of an \proglang{R} vector. The following code illustrates how \pkg{Rcpp} might be used to emulate a simpler\footnote{The version of \code{lapply} does not allow use of the ellipsis (\code{...}).} version of \code{lapply} using the \code{transform} algorithm from the STL. % \begin{CodeChunk} \begin{CodeInput} R> src <- ' + Rcpp::List input(data); + Rcpp::Function f(fun); + Rcpp::List output(input.size()); + std::transform(input.begin(), input.end(), output.begin(), f); + output.names() = input.names(); + return output; + ' R> cpp_lapply <- cxxfunction(signature(data = "list", fun = "function"), + src, plugin = "Rcpp") \end{CodeInput} \end{CodeChunk} % We can now use this \code{cpp_lapply} function to calculate a summary of each column of the \code{faithful} data set included with \proglang{R}. % \begin{CodeInput} R> cpp_lapply(faithful, summary) \end{CodeInput} \begin{CodeOutput} $eruptions Min. 1st Qu. Median Mean 3rd Qu. Max. 1.600 2.163 4.000 3.488 4.454 5.100 $waiting Min. 1st Qu. Median Mean 3rd Qu. Max. 43.0 58.0 76.0 70.9 82.0 96.0 \end{CodeOutput} \section{Error handling} Code that uses both \proglang{R} and \proglang{C++} has to deal with two distinct error handling models. \pkg{Rcpp} simplifies this and allows both systems to work together. \subsection[C++ exceptions in R]{\proglang{C++} exceptions in \proglang{R}} The internals of the \proglang{R} condition mechanism and the implementation of \proglang{C++} exceptions are both based on a layer above POSIX jumps. These layers both assume total control over the call stack and should not be used together without extra precaution. \pkg{Rcpp} contains facilities to combine both systems so that \proglang{C++} exceptions are caught and recycled into the \proglang{R} condition mechanism. \pkg{Rcpp} defines the \code{BEGIN\_RCPP} and \code{END\_RCPP} macros that should be used to bracket code that might throw \proglang{C++} exceptions. % \begin{Code} RcppExport SEXP fun( SEXP x ) { BEGIN_RCPP int dx = Rcpp::as(x); if( dx > 10 ) throw std::range_error("too big"); return Rcpp::wrap( dx * dx); END_RCPP } \end{Code} % The macros are simply defined to avoid code repetition. They expand to simple \code{try}/\code{catch} blocks so that the above example becomes: % \begin{Code} RcppExport SEXP fun( SEXP x ) { try { int dx = Rcpp::as(x); if( dx > 10 ) throw std::range_error("too big"); return Rcpp::wrap( dx * dx); } catch( std::exception& __ex__ ) { forward_exception_to_r( __ex__ ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } } \end{Code} % Using \code{BEGIN\_RCPP} and \code{END\_RCPP}---or the expanded versions---guarantees that the stack is first unwound in terms of \proglang{C++} exceptions, before the problem is converted to the standard \proglang{R} error management system using the function \code{Rf\_error} of the \proglang{R} API. The \code{forward\_exception\_to\_r} function uses run-time type information to extract information about the class of the \proglang{C++} exception and its message so that dedicated handlers can be installed on the \proglang{R} side. % \begin{CodeChunk} \begin{CodeInput} R> f <- function(x) .Call("fun", x) R> tryCatch(f(12), "std::range_error" = function(e) { conditionMessage(e) }) \end{CodeInput} \begin{CodeOutput} [1] "too big" \end{CodeOutput} \begin{CodeInput} R> tryCatch(f(12), "std::range_error" = function(e) { class(e) }) \end{CodeInput} \begin{CodeOutput} [1] "std::range_error" "C++Error" "error" "condition" \end{CodeOutput} \end{CodeChunk} % A serious limitation of this approach is the lack of support for calling handlers. \proglang{R} calling handlers are also based on POSIX jumps, and using both calling handlers from the \proglang{R} engine as well \proglang{C++} exception forwarding might lead to undetermined results. Future versions of \pkg{Rcpp} might attempt to to improve this issue. \subsection[R errors in C++]{\proglang{R} errors in \proglang{C++}} \proglang{R} itself currently does not offer \proglang{C}-level mechanisms to deal with errors. To overcome this problem, \pkg{Rcpp} uses the \code{Rcpp\_eval} function to evaluate an \proglang{R} expression in an R-level \code{tryCatch} block. The error, if any, that occurs while evaluating the function is then translated into an \proglang{C++} exception that can be dealt with using regular \proglang{C++} \code{try}/\code{catch} syntax. An open (and rather hard) problem, however, is posed by the fact that calls into the \proglang{C} API offered by \proglang{R} cannot be reliably protected. Such calls can always encounter an error condition of their own triggering a call to \code{Rf_error} which will lead to a sudden death of the program. In particular, neither \proglang{C++} class destructors nor \code{catch} parts of outer \code{try}/\code{catch} blocks will be called. This leaves the potential for memory or resource leakage. So while newly written code can improve on this situation via use of \proglang{C++} exception handling, existing code calling into the \proglang{C} API of \proglang{R} cannot be amended just by having an outer layer of exception handling around it. \section{Performance comparison} \label{sec:perfcomp} In this section, we present several different ways to leverage \pkg{Rcpp} to rewrite the convolution example from `Writing \proglang{R} Extensions' \citep[Chapter 5]{R:Extensions} first discussed in Section~\ref{sec:new_rcpp}. As part of the redesign of \pkg{Rcpp}, data copy is kept to the absolute minimum: The \code{RObject} class and all its derived classes are just a container for a \code{SEXP} object. We let \proglang{R} perform all memory management and access data though the macros or functions offered by the standard \proglang{R} API. The implementation of the \code{operator[]} is designed to be as efficient as possible, using both inlining and caching, but even this implementation is still less efficient than the reference \proglang{C} implementation described in \cite{R:Extensions}. \pkg{Rcpp} follows design principles from the STL, and classes such as \code{NumericVector} expose iterators that can be used for sequential scans of the data. Algorithms using iterators are usually more efficient than those that operate on objects using the \code{operator[]}. The following version of the convolution function illustrates the use of the \code{NumericVector::iterator}. % \begin{Code} #include RcppExport SEXP convolve4cpp(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; } \end{Code} % One of the focuses of recent developments of \pkg{Rcpp} is called `\pkg{Rcpp} sugar', and aims to provide R-like syntax in \proglang{C++}. While a fuller discussion of \pkg{Rcpp} sugar is beyond the scope of this article, we have included another version of the convolution algorithm based on \pkg{Rcpp} sugar for illustrative purposes here: % \begin{Code} #include RcppExport SEXP convolve11cpp(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, 0.0); Rcpp::Range r( 0, n_xb-1 ); for (int i=0; i} & 683 & 3.13 \\ \bottomrule \end{tabular} \end{small} \caption{Run-time performance of the different convolution examples.} \label{tab:benchmark} \end{center} \end{table} The first implementation, written in \proglang{C} and using the traditional \proglang{R} API, provides our base case. It takes advantage of pointer arithmetics and therefore does not to pay the price of \proglang{C++} object encapsulation or operator overloading. The slowest solution illustrates the price of object encapsulation. Calling an overloaded \code{operator[]} as opposed to using direct pointer arithmetics as in the reference case costs about 29\% in performance. The next implementation uses iterators rather than indexing. Its performance is indistinguishable from the base case. This also shows that the use of \proglang{C++} may not necessarily imply any performance penalty. Further, \proglang{C++} \code{iterators} can be used to achieve the performance of \proglang{C} pointers, but without the potential dangers of direct memory access via pointers. Finally, the fastest implementation uses \pkg{Rcpp} sugar. It performs significantly better than the base case. Explicit loop unrolling provides us with vectorization at the \proglang{C++} level which is responsible for this particular speedup. \section{On-going development} \label{sec:ongoing} \pkg{Rcpp} is in very active development: Current work in the package (and in packages such as \pkg{RcppArmadillo}) focuses on further improving interoperability between \proglang{R} and \proglang{C++}. Two core themes for on-going development are `\pkg{Rcpp} sugar' as well as `\pkg{Rcpp} modules', both of which are also discussed in more detail in specific vignettes in the \pkg{Rcpp} package. `\pkg{Rcpp} sugar' offers syntactic sugar at the \proglang{C++} level, including optimized binary operators and many \proglang{R} functions such as \code{ifelse}, \code{sapply}, \code{any}, \code{head}, \code{tail}, and more. The main technique used in \pkg{Rcpp} sugar is expression templates pioneered by the \pkg{Blitz++} library \citep{Veldhuizen:1998:Blitz} and since adopted by projects such as \pkg{Armadillo} \citep{Sanderson:2010:Armadillo}. Access to most of the d/p/q/r-variants of the statistical distribution functions has also been added, enabling the use of expressions such as \code{dnorm(X, m, s)} for a numeric vector \code{X} and scalars \code{m} and \code{s}. This was shown in Table~\ref{fig:rnormCode} in Section~\ref{sec:functions} above where the \proglang{R} expression \code{rnorm(10L, sd = 100)} was rewritten in \proglang{C++} as \code{rnorm(10, 0, 100)}. Note that \proglang{C++} semantics require the second parameter to be used here, which is different from the \proglang{R} case. `\pkg{Rcpp} modules' allows programmers to expose \proglang{C++} functions and classes at the \proglang{R} level. This offers access to \proglang{C++} code from \proglang{R} using even less interface code than by writing accessor functions. Modules are inspired by the \pkg{Boost.Python} library \citep{Abrahams+Grosse-Kunstleve:2003:Boost.Python} which provides similar functionality for \proglang{Python}. \proglang{C++} classes exposed by \pkg{Rcpp} modules are shadowed by reference classes which have been introduced in \proglang{R} 2.12.0. \textsl{Update}: Besides the vignettes for '\pkg{Rcpp} Sugar' \citep{CRAN:Rcpp:Sugar} and '\pkg{Rcpp} Modules' \citep{CRAN:Rcpp:Modules}, the aforementioned vignette for '\pkg{Rcpp} Attributes' \citep{CRAN:Rcpp:Attributes} describes a new possibility for even more direct integration between \proglang{Rcpp} and \proglang{C++}. \section{Summary} The \pkg{Rcpp} package presented in this paper greatly simplifies integration of compiled \proglang{C++} code with \proglang{R}. \pkg{Rcpp} provides a \proglang{C++} class hierarchy which allows manipulation of \proglang{R} data structures in \proglang{C++} using member functions and operators directly related to the type of object being used, thereby reducing the level of expertise required to master the various functions and macros offered by the internal \proglang{R} API. The classes assume the entire responsibility of garbage collection of objects, relieving the programmer from book-keeping operations with the protection stack and enabling him/her to focus on the underlying problem. Data interchange between \proglang{R} and \proglang{C++} code is performed by the \code{wrap()} and \code{as()} template functions. They allow the programmer to write logic in terms of \proglang{C++} data structures, and facilitate use of modern libraries such as the Standard Template Library (STL) and its containers and algorithms. The \code{wrap()} and \code{as()} template functions are extensible by design. They are also used either explicitly or implicitly throughout the API. By using only thin wrappers around \code{SEXP} objects and adopting \proglang{C++} idioms such as iterators, the footprint of the \pkg{Rcpp} API is very lightweight, and does not incur a significant performance penalty. The \pkg{Rcpp} API offers opportunities to dramatically reduce the complexity of code, which should lower the initial cost of writing code and improve code readability, maintainability, and reuse---without incurring noticeable penalties in run-time performance. \section*{Acknowledgments} Detailed comments and suggestions by editors as well as anonymous referees are gratefully acknowledged. We are also thankful for code contributions by Douglas Bates and John Chambers, as well as for very helpful suggestions by Uwe Ligges, Brian Ripley and Simon Urbanek concerning the build systems for different platforms. Last but not least, several users provided very fruitful ideas for new or extended features via the \code{rcpp-devel} mailing list. \bibliography{Rcpp} \vspace*{-0.35cm} \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: rcpp-0.11.0/vignettes/Rcpp-extending.Rnw0000644000000000000000000002344712273061123015021 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-extending} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, package} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color, alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} %% defined as a stop-gap measure til interaction with highlight is sorted out \newcommand{\hlboxlessthan}{ \hlnormalsizeboxlessthan} \newcommand{\hlboxgreaterthan}{\hlnormalsizeboxgreaterthan} \newcommand{\hlboxopenbrace}{ \hlnormalsizeboxopenbrace} \newcommand{\hlboxclosebrace}{ \hlnormalsizeboxclosebrace} \newcommand{\hlboxbacktick}{ \hlnormalsizeboxbacktick} \newcommand{\hlboxunderscore}{ \hlnormalsizeboxunderscore} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") require(inline) require(highlight) require(Rcpp) @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{Extending \pkg{Rcpp}} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This note provides an overview of the steps programmers should follow to extend \pkg{Rcpp} \citep{CRAN:Rcpp,JSS:Rcpp} for use with their own classes. This document is based on our experience in extending \pkg{Rcpp} to work with the \pkg{Armadillo} \citep{Sanderson:2010:Armadillo} classes, available in the separate package \pkg{RcppArmadillo} \citep{CRAN:RcppArmadillo}. This document assumes knowledge of \pkg{Rcpp} as well as some knowledge of \proglang{C++} templates \citep{Abrahams+Gurtovoy:2004:TemplateMetaprogramming}. } \section{Introduction} \pkg{Rcpp} facilitates data interchange between \proglang{R} and \proglang{C++} through the templated functions \texttt{Rcpp::as} (for conversion of objects from \proglang{R} to \proglang{C++}) and \texttt{Rcpp::wrap} (for conversion from \proglang{C++} to \proglang{R}). In other words, we convert between the so-called \proglang{S}-expression pointers (in type \texttt{SEXP}) to a templated \proglang{C++} type, and vice versa. The corresponding function declarations are as follows: <>= // conversion from R to C++ template T as( SEXP x) ; // conversion from C++ to R template SEXP wrap(const T& object) ; @ These converters are often used implicitly, as in the following code chunk: <>= code <- ' // we get a list from R List input(input_) ; // pull std::vector from R list // this is achieved through an implicit call to Rcpp::as std::vector x = input["x"] ; // return an R list // this is achieved through implicit call to Rcpp::wrap return List::create( _["front"] = x.front(), _["back"] = x.back() ) ; ' writeLines( code, "code.cpp" ) @ <>= external_highlight( "code.cpp", type = "LATEX", doc = FALSE ) @ <<>>= fx <- cxxfunction( signature( input_ = "list"), paste( readLines( "code.cpp" ), collapse = "\n" ), plugin = "Rcpp" ) input <- list( x = seq(1, 10, by = 0.5) ) fx( input ) @ The \pkg{Rcpp} converter function \texttt{Rcpp::as} and \texttt{Rcpp::wrap} have been designed to be extensible to user-defined types and third-party types. \section[Extending Rcpp::wrap]{Extending \texttt{Rcpp::wrap} } The \pkg{Rcpp::wrap} converter is extensible in essentially two ways : intrusive and non-intrusive. \subsection{Intrusive extension} When extending \pkg{Rcpp} with your own data type, the recommended way is to implement a conversion to \texttt{SEXP}. This lets \texttt{Rcpp::wrap} know about the new data type. The template meta programming (or TMP) dispatch is able to recognize that a type is convertible to a \texttt{SEXP} and \texttt{Rcpp::wrap} will use that conversion. The caveat is that the type must be declared before the main header file \texttt{Rcpp.h} is included. <>= #include class Foo { public: Foo() ; // this operator enables implicit Rcpp::wrap operator SEXP() ; } #include @ This is called \emph{intrusive} because the conversion to \texttt{SEXP} operator has to be declared within the class. \subsection{Non-intrusive extension} It is often desirable to offer automatic conversion to third-party types, over which the developer has no control and can therefore not include a conversion to \texttt{SEXP} operator in the class definition. To provide automatic conversion from \proglang{C++} to \proglang{R}, one must declare a specialization of the \texttt{Rcpp::wrap} template between the includes of \texttt{RcppCommon.h} and \texttt{Rcpp.h}. <>= #include // third party library that declares class Bar #include // declaring the specialization namespace Rcpp { template <> SEXP wrap( const Bar& ) ; } // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ It should be noted that only the declaration is required. The implementation can appear after the \texttt{Rcpp.h} file is included, and therefore take full advantage of the \pkg{Rcpp} type system. \subsection{Templates and partial specialization} It is perfectly valid to declare a partial specialization for the \texttt{Rcpp::wrap} template. The compiler will identify the appropriate overload: <>= #include // third party library that declares template class Bling #include // declaring the partial specialization namespace Rcpp { namespace traits { template SEXP wrap( const Bling& ) ; } } // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ \section[Extending Rcpp::as]{Extending \texttt{Rcpp::as}} Conversion from \proglang{R} to \proglang{C++} is also possible in both intrusive and non-intrusive ways. \subsection{Intrusive extension} As part of its template meta programming dispatch logic, \pkg{Rcpp::as} will attempt to use the constructor of the target class taking a \texttt{SEXP}. <>= #include #include class Foo{ public: Foo() ; // this constructor enables implicit Rcpp::as Foo(SEXP) ; } #include // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ \subsection{Non intrusive extension} It is also possible to fully specialize \texttt{Rcpp::as} to enable non intrusive implicit conversion capabilities. <>= #include // third party library that declares class Bar #include // declaring the specialization namespace Rcpp { template <> Bar as( SEXP ) ; } // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ \subsection{Templates and partial specialization} The signature of \texttt{Rcpp::as} does not allow partial specialization. When exposing a templated class to \texttt{Rcpp::as}, the programmer must specialize the \pkg{Rcpp::traits::Exporter} template class. The TMP dispatch will recognize that a specialization of \texttt{Exporter} is available and delegate the conversion to this class. \pkg{Rcpp} defines the \texttt{Rcpp::traits::Exporter} template class as follows : <>= namespace Rcpp { namespace traits { template class Exporter{ public: Exporter( SEXP x ) : t(x){} inline T get(){ return t ; } private: T t ; } ; } } @ This is the reason why the default behavior of \texttt{Rcpp::as} is to invoke the constructor of the type \texttt{T} taking a \texttt{SEXP}. Since partial specialization of class templates is allowed, we can expose a set of classes as follows: <>= #include // third party library that declares template class Bling #include // declaring the partial specialization namespace Rcpp { namespace traits { template class Exporter< Bling >; } } // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ Using this approach, the requirements for the \texttt{Exporter< Bling >} class are: \begin{itemize} \item it should have a constructor taking a \texttt{SEXP} \item it should have a methods called \texttt{get} that returns an instance of the \texttt{Bling} type. \end{itemize} <>= unlink( "code.cpp" ) @ \section{Summary} The \pkg{Rcpp} package greatly facilitates the transfer of objects between \proglang{R} and \proglang{C++}. This note has shown how to extend \pkg{Rcpp} to either user-defined or third-party classes via the \texttt{Rcpp::as} and \texttt{Rcpp::wrap} template functions. Both intrusive and non-intrusive approaches were discussed. \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/vignettes/Rcpp-attributes.Rnw0000644000000000000000000005374512273172722015236 0ustar \documentclass[11pt]{article} %\VignetteIndexEntry{Rcpp-attributes} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, attributes} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{1.25in}{1.25in}{1.25in}{1.25in} \usepackage{textcomp} \usepackage{color, alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} \newcommand{\code}[1]{\texttt{#1}} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.98\linewidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") @ \author{J.J. Allaire \and Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{\pkg{Rcpp} Attributes} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent \textsl{Rcpp attributes} provide a high-level syntax for declaring \proglang{C++} functions as callable from \proglang{R} and automatically generating the code required to invoke them. Attributes are intended to facilitate both interactive use of \proglang{C++} within \proglang{R} sessions as well as to support \proglang{R} package development. The implementation of attributes is based on previous work in the \pkg{inline} package \citep{CRAN:inline}. } \section{Introduction} Attributes are a new feature of \pkg{Rcpp} version 0.10.0 \citep{CRAN:Rcpp,JSS:Rcpp} that provide infrastructure for seamless language bindings between \proglang{R} and \proglang{C++}. The motivation for attributes is several-fold: \begin{enumerate} \item Reduce the learning curve associated with using C++ and R together \item Eliminate boilerplate conversion and marshaling code wherever possible \item Seamless use of C++ within interactive R sessions \item Unified syntax for interactive work and package development \end{enumerate} The core concept is to add annotations to \proglang{C++} source files that provide the context required to automatically generate \proglang{R} bindings to \proglang{C++} functions. Attributes and their supporting functions include: \begin{itemize} \item \texttt{Rcpp::export} attribute to export a \proglang{C++} function to \proglang{R} \item \texttt{sourceCpp} function to source exported functions from a file \item \texttt{cppFunction} and \texttt{evalCpp} functions for inline declarations and execution \item \texttt{Rcpp::depends} attribute for specifying additional build dependencies for \texttt{sourceCpp} \end{itemize} Attributes can also be used for package development via the \texttt{compileAttributes} function, which automatically generates \texttt{extern "C"} and \texttt{.Call} wrappers for \proglang{C++} functions within pacakges. \section{Using Attributes} Attributes are annotations that are added to C++ source files to provide additional information to the compiler. \pkg{Rcpp} supports attributes to indicate that C++ functions should be made available as R functions, as well as to optionally specify additional build dependencies for source files. \proglang{C++11} specifies a standard syntax for attributes \citep{Maurer+Wong:2008:AttributesInC++}. Since this standard isn't yet fully supported across all compilers, \pkg{Rcpp} attributes are included in source files using specially formatted comments. \subsection{Exporting C++ Functions} The \texttt{sourceCpp} function parses a \proglang{C++} file and looks for functions marked with the \texttt{Rcpp::export} attribute. A shared library is then built and its exported functions are made available as R functions in the specified environment. For example, this source file contains an implementation of convolve (note the \texttt{Rcpp::export} attribute in the comment above the function): <>= #include using namespace Rcpp; // [[Rcpp::export]] 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; } @ The addition of the export attribute allows us to do this from the \proglang{R} prompt: <>= sourceCpp("convolve.cpp") convolveCpp(x, y) @ We can now write \proglang{C++} functions using built-in \proglang{C++} types and \pkg{Rcpp} wrapper types and then source them just as we would an \proglang{R} script. The \texttt{sourceCpp} function performs caching based on the last modified date of the source file so as long as the source file does not change the compilation will occur only once per R session. \subsection{Specifying Argument Defaults} If default argument values are provided in the C++ function definition then these defaults are also used for the exported R function. For example, the following C++ function: <>= DataFrame readData( CharacterVector file, CharacterVector colNames = CharacterVector::create(), std::string commentChar = "#", bool header = true) @ Will be exported to R as: <>= function(file, colNames=character(), commentChar="#", header=TRUE) @ Note that C++ rules for default arguments still apply: they must occur consecutively at the end of the function signature and (unlike R) can't rely on the values of other arguments. Not all \proglang{C++} defualt argument values can be parsed into their \proglang{R} equivalents, however the most common cases are supported, including: \begin{itemize} \item String literals delimited by quotes (e.g. \texttt{"foo"}) \item Decimal numeric values (e.g. \texttt{10} or \texttt{4.5}) \item Pre-defined constants including \texttt{true}, \texttt{false}, \texttt{R\_NilValue}, \texttt{NA\_STRING}, \texttt{NA\_INTEGER}, \texttt{NA\_REAL}, and \texttt{NA\_LOGICAL}. \item Selected vector types (\texttt{CharacterVector}, \texttt{IntegerVector}, and \texttt{NumericVector}) instantiated using the \texttt{::create} static member function. \item \texttt{Matrix} types instantiated using the \texttt{rows}, \texttt{cols} constructor. \end{itemize} \pagebreak \subsection{Signaling Errors} Within \proglang{R} code the \texttt{stop} function is typically used to signal errors. Within \proglang{R} extensions written in \proglang{C} the \texttt{Rf\_error} function is typically used. However, within \proglang{C++} code you cannot safely use \texttt{Rf\_error} because it results in a \texttt{longjmp} over any \proglang{C++} destructors on the stack. The correct way to signal errors within \proglang{C++} functions is to throw an \\\texttt{Rcpp::exception}. For example: <>= if (unexpectedCondition) throw Rcpp::exception("Unexpected condition occurred"); @ There is also an \texttt{Rcpp::stop} function that is shorthand for throwing an \\\texttt{Rcpp::exception}. For example: <>= if (unexpectedCondition) Rcpp::stop("Unexpected condition occurred"); @ In both cases the \proglang{C++} exception will be caught by \pkg{Rcpp} prior to returning control to \proglang{R} and converted into the correct signal to \proglang{R} that execution should stop with the specified message. \subsection{Embedding R Code} Typically \proglang{C++} and \proglang{R} code are kept in their own source files. However, it's often convenient to bundle code from both languages into a common source file that can be executed using single call to \texttt{sourceCpp}. To embed chunks of \proglang{R} code within a \proglang{C++} source file you include the \proglang{R} code within a block comment that has the prefix of \texttt{/*** R}. For example: <>= /*** R # Call the fibonacci function defined in C++ fibonacci(10) */ @ Multiple \proglang{R} code chunks can be included in a \proglang{C++} file. The \texttt{sourceCpp} function will first compile the \proglang{C++} code into a shared library and then source the embedded \proglang{R} code. \pagebreak \subsection{Modifying Function Names} You can change the name of an exported function as it appears to \proglang{R} by adding a name parameter to \texttt{Rcpp::export}. For example: <>= // [[Rcpp::export(".convolveCpp")]] NumericVector convolveCpp(NumericVector a, NumericVector b) @ Note that in this case since the specified name is prefaced by a \code{.} the exported R function will be hidden. \subsection{Function Requirements} Functions marked with the \texttt{Rcpp::export} attribute must meet several requirements to be correctly handled: \begin{itemize} \item Be defined in the global namespace (i.e. not within a C++ namespace declaration) \item Have a return type that is either void or compatible with \texttt{Rcpp::wrap} and parameter types that are compatible with \texttt{Rcpp::as} (see sections 3.1 and 3.2 of the `\textsl{Rcpp-introduction}' vignette for more details). \item Use fully qualified type names for the return value and all parameters. Rcpp types may however appear without a namespace qualifier (i.e. \texttt{DataFrame} is okay as a type name but \texttt{std::string} must be specified fully). \end{itemize} \subsection{Random Number Generation} \proglang{R} functions implemented in \proglang{C} or \proglang{C++} need to be careful to surround use of internal random number geneneration routines (e.g. \texttt{unif\_rand}) with calls to \texttt{GetRNGstate} and \texttt{PutRNGstate}. Within \pkg{Rcpp}, this is typically done using the \texttt{RNGScope} class. However, this is not necessary for \proglang{C++} functions exported using attributes because an \texttt{RNGScope} is established for them automatically. Note that \pkg{Rcpp} implements \texttt{RNGScope} using a counter, so it's still safe to execute code that may establish it's own \texttt{RNGScope} (such as the \pkg{Rcpp} sugar functions that deal with random number generation). \pagebreak \subsection{Importing Dependencies} It's also possible to use the \texttt{Rcpp::depends} attribute to declare dependencies on other packages. For example: <>= // [[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); arma::colvec y(yr.begin(), yr.size(), false); arma::colvec coef = arma::solve(X, y); arma::colvec resid = y - X*coef; double sig2 = arma::as_scalar(arma::trans(resid)*resid/(n-k)); arma::colvec stderrest = arma::sqrt( sig2 * arma::diagvec( arma::inv(arma::trans(X)*X)) ); return List::create(Named("coefficients") = coef, Named("stderr") = stderrest); } @ The inclusion of the \texttt{Rcpp::depends} attribute causes \texttt{sourceCpp} to configure the build environment to correctly compile and link against the \pkg{RcppArmadillo} package. Source files can declare more than one dependency either by using multiple \texttt{Rcpp::depends} attributes or with syntax like this: <>= // [[Rcpp::depends(Matrix, RcppArmadillo)]] @ Dependencies are discovered both by scanning for package include directories and by invoking \pkg{inline} plugins if they are available for a package. Note that while the \texttt{Rcpp::depends} attribute establishes dependencies for \texttt{sourceCpp}, it's important to note that if you include the same source file in an \proglang{R} package these dependencies must still be listed in the \texttt{Depends} and \texttt{LinkingTo} fields of the package \texttt{DESCRIPTION} file. \subsection{Including C++ Inline} Maintaining C++ code in it's own source file provides several benefits including the ability to use \proglang{C++} aware text-editing tools and straightforward mapping of compilation errors to lines in the source file. However, it's also possible to do inline declaration and execution of C++ code. There are several ways to accomplish this, including passing a code string to \texttt{sourceCpp} or using the shorter-form \texttt{cppFunction} or \texttt{evalCpp} functions. For example: <>= cppFunction(' int fibonacci(const int x) { if (x < 2) return x; else return (fibonacci(x - 1)) + fibonacci(x - 2); } ') evalCpp('std::numeric_limits::max()') @ You can also specify a depends parameter to \texttt{cppFunction} or \texttt{evalCpp}: <>= cppFunction(depends = 'RcppArmadillo', code = '...') @ \section{Package Development} One of the goals of \pkg{Rcpp} attributes is to simultaneously facilitate ad-hoc and interactive work with \proglang{C++} while also making it very easy to migrate that work into an \proglang{R} package. There are several benefits of moving code from a standalone \proglang{C++} source file to a package: \begin{enumerate} \item Your code can be made available to users without \proglang{C++} development tools (at least on Windows or Mac OS X where binary packages are common) \item Multiple source files and their dependencies are handled automatically by the \proglang{R} package build system \item Packages provide additional infrastructure for testing, documentation and consistency \end{enumerate} \subsection{Package Creation} To create a package that is based on \pkg{Rcpp} you should follow the guidelines in the `\textsl{Rcpp-package}' vignette. For a new package this is most conveniently done using the \texttt{Rcpp.package.skeleton} function. To generate a new package with a simple hello, world function that uses attributes you can do the following: <>= Rcpp.package.skeleton("NewPackage", attributes = TRUE) @ To generate a package based on \proglang{C++} files that you've been using with \texttt{sourceCpp} you can use the \texttt{cpp\_files} parameter: <>= Rcpp.package.skeleton("NewPackage", example_code = FALSE, cpp_files = c("convolve.cpp")) @ \subsection{Specifying Dependencies} %% TODOD(DE) Rework in terms of Imports: Once you've migrated \proglang{C++} code into a package, the dependencies for source files are derived from the \texttt{Depends} and \texttt{LinkingTo} fields in the package \texttt{DESCRIPTION} file rather than the \texttt{Rcpp::depends} attribute. For every package you import C++ code from (including \pkg{Rcpp}) you need to add these entries. For example, if your package depends on \pkg{Rcpp} and \pkg{RcppArmadillo} you would have the following in your \texttt{DESCRIPTION} file: <>= Depends: Rcpp (>= 0.10.0), RcppArmadillo (>= 0.3.4.4) LinkingTo: Rcpp, RcppArmadillo @ Using a \texttt{Imports} declaration together with an \texttt{import} or \texttt{importFrom} statement in the file \texttt{NAMESPACE} is a more recent alternative. \subsection{Exporting R Functions} Within interactive sessions you call the \texttt{sourceCpp} function on individual files to export \proglang{C++} functions into the global environment. However, for packages you call a single utility function to export all \proglang{C++} functions within the package. The \texttt{compileAttributes} function scans the source files within a package for export attributes and generates code as required. For example, executing this from within the package working directory: <>= compileAttributes() @ Results in the generation of the following two source files: \begin{itemize} \item \texttt{src/RcppExports.cpp} -- The \texttt{extern "C"} wrappers required to call exported \proglang{C++} functions within the package. \item \texttt{R/RcppExports.R} -- The \texttt{.Call} wrappers required to call the \texttt{extern "C"} functions defined in \texttt{RcppExports.cpp}. \end{itemize} You should re-run \texttt{compileAttributes} whenever functions are added, removed, or have their signatures changed. The \texttt{compileAttributes} function deals only with exporting \proglang{C++} functions to \proglang{R}. If you want the functions to additionally be publicly available from your package's namespace another step may be required. Specifically, if your package \texttt{NAMESPACE} file does not use a pattern to export functions then you should add an explicit entry to \texttt{NAMESPACE} for each R function you want publicly available. \subsection{Roxygen Comments} The \pkg{roxygen2} package \citep{CRAN:roxygen2} provides a facility for automatically generating \proglang{R} documentation files based on specially formatted comments in \proglang{R} source code. If you include roxygen comments in your \proglang{C++} source file with a \texttt{//\textquotesingle} prefix then \texttt{compileAttributes} will transpose them into R roxygen comments within \texttt{R/RcppExports.R}. For example the following code in a \proglang{C++} source file: <>= //' The length of a string (in characters). //' //' @param str input character vector //' @return characters in each element of the vector // [[Rcpp::export]] NumericVector strLength(CharacterVector str) @ Results in the following code in the generated \proglang{R} source file: <>= #' The length of a string (in characters). #' #' @param str input character vector #' @return characters in each element of the vector strLength <- function(str) @ \subsection{Providing a C++ Interface} The interface exposed from \proglang{R} packages is most typically a set of \proglang{R} functions. However, the \proglang{R} package system also provides a mechanism to allow the exporting of \proglang{C} and \proglang{C++} interfaces using package header files. This is based on the \texttt{R\_RegisterCCallable} and \texttt{R\_GetCCallable} functions described in `\textsl{Writing R Extensions}' \citep{R:Extensions}. \proglang{C++} interfaces to a package are published within the top level \texttt{include} directory of the package (which within the package source directory is located at \texttt{inst/include}). The \proglang{R} build system automatically adds the required \texttt{include} directories for all packages specified in the \texttt{LinkingTo} field of the package \texttt{DESCRIPTION} file. \subsubsection{Interfaces Attribute} The \texttt{Rcpp::interfaces} attribute can be used to automatically generate a header-only interface to your \proglang{C++} functions within the \texttt{include} directory of your package. The \texttt{Rcpp::interfaces} attribute is specified on a per-source file basis, and indicates which interfaces (\proglang{R}, \proglang{C++}, or both) should be provided for exported functions within the file. For example, the following specifies that both R and \proglang{C++} interfaces should be generated for a source file: <>= // [[Rcpp::interfaces(r, cpp)]] @ Note that the default behavior if an \texttt{Rcpp::interfaces} attribute is not included in a source file is to generate an R interface only. \subsubsection{Generated Code} If you request a \texttt{cpp} interface for a source file then \texttt{compileAttributes} generates the following header files (substituting \emph{Package} with the name of the package code is being generated for): <>= inst/include/Package.h inst/include/Package_RcppExports.h @ The \texttt{Package\_RcppExports.h} file has inline definitions for all exported \proglang{C++} functions that enable calling them using the \texttt{R\_GetCCallable} mechanism. The \texttt{Package.h} file does nothing other than include the \texttt{Package\_RcppExports.h} header. This is done so that package authors can replace the \texttt{Package.h} header with a custom one and still be able to include the automatically generated exports (details on doing this are provided in the next section). The exported functions are defined within a \proglang{C++} namespace that matches the name of the package. For example, an exported \proglang{C++} function \texttt{bar} could be called from package \texttt{MyPackage} as follows: <>= // [[Rcpp::depends(MyPackage)]] #include void foo() { MyPackage::bar(); } @ \subsubsection{Including Additional Code} You might wish to use the \texttt{Rcpp::interfaces} attribute to generate a part of your package's \proglang{C++} interface but also provide additional custom \proglang{C++} code. In this case you should replace the generated \texttt{Package.h} file with one of your own. Note that the way \pkg{Rcpp} distinguishes user verses generated files is by checking for the presence a special token in the file (if it's present then it's known to be generated and thus safe to overwrite). You'll see this token at the top of the generated \texttt{Package.h} file, be sure to remove it if you want to provide a custom header. Once you've established a custom package header file, you need only include the \texttt{Package\_RcppExports.h} file within your header to make available the automatically generated code alongside your own. If you need to include code from your custom header files within the compilation of your package source files, you will also need to add the following entry to \texttt{Makevars} and \texttt{Makevars.win} (both are in the \texttt{src} directory of your package): <>= PKG_CPPFLAGS += -I../inst/include/ @ Note that the R package build system does not automatically force a rebuild when headers in \texttt{inst/include} change, so you should be sure to perform a full rebuild of the package after making changes to these headers. \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/vignettes/.install_extras0000644000000000000000000000003112253723677014500 0ustar Rcpp.bib rcpp.index.html rcpp-0.11.0/vignettes/Rcpp-quickref.Rnw0000644000000000000000000002276112253723677014664 0ustar \documentclass[8pt,twocolumn,a4paper]{article} %\VignetteIndexEntry{Rcpp-quickref} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, reference} %\VignetteDepends{Rcpp} \setlength{\hoffset}{-0.8in} \setlength{\voffset}{-0.8in} \setlength{\marginparwidth}{0pt} \setlength{\marginparsep}{0pt} \setlength{\oddsidemargin}{0pt} \setlength{\headheight}{0pt} \setlength{\topmargin}{0pt} \setlength{\headsep}{0pt} \setlength{\footskip}{0pt} \setlength{\textheight}{27cm} \setlength{\textwidth}{20cm} \usepackage[colorlinks]{hyperref} \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} <>= options( width= 50) library( "Rcpp" ) prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") @ \author{Romain Fran\c{c}ois \and Dirk Eddelbuettel} \title{\pkg{Rcpp} Quick Reference Guide} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \newsavebox{\quickrefbox} \definecolor{quickrefBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{quickrefBorder}{rgb}{0,0,0} \renewenvironment{Hchunk}% {% \vspace{0.5em}\noindent\begin{lrbox}{\quickrefbox}% \begin{minipage}[b]{.42\textwidth}% }% {% \end{minipage}% \end{lrbox}% \fcolorbox{quickrefBorder}{quickrefBg}{\usebox{\quickrefbox}}% \vspace{0.5em}}% \begin{document} \maketitle \thispagestyle{empty} % without the ~, latex does not want to newline % a newline between paragraph and code disconnects them and can orphan heading \paragraph{Important Notes}~ \newline <>= // If you experience compiler errors, please check that you have an appropriate version of g++. See `Rcpp-FAQ' for more information. // Many of the examples here imply the following: using namespace Rcpp; // The inline package adds this for you. Alternately, use e.g.: Rcpp::NumericVector xx(10); @ \paragraph{Create simple vectors}~ \newline <>= SEXP x; std::vector y(10); // from SEXP NumericVector xx(x); // of a given size (filled with 0) NumericVector xx(10); // ... with a default for all values NumericVector xx(10, 2.0); // range constructor NumericVector xx( y.begin(), y.end() ); // using create NumericVector xx = NumericVector::create( 1.0, 2.0, 3.0, 4.0 ); NumericVector yy = NumericVector::create( Named["foo"] = 1.0, _["bar"] = 2.0 ); // short for Named @ \paragraph{Extract and set single elements}~ \newline <>= // extract single values double x0 = xx[0]; double x1 = xx(1); double y0 = yy["foo"]; double y1 = yy["bar"]; // set single values xx[0] = 2.1; xx(1) = 4.2; yy["foo"] = 3.0; // grow the vector yy["foobar"] = 10.0; @ \paragraph{Using matrices}~ \newline <>= // Initializing from SEXP, // dimensions handled automatically SEXP x; NumericMatrix xx(x); // Matrix of 4 rows & 5 columns (filled with 0) NumericMatrix xx(4, 5); // Fill with value int xsize = xx.nrow() * xx.ncol(); for (int i = 0; i < xsize; i++) { xx[i] = 7; } // Same as above, using STL fill std::fill(xx.begin(), xx.end(), 8); // Assign this value to single element // (1st row, 2nd col) xx(0,1) = 4; // Reference the second column // Changes propagate to xx (same applies for Row) NumericMatrix::Column zzcol = xx( _, 1); zzcol = zzcol * 2; // Copy the second column into new object NumericVector zz1 = xx( _, 1); // Copy the submatrix (top left 3x3) into new object NumericMatrix zz2 = xx( Range(0,2), Range(0,2)); @ \paragraph{Inline}~ \newline <>= ## Note - this is R code. inline allows rapid testing. require(inline) testfun = cxxfunction( signature(x="numeric", i="integer"), body = ' NumericVector xx(x); int ii = as(i); xx = xx * ii; return( xx ); ', plugin="Rcpp") testfun(1:5, 3) @ \paragraph{Interface with R}~ \newline <>= ## In R, create a package shell. For details, see the "Writing R Extensions" manual. Rcpp.package.skeleton("myPackage") ## Add R code to pkg R/ directory. Call C++ function. Do type-checking in R. myfunR = function(Rx, Ry) { ret = .Call("myCfun", Rx, Ry, package="myPackage") return(ret) } // Add C++ code to pkg src/ directory. using namespace Rcpp; // Define function as extern with RcppExport RcppExport SEXP myCfun( SEXP x, SEXP y) { // If R/C++ types match, use pointer to x. Pointer is faster, but changes to xx propagate to R ( xx -> x == Rx). NumericVector xx(x); // clone is slower and uses extra memory. Safe, R-like. NumericVector yy(clone(y)); xx[0] = yy[0] = -1.5; int zz = xx[0]; // use wrap() to return non-SEXP objects, e.g: // return(wrap(zz)); // Build and return a list List ret; ret["x"] = xx; ret["y"] = yy; return(ret); } ## From shell, above package directory R CMD check myPackage ## Optional R CMD INSTALL myPackage ## In R: require(myPackage) aa = 1.5; bb = 1.5; cc = myfunR(aa, bb) aa == bb ## FALSE, C++ modifies aa aa = 1:2; bb = 1:2; cc = myfunR(aa, bb) identical(aa, bb) ## TRUE, R/C++ types don't match @ \paragraph{STL interface}~ \newline <>= // sum a vector from beginning to end double s = std::accumulate(x.begin(), x.end(), 0.0); // prod of elements from beginning to end int p = std::accumulate(vec.begin(), vec.end(), 1, std::multiplies()); // inner_product to compute sum of squares double s2 = std::inner_product(res.begin(), res.end(), res.begin(), 0.0); @ \paragraph{Function}~ \newline <>= Function rnorm("rnorm"); rnorm(100, _["mean"] = 10.2, _["sd"] = 3.2 ); @ \paragraph{Environment}~ \newline <>= Environment stats("package:stats"); Environment env( 2 ); // by position // special environments Environment::Rcpp_namespace(); Environment::base_env(); Environment::base_namespace(); Environment::global_env(); Environment::empty_env(); Function rnorm = stats["rnorm"]; glob["x"] = "foo"; glob["y"] = 3; std::string x = glob["x"]; glob.assign( "foo" , 3 ); int foo = glob.get( "foo" ); int foo = glob.find( "foo" ); CharacterVector names = glob.ls() bool b = glob.exists( "foo" ); glob.remove( "foo" ); glob.lockBinding("foo"); glob.unlockBinding("foo"); bool b = glob.bindingIsLocked("foo"); bool b = glob.bindingIsActive("foo"); Environment e = stats.parent(); Environment e = glob.new_child(); @ \paragraph{Modules}~ \newline <>= // Warning -- At present, module-based objects do not persist across quit(save="yes")/reload cycles. To be safe, save results to R objects and remove module objects before exiting R. // To create a module-containing package from R, use: Rcpp.package.skeleton("mypackage",module=TRUE) // You will need to edit the RcppModules: line of the DESCRIPTION file to match your module name (in this example, from yada to mod_bar). class Bar { public: Bar(double x_) : x(x_), nread(0), nwrite(0) {} double get_x( ) { nread++; return x; } void set_x( double x_) { nwrite++; x = x_; } IntegerVector stats() const { return IntegerVector::create( _["read"] = nread, _["write"] = nwrite); } private: double x; int nread, nwrite; }; RCPP_MODULE(mod_bar) { class_( "Bar" ) .constructor() .property( "x", &Bar::get_x, &Bar::set_x, "Docstring for x" ) .method( "stats", &Bar::stats, "Docstring for stats") ;} ## The following is R code. require(mypackage); show(Bar) b <- new(Bar, 10); b$x <- 10 b_persist <- list(stats=b$stats(), x=b$x) rm(b) @ \newpage \paragraph{Rcpp sugar}~ \newline <>= NumericVector x = NumericVector::create( -2.0, -1.0, 0.0, 1.0, 2.0 ); IntegerVector y = IntegerVector::create( -2, -1, 0, 1, 2 ); NumericVector xx = abs( x ); IntegerVector yy = abs( y ); bool b = all( x < 3.0 ).is_true() ; bool b = any( y > 2 ).is_true(); NumericVector xx = ceil( x ); NumericVector xx = ceiling( x ); NumericVector yy = floor( y ); NumericVector yy = floor( y ); NumericVector xx = exp( x ); NumericVector yy = exp( y ); NumericVector xx = head( x, 2 ); IntegerVector yy = head( y, 2 ); IntegerVector xx = seq_len( 10 ); IntegerVector yy = seq_along( y ); NumericVector xx = rep( x, 3 ); NumericVector xx = rep_len( x, 10 ); NumericVector xx = rep_each( x, 3 ); IntegerVector yy = rev( y ); @ \paragraph{Random functions}~ \newline <>= // Set seed RNGScope scope; // For details see Section 6.7.1--Distribution functions of the `Writing R Extensions' manual. In some cases (e.g. rnorm), distribution-specific arguments can be omitted; when in doubt, specify all dist-specific arguments. The use of doubles rather than integers for dist-specific arguments is recommended. Unless explicitly specified, log=FALSE. // Equivalent to R calls NumericVector xx = runif(20); NumericVector xx1 = rnorm(20); NumericVector xx1 = rnorm(20, 0); NumericVector xx1 = rnorm(20, 0, 1); // Example vector of quantiles NumericVector quants(5); for (int i = 0; i < 5; i++) { quants[i] = (i-2); } // in R, dnorm(-2:2) NumericVector yy = dnorm(quants) ; NumericVector yy = dnorm(quants, 0.0, 1.0) ; // in R, dnorm(-2:2, mean=2, log=TRUE) NumericVector yy = dnorm(quants, 2.0, true) ; // Note - cannot specify sd without mean // in R, dnorm(-2:2, mean=0, sd=2, log=TRUE) NumericVector yy = dnorm(quants, 0.0, 2.0, true) ; // To get original R api, use Rf_* double zz = Rf_rnorm(0, 2); @ \end{document} rcpp-0.11.0/vignettes/Rcpp-package.Rnw0000644000000000000000000004031712273016501014422 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-package} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, package} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color,alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} \newcommand{\code}[1]{\texttt{#1}} \newcommand{\rdoc}[2]{\href{http://www.rdocumentation.org/packages/#1/functions/#2}{\code{#2}}} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") require(Rcpp) require(highlight) @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{Writing a package that uses \pkg{Rcpp} } \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This document provides a short overview of how to use \pkg{Rcpp}~\citep{CRAN:Rcpp,JSS:Rcpp,Eddelbuettel:2013:Rcpp} when writing an \proglang{R} package. It shows how usage of the function \rdoc{Rcpp}{Rcpp.package.skeleton} which creates a complete and self-sufficient example package using \pkg{Rcpp}. All components of the directory tree created by \rdoc{Rcpp}{Rcpp.package.skeleton} are discussed in detail. This document thereby complements the \textsl{Writing R Extensions} manual~\citep{R:Extensions} which is the authoritative source on how to extend \proglang{R} in general. } \section{Introduction} \pkg{Rcpp}~\citep{CRAN:Rcpp,JSS:Rcpp,Eddelbuettel:2013:Rcpp} is an extension package for \proglang{R} which offers an easy-to-use yet featureful interface between \proglang{C++} and \proglang{R}. However, it is somewhat different from a traditional \proglang{R} package because its key component is a \proglang{C++} library. A client package that wants to make use of the \pkg{Rcpp} features must link against the library provided by \pkg{Rcpp}. It should be noted that \proglang{R} has only limited support for \proglang{C(++)}-level dependencies between packages~\citep{R:Extensions}. The \texttt{LinkingTo} declaration in the package \texttt{DESCRIPTION} file allows the client package to retrieve the headers of the target package (here \pkg{Rcpp}), but support for linking against a library is not provided by \proglang{R} and has to be added manually. This document follows the steps of the \rdoc{Rcpp}{Rcpp.package.skeleton} function to illustrate a recommended way of using \pkg{Rcpp} from a client package. We illustrate this using a simple \proglang{C++} function which will be called by an \proglang{R} function. We strongly encourage the reader to become familiar with the material in the \textsl{Writing R Extensions} manual~\citep{R:Extensions}, as well as with other documents on \proglang{R} package creation such as \cite{Leisch:2008:Tutorial}. Given a basic understanding of how to create \proglang{R} package, the present document aims to provide the additional information on how to use \pkg{Rcpp} in such add-on packages. \section{Using \texttt{Rcpp.package.skeleton}} \subsection{Overview} \pkg{Rcpp} provides a function \rdoc{Rcpp}{Rcpp.package.skeleton}, modeled after the base \proglang{R} function \rdoc{utils}{package.skeleton}, which facilitates creation of a skeleton package using \pkg{Rcpp}. \rdoc{Rcpp}{Rcpp.package.skeleton} has a number of arguments documented on its help page (and similar to those of \rdoc{utils}{package.skeleton}). The main argument is the first one which provides the name of the package one aims to create by invoking the function. An illustration of a call using an argument \texttt{mypackage} is provided below. <>= Rcpp.package.skeleton("mypackage") @ \begin{Hchunk} \begin{verbatim} $ ls -1R mypackage/ DESCRIPTION NAMESPACE R Read-and-delete-me man src mypackage/R: RcppExports.R mypackage/man: mypackage-package.Rd rcpp_hello_world.Rd mypackage/src: Makevars ## up until Rcpp 0.10.6, see below Makevars.win ## up until Rcpp 0.10.6, see below RcppExports.cpp rcpp_hello_world.cpp $ \end{verbatim} \end{Hchunk} Using \rdoc{Rcpp}{Rcpp.package.skeleton} is by far the simplest approach as it fulfills two roles. It creates the complete set of files needed for a package, and it also includes the different components needed for using \pkg{Rcpp} that we discuss in the following sections. \subsection{\proglang{C++} code} If the \texttt{attributes} argument is set to \texttt{TRUE}\footnote{Setting \texttt{attributes} to \texttt{TRUE} is the default. This document does not cover the behavior of \texttt{Rcpp.package.skeleton} when \texttt{attributes} is set to \texttt{FALSE} as we try to encourage package developpers to use attributes. }, the following \proglang{C++} file is included in the \texttt{src/} directory: <>= #include using namespace Rcpp; // [[Rcpp::export]] List rcpp_hello_world() { CharacterVector x = CharacterVector::create( "foo", "bar" ) ; NumericVector y = NumericVector::create( 0.0, 1.0 ) ; List z = List::create( x, y ) ; return z ; } @ The file defines the simple \texttt{rcpp\_hello\_world} function that uses a few \pkg{Rcpp} classes and returns a \texttt{List}. This function is preceded by the \texttt{Rcpp::export} attribute to automatically handle argument conversion because \proglang{R} has to be taught how to e.g. handle the \texttt{List} class. \rdoc{Rcpp}{Rcpp.package.skeleton} then invokes \rdoc{Rcpp}{compileAttributes} on the package, which generates the \texttt{RcppExports.cpp} file: <>= // This file was generated by Rcpp::compileAttributes // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include using namespace Rcpp; // rcpp_hello_world List rcpp_hello_world(); RcppExport SEXP mypackage_rcpp_hello_world() { BEGIN_RCPP SEXP __sexp_result; { Rcpp::RNGScope __rngScope; List __result = rcpp_hello_world(); PROTECT(__sexp_result = Rcpp::wrap(__result)); } UNPROTECT(1); return __sexp_result; END_RCPP } @ This file defines a function with the appropriate calling convention, suitable for \rdoc{base}{.Call}. It needs to be regenerated each time functions exposed by attributes are modified. This is the task of the \rdoc{Rcpp}{compileAttributes} function. A discussion on attributes is beyond the scope of this document and more information is available in the attributes vignette \citep{CRAN:Rcpp:Attributes}. \subsection{\proglang{R} code} The \rdoc{Rcpp}{compileAttributes} also generates \proglang{R} code that uses the \proglang{C++} function. <>= # This file was generated by Rcpp::compileAttributes # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 rcpp_hello_world <- function() { .Call('mypackage_rcpp_hello_world', PACKAGE = 'mypackage') } @ This is also a generated file so it should not be modified manually, rather regenerated as needed by \rdoc{Rcpp}{compileAttributes}. \subsection{\texttt{DESCRIPTION}} The skeleton generates an appropriate \texttt{DESCRIPTION} file, using both \texttt{Imports:} and \texttt{LinkingTo} for \pkg{Rcpp}: \begin{Hchunk} \begin{verbatim} Package: mypackage Type: Package Title: What the package does (short line) Version: 1.0 Date: 2013-09-17 Author: Who wrote it Maintainer: Who to complain to Description: More about what it does (maybe more than one line) License: What Licence is it under ? Imports: Rcpp (>= 0.11.0) LinkingTo: Rcpp \end{verbatim} \end{Hchunk} \rdoc{Rcpp}{Rcpp.package.skeleton} adds the three last lines to the \texttt{DESCRIPTION} file generated by \rdoc{utils}{package.skeleton}. The \texttt{Imports} declaration indicates \proglang{R}-level dependency between the client package and \pkg{Rcpp}; code from the latter is being imported into the package described here. The \texttt{LinkingTo} declaration indicates that the client package needs to use header files exposed by \pkg{Rcpp}. \subsection{Now optional: \texttt{Makevars} and \texttt{Makevars.win}} This behaviour changed with \pkg{Rcpp} release 0.11.0. These files used to be mandatory, now they are merely optional. We will describe the old setting first as it was in use for a few years. The new standard, however, is much easier and is described below. \subsubsection{Releases up until 0.10.6} Unfortunately, the \texttt{LinkingTo} declaration in itself was not enough to link to the user \proglang{C++} library of \pkg{Rcpp}. Until more explicit support for libraries is added to \proglang{R}, ones needes to manually add the \pkg{Rcpp} library to the \texttt{PKG\_LIBS} variable in the \texttt{Makevars} and \texttt{Makevars.win} files. (This has now changed with release 0.11.0; see below). \pkg{Rcpp} provides the unexported function \texttt{Rcpp:::LdFlags()} to ease the process: \begin{Hchunk} \begin{verbatim} ## Use the R_HOME indirection to support installations of multiple R version PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` ## As an alternative, one can also add this code in a file 'configure' ## ## PKG_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"` ## ## sed -e "s|@PKG_LIBS@|${PKG_LIBS}|" \ ## src/Makevars.in > src/Makevars ## ## which together with the following file 'src/Makevars.in' ## ## PKG_LIBS = @PKG_LIBS@ ## ## can be used to create src/Makevars dynamically. This scheme is more ## powerful and can be expanded to also check for and link with other ## libraries. It should be complemented by a file 'cleanup' ## ## rm src/Makevars ## ## which removes the autogenerated file src/Makevars. ## ## Of course, autoconf can also be used to write configure files. This is ## done by a number of packages, but recommended only for more advanced users ## comfortable with autoconf and its related tools. \end{verbatim} \end{Hchunk} The \texttt{Makevars.win} is the equivalent, targeting windows. \begin{Hchunk} \begin{verbatim} ## Use the R_HOME indirection to support installations of multiple R version PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()") \end{verbatim} \end{Hchunk} \subsubsection{Releases since 0.11.0} As of release 0.11.0, this is no longer needed as client packages obtain the required code from \pkg{Rcpp} via explicit function registration. The user does not have to do anything. This means that \code{PKG\_LIBS} can now be empty---unless some client libraries are needed. For example, \pkg{RcppCNPy} needs compression support and hence uses \code{PKG\_LIBS= -lz}. Similarly, when a third-party library is required, it can and should be set here. \subsection{\texttt{NAMESPACE}} The \rdoc{Rcpp}{Rcpp.package.skeleton} function also creates a file \texttt{NAMESPACE}. \begin{Hchunk} \begin{verbatim} useDynLib(mypackage) exportPattern("^[[:alpha:]]+") importFrom{Rcpp, evalCpp} \end{verbatim} \end{Hchunk} This file serves three purposes. First, it ensure that the dynamic library contained in the package we are creating via \rdoc{Rcpp}{Rcpp.package.skeleton} will be loaded and thereby made available to the newly created \proglang{R} package. Second, it declares which functions should be globally visible from the namespace of this package. As a reasonable default, we export all functions. Third, it instructs R to import a symbol from \pkg{Rcpp}. This sets up the import of all registered function and, together with the \code{Imports:} statement in \code{DESCRIPTION}, provides what is needed for client packages to access \pkg{Rcpp} functionality. \subsection{Help files} Also created is a directory \texttt{man} containing two help files. One is for the package itself, the other for the (single) \proglang{R} function being provided and exported. The \textsl{Writing R Extensions} manual~\citep{R:Extensions} provides the complete documentation on how to create suitable content for help files. \subsubsection{\texttt{mypackage-package.Rd}} The help file \texttt{mypackage-package.Rd} can be used to describe the new package. \begin{Hchunk} \begin{verbatim} \name{mypackage-package} \alias{mypackage-package} \alias{mypackage} \docType{package} \title{ What the package does (short line) } \description{ More about what it does (maybe more than one line) ~~ A concise (1-5 lines) description of the package ~~ } \details{ \tabular{ll}{ Package: \tab mypackage\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2013-09-17\cr License: \tab What license is it under?\cr } ~~ An overview of how to use the package, including the most important functions ~~ } \author{ Who wrote it Maintainer: Who to complain to } \references{ ~~ Literature or other references for background information ~~ } ~~ Optionally other standard keywords, one per line, from file KEYWORDS in the R documentation directory ~~ \keyword{ package } \seealso{ ~~ Optional links to other man pages, e.g. ~~ ~~ \code{\link[:-package]{}} ~~ } \examples{ %% ~~ simple examples of the most important functions ~~ } \end{verbatim} \end{Hchunk} \subsubsection{\texttt{rcpp\_hello\_world.Rd}} The help file \texttt{rcpp\_hello\_world.Rd} serves as documentation for the example \proglang{R} function. \begin{Hchunk} \begin{verbatim} \name{rcpp_hello_world} \alias{rcpp_hello_world} \docType{package} \title{ Simple function using Rcpp } \description{ Simple function using Rcpp } \usage{ rcpp_hello_world() } \examples{ \dontrun{ rcpp_hello_world() } } \end{verbatim} \end{Hchunk} \section{Using modules} This document does not cover the use of the \texttt{module} argument of \rdoc{Rcpp}{Rcpp.package.skeleton}. It is covered in the modules vignette \citep{CRAN:Rcpp:Modules}. \section{Further examples} The canonical example of a package that uses \pkg{Rcpp} is the \pkg{RcppExamples} \citep{CRAN:RcppExamples} package. \pkg{RcppExamples} contains various examples of using \pkg{Rcpp}. Hence, the \pkg{RcppExamples} package is provided as a template for employing \pkg{Rcpp} in packages. Other CRAN packages using the \pkg{Rcpp} package are \pkg{RcppArmadillo} \citep{CRAN:RcppArmadillo}, and \pkg{minqa} \citep{CRAN:minqa}. Several other packages follow older (but still supported and appropriate) instructions. They can serve examples on how to get data to and from \proglang{C++} routines, but should not be considered templates for how to connect to \pkg{Rcpp}. The full list of packages using \pkg{Rcpp} can be found at the \href{http://CRAN.R-project.org/package=Rcpp}{CRAN page} of \pkg{Rcpp}. \section{Other compilers} Less experienced \proglang{R} users on the Windows platform frequently ask about using \pkg{Rcpp} with the Visual Studio toolchain. That is simply not possible as \proglang{R} is built with the \pkg{gcc} compiler. Different compilers have different linking conventions. These conventions are particularly hairy when it comes to using \proglang{C++}. In short, it is not possible to simply drop sources (or header files) from \pkg{Rcpp} into a \proglang{C++} project built with Visual Studio, and this note makes no attempt at claiming otherwise. \pkg{Rcpp} is fully usable on Windows provided the standard Windows toolchain for \proglang{R} is used. See the \textsl{Writing R Extensions} manual~\citep{R:Extensions} for details. \section{Summary} This document described how to use the \pkg{Rcpp} package for \proglang{R} and \proglang{C++} integration when writing an \proglang{R} extension package. The use of the \rdoc{Rcpp}{Rcpp.package.skeleton} was shown in detail, and references to further examples were provided. \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/vignettes/Rcpp-sugar.Rnw0000644000000000000000000005673112273061123014157 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-sugar} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, syntactic sugar} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color, alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} \newcommand{\sugar}{\textsl{Rcpp sugar}} \newcommand{\ith}{\textsl{i}-\textsuperscript{th}} \newcommand{\code}[1]{\texttt{#1}} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{\pkg{Rcpp} syntactic sugar} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This note describes \sugar~which has been introduced in version 0.8.3 of \pkg{Rcpp} \citep{CRAN:Rcpp,JSS:Rcpp}. \sugar~ brings a higher-level of abstraction to \proglang{C++} code written using the \pkg{Rcpp} API. \sugar~is based on expression templates \citep{Abrahams+Gurtovoy:2004:TemplateMetaprogramming,Vandevoorde+Josuttis:2003:Templates} and provides some 'syntactic sugar' facilities directly in \pkg{Rcpp}. This is similar to how \pkg{RcppArmadillo} \citep{CRAN:RcppArmadillo} offers linear algebra \proglang{C++} classes based on \pkg{Armadillo} \citep{Sanderson:2010:Armadillo}. % TODO: reference to armadillo, blitz, etc ... } \section{Motivation} \pkg{Rcpp} facilitates development of internal compiled code in an \proglang{R} package by abstracting low-level details of the \proglang{R} API \citep{R:Extensions} into a consistent set of \proglang{C++} classes. Code written using \pkg{Rcpp} classes is easier to read, write and maintain, without loosing performance. Consider the following code example which provides a function \texttt{foo} as a \proglang{C++} extension to \proglang{R} by using the \pkg{Rcpp} API: <>= RcppExport SEXP foo( SEXP x, SEXP y){ Rcpp::NumericVector xx(x), yy(y) ; int n = xx.size() ; Rcpp::NumericVector res( n ) ; double x_ = 0.0, y_ = 0.0 ; for( int i=0; i>= foo <- function(x, y){ ifelse( x < y, x*x, -(y*y) ) } @ Put succinctly, the motivation of \sugar~is to bring a subset of the high-level \proglang{R} syntax in \proglang{C++}. Hence, with \sugar, the \proglang{C++} version of \texttt{foo} now becomes: <>= RcppExport SEXP foo( SEXP xs, SEXP ys){ Rcpp::NumericVector x(xs) ; Rcpp::NumericVector y(ys) ; return Rcpp::wrap( ifelse( x < y, x*x, -(y*y) )) ; } @ Apart from the fact that we need to assign the two objects we obtain from \proglang{R}---which is a simple statement each thanks to the template magic in \pkg{Rcpp}---and the need for explicit \texttt{return} and \texttt{Rcpp::wrap} statements, the code is now identical between highly-vectorised \proglang{R} and \proglang{C++}. \sugar~is written using expression templates and lazy evaluation techniques \citep{Abrahams+Gurtovoy:2004:TemplateMetaprogramming,Vandevoorde+Josuttis:2003:Templates}. This not only allows a much nicer high-level syntax, but also makes it rather efficient (as we detail in section~\ref{sec:performance} below). \section{Operators} \sugar~takes advantage of \proglang{C++} operator overloading. The next few sections discuss several examples. \subsection{Binary arithmetic operators} \sugar~defines the usual binary arithmetic operators : \texttt{+}, \texttt{-}, \texttt{*}, \texttt{/}. <>= // two numeric vectors of the same size NumericVector x ; NumericVector y ; // expressions involving two vectors NumericVector res = x + y ; NumericVector res = x - y ; NumericVector res = x * y ; NumericVector res = x / y ; // one vector, one single value NumericVector res = x + 2.0 ; NumericVector res = 2.0 - x; NumericVector res = y * 2.0 ; NumericVector res = 2.0 / y; // two expressions NumericVector res = x * y + y / 2.0 ; NumericVector res = x * ( y - 2.0 ) ; NumericVector res = x / ( y * y ) ; @ The left hand side (lhs) and the right hand side (rhs) of each binary arithmetic expression must be of the same type (for example they should be both \texttt{numeric} expressions). The lhs and the rhs can either have the same size or one of them could be a primitive value of the appropriate type, for example adding a \texttt{NumericVector} and a \texttt{double}. \subsection{Binary logical operators} Binary logical operators create a \texttt{logical} sugar expression from either two sugar expressions of the same type or one sugar expression and a primitive value of the associated type. <>= // two integer vectors of the same size NumericVector x ; NumericVector y ; // expressions involving two vectors LogicalVector res = x < y ; LogicalVector res = x > y ; LogicalVector res = x <= y ; LogicalVector res = x >= y ; LogicalVector res = x == y ; LogicalVector res = x != y ; // one vector, one single value LogicalVector res = x < 2 ; LogicalVector res = 2 > x; LogicalVector res = y <= 2 ; LogicalVector res = 2 != y; // two expressions LogicalVector res = ( x + y ) < ( x*x ) ; LogicalVector res = ( x + y ) >= ( x*x ) ; LogicalVector res = ( x + y ) == ( x*x ) ; @ \subsection{Unary operators} The unary \texttt{operator-} can be used to negate a (numeric) sugar expression. whereas the unary \texttt{operator!} negates a logical sugar expression: <>= // a numeric vector NumericVector x ; // negate x NumericVector res = -x ; // use it as part of a numerical expression NumericVector res = -x * ( x + 2.0 ) ; // two integer vectors of the same size NumericVector y ; NumericVector z ; // negate the logical expression "y < z" LogicalVector res = ! ( y < z ); @ \section{Functions} \sugar~defines functions that closely match the behavior of \proglang{R} functions of the same name. \subsection{Functions producing a single logical result} Given a logical sugar expression, the \texttt{all} function identifies if all the elements are \texttt{TRUE}. Similarly, the \texttt{any} function identifies if any the element is \texttt{TRUE} when given a logical sugar expression. <>= IntegerVector x = seq_len( 1000 ) ; all( x*x < 3 ) ; any( x*x < 3 ) ; @ Either call to \texttt{all} and \texttt{any} creates an object of a class that has member functions \texttt{is\_true}, \texttt{is\_false}, \texttt{is\_na} and a conversion to \texttt{SEXP} operator. One important thing to highlight is that \texttt{all} is lazy. Unlike \proglang{R}, there is no need to fully evaluate the expression. In the example above, the result of \texttt{all} is fully resolved after evaluating only the two first indices of the expression \verb|x * x < 3|. \texttt{any} is lazy too, so it will only need to resolve the first element of the example above. %\subsubsection{Conversion to bool} One important thing to note concernc the conversion to the \texttt{bool} type. In order to respect the concept of missing values (\texttt{NA}) in \proglang{R}, expressions generated by \texttt{any} or \texttt{all} can not be converted to \texttt{bool}. Instead one must use \texttt{is\_true}, \texttt{is\_false} or \texttt{is\_na}: <>= // wrong: will generate a compile error bool res = any( x < y) ) ; // ok bool res = is_true( any( x < y ) ) bool res = is_false( any( x < y ) ) bool res = is_na( any( x < y ) ) @ % FIXME this may need some expanding the trivariate bool and how to use it \subsection{Functions producing sugar expressions} \subsubsection{is\_na} Given a sugar expression of any type, \verb|is_na| (just like the other functions in this section) produces a logical sugar expression of the same length. Each element of the result expression evaluates to \texttt{TRUE} if the corresponding input is a missing value, or \texttt{FALSE} otherwise. <>= IntegerVector x = IntegerVector::create( 0, 1, NA_INTEGER, 3 ) ; is_na( x ) all( is_na( x ) ) any( ! is_na( x ) ) @ \subsubsection{seq\_along} Given a sugar expression of any type, \texttt{seq\_along} creates an integer sugar expression whose values go from 1 to the sire of the input. <>= IntegerVector x = IntegerVector::create( 0, 1, NA_INTEGER, 3 ) ; seq_along( x ) seq_along( x * x * x * x * x * x * x ) @ This is the most lazy function, as it only needs to call the \texttt{size} member function of the input expression. The input expression need not to be resolved. The two examples above gives the same result with the same efficiency at runtime. The compile time will be affected by the complexity of the second expression, since the abstract syntax tree is built at compile time. \subsubsection{seq\_len} \texttt{seq\_len} creates an integer sugar expression whose \ith\ element expands to \texttt{i}. \texttt{seq\_len} is particularly useful in conjunction with \texttt{sapply} and \texttt{lapply}. <>= // 1, 2, ..., 10 IntegerVector x = seq_len( 10 ) ; lapply( seq_len(10), seq_len ) @ \subsubsection{pmin and pmax} Given two sugar expressions of the same type and size, or one expression and one primitive value of the appropriate type, \texttt{pmin} (\texttt{pmax}) generates a sugar expression of the same type whose \ith\ element expands to the lowest (highest) value between the \ith\ element of the first expression and the \ith element of the second expression. <>= IntegerVector x = seq_len( 10 ) ; pmin( x, x*x ) pmin( x*x, 2 ) pmin( x, x*x ) pmin( x*x, 2 ) @ \subsubsection{ifelse} Given a logical sugar expression and either : \begin{itemize} \item two compatible sugar expression (same type, same size) \item one sugar expression and one compatible primitive \end{itemize} \texttt{ifelse} expands to a sugar expression whose \ith\ element is the \ith\ element of the first expression if the \ith\ element of the condition expands to \texttt{TRUE} or the \ith\ of the second expression if the \ith\ element of the condition expands to \texttt{FALSE}, or the appropriate missing value otherwise. <>= IntegerVector x ; IntegerVector y ; ifelse( x < y, x, (x+y)*y ) ifelse( x > y, x, 2 ) @ \subsubsection{sapply} \texttt{sapply} applies a \proglang{C++} function to each element of the given expression to create a new expression. The type of the resulting expression is deduced by the compiler from the result type of the function. The function can be a free \proglang{C++} function such as the overload generated by the template function below: <>= template T square( const T& x){ return x * x ; } sapply( seq_len(10), square ) ; @ Alternatively, the function can be a functor whose type has a nested type called \texttt{result\_type} <>= template struct square : std::unary_function { T operator()(const T& x){ return x * x ; } } sapply( seq_len(10), square() ) ; @ \subsubsection{lapply} \texttt{lapply} is similar to \texttt{sapply} except that the result is allways an list expression (an expression of type \texttt{VECSXP}). \subsubsection{sign} Given a numeric or integer expression, \texttt{sign} expands to an expression whose values are one of 1, 0, -1 or \texttt{NA}, depending on the sign of the input expression. <>= IntegerVector xx; sign( xx ) sign( xx * xx ) @ \subsubsection{diff} The \ith\ element of the result of \texttt{diff} is the difference between the $(i+1)$\textsuperscript{th} and the \ith\ element of the input expression. Supported types are integer and numeric. <>= IntegerVector xx; diff( xx ) @ \subsection{Mathematical functions} For the following set of functions, generally speaking, the \ith\ element of the result of the given function (say, \texttt{abs}) is the result of applying that function to this \ith\ element of the input expression. Supported types are integer and numeric. <>= IntegerVector x; abs( x ) exp( x ) floor( x ) ceil( x ) pow(x, z) # x to the power of z @ % log() and log10() maybe? Or ln() ? \subsection{The d/q/p/q statistical functions} The framework provided by \sugar also permits easy and efficient access the density, distribution function, quantile and random number generation functions function by \proglang{R} in the \code{Rmath} library. Currently, most of these functions are vectorised for the first element which denote size. Consequently, these calls works in \proglang{C++} just as they would in \proglang{R}: <>= x1 = dnorm(y1, 0, 1); // density of y1 at m=0, sd=1 x2 = pnorm(y2, 0, 1); // distribution function of y2 x3 = qnorm(y3, 0, 1); // quantiles of y3 x4 = rnorm(n, 0, 1); // 'n' RNG draws of N(0, 1) @ Similar d/q/p/r functions are provided for the most common distributions: beta, binom, cauchy, chisq, exp, f, gamma, geom, hyper, lnorm, logis, nbeta, nbinom, nbinom\_mu, nchisq, nf, norm, nt, pois, t, unif, and weibull. One point to note is that the programmer using these functions needs to initialize the state of the random number generator as detailed in Section 6.3 of the `Writing R Extensions' manual \citep{R:Extensions}. A nice \proglang{C++} solution for this is to use a \textsl{scoped} class that sets the random number generatator on entry to a block and resets it on exit. We offer the \code{RNGScope} class which allows code such as <>= RcppExport SEXP getRGamma() { RNGScope scope; NumericVector x = rgamma( 10, 1, 1 ); return x; } @ As there is some computational overhead involved in using \code{RNGScope}, we are not wrapping it around each inner function. Rather, the user of these functions (\textsl{i.e.} you) should place an \code{RNGScope} at the appropriate level of your code. \section{Performance} \label{sec:performance} TBD \section{Implementation} This section details some of the techniques used in the implementation of \sugar. Note that the user need not to be familiar with the implementation details in order to use \sugar, so this section can be skipped upon a first read of the paper. Writing \sugar~functions is fairly repetitive and follows a well-structured pattern. So once the basic concepts are mastered (which may take time given the inherent complexities in template programming), it should be possible to extend the set of function further following the established pattern.. \subsection{The curiously recurring template pattern} Expression templates such as those used by \sugar~use a technique called the \emph{Curiously Recurring Template Pattern} (CRTP). The general form of CRTP is: <>= // The Curiously Recurring Template Pattern (CRTP) template struct base { // ... }; struct derived : base { // ... }; @ The \texttt{base} class is templated by the class that derives from it : \texttt{derived}. This shifts the relationship between a base class and a derived class as it allows the base class to access methods of the derived class. \subsection{The VectorBase class} The CRTP is used as the basis for \sugar~with the \texttt{VectorBase} class template. All sugar expression derive from one class generated by the \texttt{VectorBase} template. The current definition of \texttt{VectorBase} is given here: <>= template class VectorBase { public: struct r_type : traits::integral_constant{} ; struct can_have_na : traits::integral_constant{} ; typedef typename traits::storage_type::type stored_type ; VECTOR& get_ref(){ return static_cast(*this) ; } inline stored_type operator[]( int i) const { return static_cast(this)->operator[](i) ; } inline int size() const { return static_cast(this)->size() ; } /* definition ommited here */ class iterator ; inline iterator begin() const { return iterator(*this, 0) ; } inline iterator end() const { return iterator(*this, size() ) ; } } @ The \texttt{VectorBase} template has three parameters: \begin{itemize} \item \texttt{RTYPE}: This controls the type of expression (INTSXP, REALSXP, ...) \item \texttt{na}: This embeds in the derived type information about whether instances may contain missing values. \pkg{Rcpp} vector types (\texttt{IntegerVector}, ...) derive from \texttt{VectorBase} with this parameter set to \texttt{true} because there is no way to know at compile-time if the vector will contain missing values at run-time. However, this parameter is set to \texttt{false} for types that are generated by sugar expressions as these are guaranteed to produce expressions that are without missing values. An example is the \texttt{is\_na} function. This parameter is used in several places as part of the compile time dispatch to limit the occurence of redundant operations. \item \texttt{VECTOR}: This parameter is the key of \sugar. This is the manifestation of CRTP. The indexing operator and the \texttt{size} method of \texttt{VectorBase} use a static cast of \texttt{this} to the \texttt{VECTOR} type to forward calls to the actual method of the derived class. \end{itemize} \subsection{Example : sapply} As an example, the current implementation of \texttt{sapply}, supported by the template class \texttt{Rcpp::sugar::Sapply} is given below: <>= template class Sapply : public VectorBase< Rcpp::traits::r_sexptype_traits< typename ::Rcpp::traits::result_of::type >::rtype , true , Sapply > { public: typedef typename ::Rcpp::traits::result_of::type ; const static int RESULT_R_TYPE = Rcpp::traits::r_sexptype_traits::rtype ; typedef Rcpp::VectorBase VEC ; typedef typename Rcpp::traits::r_vector_element_converter::type converter_type ; typedef typename Rcpp::traits::storage_type::type STORAGE ; Sapply( const VEC& vec_, Function fun_ ) : vec(vec_), fun(fun_){} inline STORAGE operator[]( int i ) const { return converter_type::get( fun( vec[i] ) ); } inline int size() const { return vec.size() ; } private: const VEC& vec ; Function fun ; } ; // sugar template inline sugar::Sapply sapply( const Rcpp::VectorBase& t, Function fun ){ return sugar::Sapply( t, fun ) ; } @ \subsubsection{The sapply function} \texttt{sapply} is a template function that takes two arguments. \begin{itemize} \item The first argument is a sugar expression, which we recognize because of the relationship with the \texttt{VectorBase} class template. \item The second argument is the function to apply. \end{itemize} The \texttt{sapply} function itself does not do anything, it is just used to trigger compiler detection of the template parameters that will be used in the \texttt{sugar::Sapply} template. \subsubsection{Detection of return type of the function} In order to decide which kind of expression is built, the \texttt{Sapply} template class queries the template argument via the \texttt{Rcpp::traits::result\_of} template. <>= typedef typename ::Rcpp::traits::result_of::type result_type ; @ The \texttt{result\_of} type trait is implemented as such: <>= template struct result_of{ typedef typename T::result_type type ; } ; template struct result_of< RESULT_TYPE (*)(INPUT_TYPE) >{ typedef RESULT_TYPE type ; } ; @ The generic definition of \texttt{result\_of} targets functors with a nested \texttt{result\_type} type. The second definition is a partial specialization targetting function pointers. \subsubsection{Indentification of expression type} Based on the result type of the function, the \texttt{r\_sexptype\_traits} trait is used to identify the expression type. <>= const static int RESULT_R_TYPE = Rcpp::traits::r_sexptype_traits::rtype ; @ \subsubsection{Converter} The \texttt{r\_vector\_element\_converter} class is used to convert an object of the function's result type to the actual storage type suitable for the sugar expression. <>= typedef typename Rcpp::traits::r_vector_element_converter::type converter_type ; @ \subsubsection{Storage type} The \texttt{storage\_type} trait is used to get access to the storage type associated with a sugar expression type. For example, the storage type of a \texttt{REALSXP} expression is \texttt{double}. <>= typedef typename Rcpp::traits::storage_type::type STORAGE ; @ \subsubsection{Input expression base type} The input expression --- the expression over which \texttt{sapply} runs --- is also typedef'ed for convenience: <>= typedef Rcpp::VectorBase VEC ; @ \subsubsection{Output expression base type} In order to be part of the \sugar~system, the type generated by the \texttt{Sapply} class template must inherit from \texttt{VectorBase}. <>= template class Sapply : public VectorBase< Rcpp::traits::r_sexptype_traits< typename ::Rcpp::traits::result_of::type >::rtype , true , Sapply > @ The expression built by \texttt{Sapply} depends on the result type of the function, may contain missing values, and the third argument is the manifestation of the \emph{CRTP}. \subsubsection{Constructor} The constructor of the \texttt{Sapply} class template is straightforward, it simply consists of holding the reference to the input expression and the function. <>= Sapply( const VEC& vec_, Function fun_ ) : vec(vec_), fun(fun_){} private: const VEC& vec ; Function fun ; @ \subsubsection{Implementation} The indexing operator and the \texttt{size} member function is what the \texttt{VectorBase} expects. The size of the result expression is the same as the size of the input expression and the i\textsuperscript{th} element of the result is simply retrieved by applying the function and the converter. Both these methods are inline to maximize performance: <>= inline STORAGE operator[]( int i ) const { return converter_type::get( fun( vec[i] ) ); } inline int size() const { return vec.size() ; } @ \section{Summary} TBD \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/debian/0000755000000000000000000000000012273452310010644 5ustar rcpp-0.11.0/debian/r-cran-rcpp.lintian-overrides0000644000000000000000000001531212253723677016371 0ustar r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RObject.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.XPTr.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.environments.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.evaluator.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.exceptions.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RObject.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.XPTr.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.environments.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.evaluator.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.exceptions.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/examples/ConvolveBenchmarks/convolve2.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/examples/ConvolveBenchmarks/exampleRCode.r r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.CharacterVector.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.ComplexVector.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.ExpressionVector.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Function.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.GenericVector.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.IntegerVector.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Language.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.NumericVector.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Pairlist.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RawVector.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.S4.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Symbol.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.as.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.wrap.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/discovery/cxx0x.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppDate.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppDatetime.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppMatrix.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppMatrixView.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppParams.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppResultSet.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppVector.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppVectorView.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.clone.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.traits.R r-cran-rcpp: script-uses-bin-env usr/lib/R/site-library/Rcpp/discovery/cxx0x.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Column.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Matrix.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Row.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.macros.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Argument.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppFrame.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Vector.create.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.DataFrame.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Dimension.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Formula.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.client.package.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Module.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.complex.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Date.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Datetime.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.sugar.R r-cran-rcpp: executable-not-elf-or-script ./usr/lib/R/site-library/Rcpp/examples/SugarPerformance/sugarBenchmarks.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.RcppMisc.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Vector.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.misc.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.stats.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/examples/ConvolveBenchmarks/buildAndRun.sh r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/examples/ConvolveBenchmarks/overhead.r r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/examples/functionCallback/buildAndRun.sh r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Module.client.package.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.modref.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.support.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/examples/Misc/ifelseLooped.r r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/examples/OpenMP/OpenMPandInline.r r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.int64.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.rcout.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.sugarOps.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/examples/Misc/newFib.r r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.rmath.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.String.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.wstring.R r-cran-rcpp: script-not-executable usr/lib/R/site-library/Rcpp/unitTests/runit.Reference.R rcpp-0.11.0/debian/watch0000644000000000000000000000011012253723677011704 0ustar version=3 http://cran.r-project.org/src/contrib/Rcpp_([-\d\.]*)\.tar.gz rcpp-0.11.0/debian/compat0000644000000000000000000000000212253723677012061 0ustar 7 rcpp-0.11.0/debian/changelog0000644000000000000000000002065212273452310012523 0ustar rcpp (0.11.0-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sun, 02 Feb 2014 08:22:46 -0600 rcpp (0.10.6-1) unstable; urgency=low * New release * debian/control: Set Build-Depends: to current R version * debian/control: Set Standards-Version: to current version * debian/control: Add 'r-cran-codetools' to Build-Depends (as it is used at preparation for LazyLoading stage) -- Dirk Eddelbuettel Tue, 29 Oct 2013 09:42:30 -0500 rcpp (0.10.5-1) unstable; urgency=low * New release * debian/control: Set Build-Depends: to current R version -- Dirk Eddelbuettel Sat, 28 Sep 2013 07:28:48 -0500 rcpp (0.10.4-1) unstable; urgency=low * New release * debian/control: Set Build-Depends: to current R version -- Dirk Eddelbuettel Sun, 23 Jun 2013 09:02:24 -0500 rcpp (0.10.3-2) unstable; urgency=low * debian/control: Set Build-Depends: to current R version * (Re-)building with R 3.0.0 (beta) -- Dirk Eddelbuettel Sat, 30 Mar 2013 18:04:44 -0500 rcpp (0.10.3-1) unstable; urgency=low * New release * src/Timer.cpp: Changed to permit *BSD builds (Closes: #697032) -- Dirk Eddelbuettel Sat, 23 Mar 2013 07:42:26 -0500 rcpp (0.10.2-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Fri, 21 Dec 2012 06:22:53 -0600 rcpp (0.10.1-1) unstable; urgency=low * New release * inst/include/Rcpp/iostream/Rostream.h: Additional fix that didn't make it into 0.10.1 -- Dirk Eddelbuettel Tue, 27 Nov 2012 08:20:54 -0600 rcpp (0.10.0-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Tue, 13 Nov 2012 19:55:10 -0600 rcpp (0.9.15-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sat, 13 Oct 2012 16:01:04 -0500 rcpp (0.9.14-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sun, 30 Sep 2012 08:07:51 -0500 rcpp (0.9.13-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Thu, 28 Jun 2012 21:20:47 -0500 rcpp (0.9.12-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sat, 23 Jun 2012 11:20:06 -0500 rcpp (0.9.11-1) unstable; urgency=low * New release * debian/control: Set Build-Depends: to current R version * debian/control: Change Depends to ${R:Depends} * debian/control: Set Standards-Version: to current version -- Dirk Eddelbuettel Fri, 22 Jun 2012 06:22:00 -0500 rcpp (0.9.10-1) unstable; urgency=low * New release * debian/control: Updated (Build-)Depends: to current R version -- Dirk Eddelbuettel Wed, 15 Feb 2012 07:10:16 -0600 rcpp (0.9.9-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sun, 25 Dec 2011 09:30:03 -0600 rcpp (0.9.8-1) unstable; urgency=low * New release * debian/control: Updated Standard-Versions: to current version * debian/control: Updated (Build-)Depends: to current R version -- Dirk Eddelbuettel Wed, 21 Dec 2011 10:50:09 -0600 rcpp (0.9.7-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Thu, 29 Sep 2011 14:53:21 -0500 rcpp (0.9.6-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Tue, 26 Jul 2011 19:18:20 -0500 rcpp (0.9.5-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Tue, 05 Jul 2011 21:14:26 -0500 rcpp (0.9.4-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Tue, 12 Apr 2011 10:12:37 -0500 rcpp (0.9.3-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Tue, 05 Apr 2011 12:11:12 -0500 rcpp (0.9.2-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Wed, 23 Feb 2011 13:58:14 -0600 rcpp (0.9.1-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Mon, 14 Feb 2011 06:54:24 -0600 rcpp (0.9.0-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sun, 19 Dec 2010 18:35:01 -0600 rcpp (0.8.9-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sat, 27 Nov 2010 22:53:27 -0600 rcpp (0.8.8-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Mon, 01 Nov 2010 17:16:36 -0500 rcpp (0.8.7-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Fri, 15 Oct 2010 05:12:31 -0500 rcpp (0.8.6-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Thu, 09 Sep 2010 12:21:21 -0500 rcpp (0.8.5-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sun, 25 Jul 2010 11:34:27 -0500 rcpp (0.8.4-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Fri, 09 Jul 2010 09:39:20 -0500 rcpp (0.8.3-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sun, 27 Jun 2010 16:40:23 -0500 rcpp (0.8.2-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Wed, 09 Jun 2010 11:03:23 -0500 rcpp (0.8.1-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Tue, 08 Jun 2010 05:18:34 -0500 rcpp (0.8.0-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Mon, 17 May 2010 06:41:54 -0500 rcpp (0.7.12-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Fri, 16 Apr 2010 06:23:46 -0500 rcpp (0.7.11-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Fri, 26 Mar 2010 15:14:58 -0500 rcpp (0.7.10-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Mon, 15 Mar 2010 14:58:40 -0500 rcpp (0.7.9-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Fri, 12 Mar 2010 12:25:52 -0600 rcpp (0.7.8-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Tue, 09 Mar 2010 11:39:12 -0600 rcpp (0.7.7-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sun, 14 Feb 2010 11:53:46 -0600 rcpp (0.7.6-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Fri, 12 Feb 2010 21:50:34 -0600 rcpp (0.7.5-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Mon, 08 Feb 2010 09:36:13 -0600 rcpp (0.7.4-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sat, 30 Jan 2010 14:36:24 -0600 rcpp (0.7.3-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Thu, 21 Jan 2010 20:42:07 -0600 rcpp (0.7.2-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Tue, 12 Jan 2010 20:41:16 -0600 rcpp (0.7.1-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Sat, 02 Jan 2010 15:38:09 -0600 rcpp (0.7.0-1) unstable; urgency=low * New release * debian/control: Added littler to Depends: as examples use it [lintian] -- Dirk Eddelbuettel Sat, 19 Dec 2009 14:18:32 -0600 rcpp (0.6.8-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Tue, 10 Nov 2009 07:34:07 -0600 rcpp (0.6.7-1) unstable; urgency=low * New release * debian/control: Updated Standard-Versions: to current version * debian/control: Updated (Build-)Depends: to current R version -- Dirk Eddelbuettel Sun, 08 Nov 2009 19:22:53 -0600 rcpp (0.6.6-1) unstable; urgency=low * New release * debian/control: Updated Standard-Versions: to current version * debian/control: Updated (Build-)Depends: to current R version -- Dirk Eddelbuettel Mon, 03 Aug 2009 14:55:48 -0500 rcpp (0.6.5-1) unstable; urgency=low * New release * COPYING: Added license file (Closes: #522202) -- Dirk Eddelbuettel Wed, 01 Apr 2009 21:34:33 -0500 rcpp (0.6.4-1) unstable; urgency=low * New release * debian/r-cran-rcpp.lintian-overrides: Added to suppress lintian warnings over Doxygen-generated png files -- Dirk Eddelbuettel Sun, 01 Mar 2009 17:41:58 -0600 rcpp (0.6.3-1) unstable; urgency=low * New release -- Dirk Eddelbuettel Fri, 09 Jan 2009 20:41:35 -0600 rcpp (0.6.2-1) unstable; urgency=low * Initial Debian release (Closes: #507941) -- Dirk Eddelbuettel Fri, 05 Dec 2008 19:58:31 -0600 rcpp-0.11.0/debian/rules0000755000000000000000000000031212253723677011737 0ustar #!/usr/bin/make -f # -*- makefile -*- # debian/rules file for the Debian/GNU Linux rcpp package # Copyright 2003-2013 by Dirk Eddelbuettel include /usr/share/R/debian/r-cran.mk rcpp-0.11.0/debian/source/0000755000000000000000000000000012253723677012163 5ustar rcpp-0.11.0/debian/source/format0000644000000000000000000000000412253723677013370 0ustar 1.0 rcpp-0.11.0/debian/copyright0000644000000000000000000000440712253723677012623 0ustar This is the Debian GNU/Linux r-cran-rcpp package of Rcpp, an R / C++ interface package. Rcpp was written by Dominick Samperi, Dirk Eddelbuettel and Romain Francois. This package was created by Dirk Eddelbuettel . The sources were downloaded from the main CRAN site http://cran.r-project.org/src/contrib/ and are also available from all CRAN mirrors as e.g. http://cran.us.r-project.org/src/contrib/ as well the GitHub repo http://github.com/RcppCore/Rcpp The package was renamed from its upstream name 'Rcpp' to 'r-cran-rcpp' to fit the pattern of CRAN (and non-CRAN) packages for R. Copyright (C) 2005 - 2006 Dominick Samperi Copyright (C) 2008 Dirk Eddelbuettel Copyright (C) 2009 - 2013 Dirk Eddelbuettel and Romain Francois Portions Copyright (C) 2008 Simon Urbanek Portions Copyright (C) 2010 Doug Bates Portions Copyright (C) 2010 John M Chambers License: GPL-2 On a Debian GNU/Linux system, the GPL license (version 2) is included in the file /usr/share/common-licenses/GPL-2. For reference, the upstream DESCRIPTION file is included below: Package: Rcpp Title: Rcpp R/C++ interface package Version: 0.7.3 Date: $Date: 2010-01-18 13:08:15 -0600 (Mon, 18 Jan 2010) $ Author: Dirk Eddelbuettel and Romain Francois, with contributions by Simon Urbanek and David Reiss; based on code written during 2005 and 2006 by Dominick Samperi Maintainer: Dirk Eddelbuettel Description: R/C++ interface classes and examples The Rcpp library maps data types betweeen R and C++, and includes support for R types real, integer, character, vector, matrix, Date, datetime (i.e. POSIXct) at microsecond resolution, data frame, and function. Transfer to and from simple SEXP objects is particular easy. Calling R functions from C++ is also supported. . C++ code can be 'inlined' by using the 'inline' package which will create a C++ function and compile, link and load it given the 'inlined' character argument which makes C++ integration very easy. . Several examples are included. Depends: R (>= 2.0.0) Suggests: inline (>= 0.3.4), RUnit SystemRequirements: None URL: http://dirk.eddelbuettel.com/code/rcpp.html, http://romainfrancois.blog.free.fr/index.php?category/R-package/Rcpp License: GPL (>= 2) rcpp-0.11.0/debian/control0000644000000000000000000000532612273452234012262 0ustar Source: rcpp Section: gnu-r Priority: optional Maintainer: Dirk Eddelbuettel Build-Depends: debhelper (>= 7.0.0), r-base-dev (>= 3.0.2), cdbs, r-cran-codetools Standards-Version: 3.9.5 Homepage: http://dirk.eddelbuettel.com/code/rcpp.html Package: r-cran-rcpp Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${R:Depends}, littler Suggests: r-cran-inline Description: GNU R package for Seamless R and C++ Integration The Rcpp package provides a C++ library which facilitates the integration of R and C++. . R data types (SEXP) are matched to C++ objects in a class hierarchy. All R types are supported (vectors, functions, environment, etc ...) and each type is mapped to a dedicated class. For example, numeric vectors are represented as instances of the Rcpp::NumericVector class, environments are represented as instances of Rcpp::Environment, functions are represented as Rcpp::Function, etc ... The "Rcpp-introduction" vignette provides a good entry point to Rcpp. . Conversion from C++ to R and back is driven by the templates Rcpp::wrap and Rcpp::as which are highly flexible and extensible, as documented in the "Rcpp-extending" vignette. . Rcpp also provides Rcpp modules, a framework that allows exposing C++ functions and classes to the R level. The "Rcpp-modules" vignette details the current set of features of Rcpp-modules. . Rcpp includes a concept called Rcpp sugar that brings many R functions into C++. Sugar takes advantage of lazy evaluation and expression templates to achieve great performance while exposing a syntax that is much nicer to use than the equivalent low-level loop code. The "Rcpp-sugar" vignette gives an overview of the feature. . Rcpp attributes provide a high-level syntax for declaring C++ functions as callable from R and automatically generating the code required to invoke them. Attributes are intended to facilitate both interactive use of C++ within R sessions as well as to support R package development. Attributes are built on top of Rcpp modules and their implementation is based on previous work in the inline package. . Many examples are included, and around 891 unit tests in 430 unit test functions provide additional usage examples. . An earlier version of Rcpp, containing what we now call the 'classic Rcpp API' was written during 2005 and 2006 by Dominick Samperi. This code has been factored out of Rcpp into the package RcppClassic and it is still available for code relying on this interface. New development should use this package instead. . Additional documentation is available via the paper by Eddelbuettel and Francois (2011, JSS) paper and the book by Eddelbuettel (2013, Springer); see 'citation("Rcpp")' for details. rcpp-0.11.0/src/0000755000000000000000000000000012273452733010222 5ustar rcpp-0.11.0/src/api.cpp0000644000000000000000000002057712273452733011512 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // jedit: :folding=explicit: // // api.cpp: Rcpp R/C++ interface class library -- Rcpp api // // Copyright (C) 2012 - 2013 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 . #define COMPILING_RCPP #include using namespace Rcpp ; #include "internal.h" #include #ifdef RCPP_HAS_DEMANGLING #include #endif #if defined(__GNUC__) #if defined(WIN32) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__sun) #else #include static std::string demangler_one( const char* input){ static std::string buffer ; buffer = input ; buffer.resize( buffer.find_last_of( '+' ) - 1 ) ; buffer.erase( buffer.begin(), buffer.begin() + buffer.find_last_of( ' ' ) + 1 ) ; return demangle( buffer) ; } #endif #endif namespace Rcpp { namespace internal{ namespace { unsigned long RNGScopeCounter = 0; } // [[Rcpp::register]] unsigned long enterRNGScope() { if (RNGScopeCounter == 0) GetRNGstate(); RNGScopeCounter++; return RNGScopeCounter ; } // [[Rcpp::register]] unsigned long exitRNGScope() { RNGScopeCounter--; if (RNGScopeCounter == 0) PutRNGstate(); return RNGScopeCounter ; } // [[Rcpp::register]] char* get_string_buffer(){ static char buffer[MAXELTSIZE]; return buffer ; } } // [[Rcpp::register]] const char * type2name(SEXP x) { switch (TYPEOF(x)) { case NILSXP: return "NILSXP"; case SYMSXP: return "SYMSXP"; case RAWSXP: return "RAWSXP"; case LISTSXP: return "LISTSXP"; case CLOSXP: return "CLOSXP"; case ENVSXP: return "ENVSXP"; case PROMSXP: return "PROMSXP"; case LANGSXP: return "LANGSXP"; case SPECIALSXP: return "SPECIALSXP"; case BUILTINSXP: return "BUILTINSXP"; case CHARSXP: return "CHARSXP"; case LGLSXP: return "LGLSXP"; case INTSXP: return "INTSXP"; case REALSXP: return "REALSXP"; case CPLXSXP: return "CPLXSXP"; case STRSXP: return "STRSXP"; case DOTSXP: return "DOTSXP"; case ANYSXP: return "ANYSXP"; case VECSXP: return "VECSXP"; case EXPRSXP: return "EXPRSXP"; case BCODESXP: return "BCODESXP"; case EXTPTRSXP: return "EXTPTRSXP"; case WEAKREFSXP: return "WEAKREFSXP"; case S4SXP: return "S4SXP"; default: return ""; } } } // namespace Rcpp // [[Rcpp::register]] std::string demangle( const std::string& name ){ #ifdef RCPP_HAS_DEMANGLING std::string real_class ; int status =-1 ; char *dem = 0; dem = abi::__cxa_demangle(name.c_str(), 0, 0, &status); if( status == 0 ){ real_class = dem ; free(dem); } else { real_class = name ; } return real_class ; #else return name ; #endif } // [[Rcpp::register]] const char* short_file_name(const char* file){ std::string f(file) ; size_t index = f.find("/include/") ; if( index != std::string::npos ){ f = f.substr( index + 9 ) ; } return f.c_str() ; } // [[Rcpp::internal]] SEXP as_character_externalptr(SEXP xp){ char buffer[20] ; snprintf( buffer, 20, "%p", (void*)EXTPTR_PTR(xp) ) ; return Rcpp::wrap( (const char*)buffer ) ; } // [[Rcpp::internal]] SEXP rcpp_capabilities(){ Shield cap( Rf_allocVector( LGLSXP, 11 ) ); Shield names( Rf_allocVector( STRSXP, 11 ) ); #ifdef HAS_VARIADIC_TEMPLATES LOGICAL(cap)[0] = TRUE ; #else LOGICAL(cap)[0] = FALSE ; #endif #ifdef HAS_CXX0X_INITIALIZER_LIST LOGICAL(cap)[1] = TRUE ; #else LOGICAL(cap)[1] = FALSE ; #endif /* exceptions are always supported */ LOGICAL(cap)[2] = TRUE ; #ifdef HAS_TR1_UNORDERED_MAP LOGICAL(cap)[3] = TRUE ; #else LOGICAL(cap)[3] = FALSE ; #endif #ifdef HAS_TR1_UNORDERED_SET LOGICAL(cap)[4] = TRUE ; #else LOGICAL(cap)[4] = FALSE ; #endif LOGICAL(cap)[5] = TRUE ; #ifdef RCPP_HAS_DEMANGLING LOGICAL(cap)[6] = TRUE ; #else LOGICAL(cap)[6] = FALSE ; #endif LOGICAL(cap)[7] = FALSE ; #ifdef RCPP_HAS_LONG_LONG_TYPES LOGICAL(cap)[8] = TRUE ; #else LOGICAL(cap)[8] = FALSE ; #endif #ifdef HAS_CXX0X_UNORDERED_MAP LOGICAL(cap)[9] = TRUE ; #else LOGICAL(cap)[9] = FALSE ; #endif #ifdef HAS_CXX0X_UNORDERED_SET LOGICAL(cap)[10] = TRUE ; #else LOGICAL(cap)[10] = FALSE ; #endif SET_STRING_ELT(names, 0, Rf_mkChar("variadic templates") ) ; SET_STRING_ELT(names, 1, Rf_mkChar("initializer lists") ) ; SET_STRING_ELT(names, 2, Rf_mkChar("exception handling") ) ; SET_STRING_ELT(names, 3, Rf_mkChar("tr1 unordered maps") ) ; SET_STRING_ELT(names, 4, Rf_mkChar("tr1 unordered sets") ) ; SET_STRING_ELT(names, 5, Rf_mkChar("Rcpp modules") ) ; SET_STRING_ELT(names, 6, Rf_mkChar("demangling") ) ; SET_STRING_ELT(names, 7, Rf_mkChar("classic api") ) ; SET_STRING_ELT(names, 8, Rf_mkChar("long long") ) ; SET_STRING_ELT(names, 9, Rf_mkChar("C++0x unordered maps") ) ; SET_STRING_ELT(names, 10, Rf_mkChar("C++0x unordered sets") ) ; Rf_setAttrib( cap, R_NamesSymbol, names ) ; return cap ; } // [[Rcpp::internal]] SEXP rcpp_can_use_cxx0x(){ #ifdef HAS_VARIADIC_TEMPLATES return Rf_ScalarLogical( TRUE ); #else return Rf_ScalarLogical( FALSE ); #endif } // [[Rcpp::register]] SEXP stack_trace( const char* file, int line ){ #if defined(__GNUC__) #if defined(WIN32) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__sun) // Simpler version for Windows and *BSD List trace = List::create( _[ "file" ] = file, _[ "line" ] = line, _[ "stack" ] = "C++ stack not available on this system" ) ; trace.attr("class") = "Rcpp_stack_trace" ; return trace ; #else // ! (defined(WIN32) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__sun) /* inspired from http://tombarta.wordpress.com/2008/08/01/c-stack-traces-with-gcc/ */ const size_t max_depth = 100; size_t stack_depth; void *stack_addrs[max_depth]; char **stack_strings; stack_depth = backtrace(stack_addrs, max_depth); stack_strings = backtrace_symbols(stack_addrs, stack_depth); std::string current_line ; CharacterVector res( stack_depth - 1) ; std::transform( stack_strings + 1, stack_strings + stack_depth, res.begin(), demangler_one ) ; free(stack_strings); // malloc()ed by backtrace_symbols List trace = List::create( _["file" ] = file, _["line" ] = line, _["stack"] = res ) ; trace.attr("class") = "Rcpp_stack_trace" ; return trace ; #endif #else /* !defined( __GNUC__ ) */ return R_NilValue ; #endif } // }}} rcpp-0.11.0/src/attributes.cpp0000644000000000000000000032326112273452733013123 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // attributes.cpp: Rcpp R/C++ interface class library -- Rcpp attributes // // Copyright (C) 2012 - 2013 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 . #define COMPILING_RCPP #include #include #include #include #include #include #include #include #include #include #include #define RCPP_NO_SUGAR #include /******************************************************************* * AttributesUtil.h *******************************************************************/ namespace Rcpp { namespace attributes { // Utility class for getting file existence and last modified time class FileInfo { public: explicit FileInfo(const std::string& path); std::string path() const { return path_; } bool exists() const { return exists_; } time_t lastModified() const { return lastModified_; } private: std::string path_; bool exists_; time_t lastModified_; }; // Remove a file bool removeFile(const std::string& path); // Recursively create a directory void createDirectory(const std::string& path); // Known whitespace chars extern const char * const kWhitespaceChars; // Query whether a character is whitespace bool isWhitespace(char ch); // Trim a string void trimWhitespace(std::string* pStr); // Strip balanced quotes from around a string (assumes already trimmed) void stripQuotes(std::string* pStr); // is the passed string quoted? bool isQuoted(const std::string& str); // show a warning message void showWarning(const std::string& msg); } // namespace attributes } // namespace Rcpp /******************************************************************* * AttributesTypes.h *******************************************************************/ namespace Rcpp { namespace attributes { // Known attribute names & parameters const char * const kExportAttribute = "export"; const char * const kDependsAttribute = "depends"; const char * const kPluginsAttribute = "plugins"; const char * const kInterfacesAttribute = "interfaces"; const char * const kInterfaceR = "r"; const char * const kInterfaceCpp = "cpp"; // Type info class Type { public: Type() {} Type(const std::string& name, bool isConst, bool isReference) : name_(name), isConst_(isConst), isReference_(isReference) { } bool empty() const { return name().empty(); } const std::string& name() const { return name_; } std::string full_name() const { std::string res ; if( isConst() ) res += "const " ; res += name() ; if( isReference() ) res += "&" ; return res ; } bool isVoid() const { return name() == "void"; } bool isConst() const { return isConst_; } bool isReference() const { return isReference_; } private: std::string name_; bool isConst_; bool isReference_; }; // Argument info class Argument { public: Argument() {} Argument(const std::string& name, const Type& type, const std::string& defaultValue) : name_(name), type_(type), defaultValue_(defaultValue) { } bool empty() const { return type().empty(); } const std::string& name() const { return name_; } const Type& type() const { return type_; } const std::string& defaultValue() const { return defaultValue_; } private: std::string name_; Type type_; std::string defaultValue_; }; // Function info class Function { public: Function() {} Function(const Type& type, const std::string& name, const std::vector& arguments, const std::string& source) : type_(type), name_(name), arguments_(arguments), source_(source) { } Function renamedTo(const std::string& name) const { return Function(type(), name, arguments(), source()); } std::string signature() const { return signature(name()); } std::string signature(const std::string& name) const; bool isHidden() const { return name().find_first_of('.') == 0; } bool empty() const { return name().empty(); } const Type& type() const { return type_; } const std::string& name() const { return name_; } const std::vector& arguments() const { return arguments_; } const std::string& source() const { return source_; } private: Type type_; std::string name_; std::vector arguments_; std::string source_; }; // Attribute parameter (with optional value) class Param { public: Param() {} explicit Param(const std::string& paramText); bool empty() const { return name().empty(); } const std::string& name() const { return name_; } const std::string& value() const { return value_; } private: std::string name_; std::string value_; }; // Attribute (w/ optional params and signature of function it qualifies) class Attribute { public: Attribute() {} Attribute(const std::string& name, const std::vector& params, const Function& function, const std::vector& roxygen) : name_(name), params_(params), function_(function), roxygen_(roxygen) { } bool empty() const { return name().empty(); } const std::string& name() const { return name_; } const std::vector& params() const { return params_; } Param paramNamed(const std::string& name) const; bool hasParameter(const std::string& name) const { return !paramNamed(name).empty(); } const Function& function() const { return function_; } bool isExportedFunction() const { return (name() == kExportAttribute) && !function().empty(); } std::string exportedName() const { if (!params().empty()) return params()[0].name(); else return function().name(); } const std::vector& roxygen() const { return roxygen_; } private: std::string name_; std::vector params_; Function function_; std::vector roxygen_; }; class FunctionMap { std::map< std::string, std::vector > map_ ; public: FunctionMap(){}; ~FunctionMap(){} ; void insert( const Function& fun ){ map_[ fun.name() ].push_back( fun ) ; } } ; // Operator << for parsed types std::ostream& operator<<(std::ostream& os, const Type& type); std::ostream& operator<<(std::ostream& os, const Argument& argument); std::ostream& operator<<(std::ostream& os, const Function& function); std::ostream& operator<<(std::ostream& os, const Param& param); std::ostream& operator<<(std::ostream& os, const Attribute& attribute); // interface to source file attributes class SourceFileAttributes { public: virtual ~SourceFileAttributes() {}; virtual const std::string& sourceFile() const = 0; virtual bool hasInterface(const std::string& name) const = 0; typedef std::vector::const_iterator const_iterator; virtual const_iterator begin() const = 0; virtual const_iterator end() const = 0; virtual const std::vector& modules() const = 0; virtual const std::vector >& roxygenChunks() const = 0; virtual bool hasGeneratorOutput() const = 0; }; } // namespace attributes } // namespace Rcpp /******************************************************************* * AttributesParser.h *******************************************************************/ namespace Rcpp { namespace attributes { // Helper class for determining whether we are in a comment class CommentState { public: CommentState() : inComment_(false) {} private: // prohibit copying CommentState(const CommentState&); CommentState& operator=(const CommentState&); public: bool inComment() const { return inComment_; } void submitLine(const std::string& line); void reset() { inComment_ = false; } private: bool inComment_; }; // Class used to parse and return attribute information from a source file class SourceFileAttributesParser : public SourceFileAttributes { public: explicit SourceFileAttributesParser(const std::string& sourceFile); private: // prohibit copying SourceFileAttributesParser(const SourceFileAttributesParser&); SourceFileAttributesParser& operator=(const SourceFileAttributesParser&); public: // implemetnation of SourceFileAttributes interface virtual const std::string& sourceFile() const { return sourceFile_; } virtual const_iterator begin() const { return attributes_.begin(); } virtual const_iterator end() const { return attributes_.end(); } virtual const std::vector& modules() const { return modules_; } virtual const std::vector >& roxygenChunks() const { return roxygenChunks_; } virtual bool hasGeneratorOutput() const { return !attributes_.empty() || !modules_.empty() || !roxygenChunks_.empty(); } virtual bool hasInterface(const std::string& name) const { for (const_iterator it=begin(); it != end(); ++it) { if (it->name() == kInterfacesAttribute) { return it->hasParameter(name); } } // if there's no interfaces attrbute we default to R if (name == kInterfaceR) return true; else return false; } // Get lines of embedded R code const std::vector& embeddedR() const { return embeddedR_; } private: // Parsing helpers Attribute parseAttribute(const std::vector& match, int lineNumber); std::vector parseParameters(const std::string& input); Function parseFunction(size_t lineNumber); std::string parseSignature(size_t lineNumber); std::vector parseArguments(const std::string& argText); Type parseType(const std::string& text); // Validation helpers bool isKnownAttribute(const std::string& name) const; void attributeWarning(const std::string& message, const std::string& attribute, size_t lineNumber); void attributeWarning(const std::string& message, size_t lineNumber); void rcppExportWarning(const std::string& message, size_t lineNumber); void rcppExportNoFunctionFoundWarning(size_t lineNumber); void rcppExportInvalidParameterWarning(const std::string& param, size_t lineNumber); void rcppInterfacesWarning(const std::string& message, size_t lineNumber); private: std::string sourceFile_; CharacterVector lines_; std::vector attributes_; FunctionMap functionMap_ ; std::vector modules_; std::vector embeddedR_; std::vector > roxygenChunks_; std::vector roxygenBuffer_; }; } // namespace attributes } // namespace Rcpp /******************************************************************* * AttributesGen.h *******************************************************************/ namespace Rcpp { namespace attributes { // Abstract class which manages writing of code for compileAttributes class ExportsGenerator { protected: ExportsGenerator(const std::string& targetFile, const std::string& package, const std::string& commentPrefix); private: // prohibit copying ExportsGenerator(const ExportsGenerator&); ExportsGenerator& operator=(const ExportsGenerator&); public: virtual ~ExportsGenerator() {} // Name of target file and package const std::string& targetFile() const { return targetFile_; } const std::string& package() const { return package_; } // Abstract interface for code generation virtual void writeBegin() = 0; void writeFunctions(const SourceFileAttributes& attributes, bool verbose); // see doWriteFunctions below virtual void writeEnd() = 0; virtual bool commit(const std::vector& includes) = 0; // Remove the generated file entirely bool remove(); // Allow generator to appear as a std::ostream& operator std::ostream&() { return codeStream_; } protected: // Allow access to the output stream std::ostream& ostr() { return codeStream_; } bool hasCppInterface() const { return hasCppInterface_; } // Shared knowledge about function namees std::string exportValidationFunction() { return "RcppExport_validate"; } std::string exportValidationFunctionRegisteredName() { return package() + "_" + exportValidationFunction(); } std::string registerCCallableExportedName() { return package() + "_RcppExport_registerCCallable"; } // Commit the stream -- is a no-op if the existing code is identical // to the generated code. Returns true if data was written and false // if it wasn't (throws exception on io error) bool commit(const std::string& preamble = std::string()); private: // Private virtual for doWriteFunctions so the base class // can always intercept writeFunctions virtual void doWriteFunctions(const SourceFileAttributes& attributes, bool verbose) = 0; // Check whether it's safe to overwrite this file (i.e. whether we // generated the file in the first place) bool isSafeToOverwrite() const { return existingCode_.empty() || (existingCode_.find(generatorToken()) != std::string::npos); } // UUID that we write into a comment within the file (so that we can // strongly identify that a file was generated by us before overwriting it) std::string generatorToken() const { return "10BE3573-1514-4C36-9D1C-5A225CD40393"; } private: std::string targetFile_; std::string package_; std::string commentPrefix_; std::string existingCode_; std::ostringstream codeStream_; bool hasCppInterface_; }; // Class which manages generating RcppExports.cpp class CppExportsGenerator : public ExportsGenerator { public: explicit CppExportsGenerator(const std::string& packageDir, const std::string& package, const std::string& fileSep); virtual void writeBegin() {}; virtual void writeEnd(); virtual bool commit(const std::vector& includes); private: virtual void doWriteFunctions(const SourceFileAttributes& attributes, bool verbose); std::string registerCCallable(size_t indent, const std::string& exportedName, const std::string& name) const; private: std::vector cppExports_; }; // Class which manages generating PackageName_RcppExports.h header file class CppExportsIncludeGenerator : public ExportsGenerator { public: CppExportsIncludeGenerator(const std::string& packageDir, const std::string& package, const std::string& fileSep); virtual void writeBegin(); virtual void writeEnd(); virtual bool commit(const std::vector& includes); private: virtual void doWriteFunctions(const SourceFileAttributes& attributes, bool verbose); std::string getCCallable(const std::string& function) const; std::string getHeaderGuard() const; private: std::string includeDir_; }; // Class which manages generating PackageName_RcppExports.h header file class CppPackageIncludeGenerator : public ExportsGenerator { public: CppPackageIncludeGenerator(const std::string& packageDir, const std::string& package, const std::string& fileSep); virtual void writeBegin() {} virtual void writeEnd(); virtual bool commit(const std::vector& includes); private: virtual void doWriteFunctions(const SourceFileAttributes& attributes, bool verbose) {} std::string getHeaderGuard() const; private: std::string includeDir_; }; // Class which manages generator RcppExports.R class RExportsGenerator : public ExportsGenerator { public: RExportsGenerator(const std::string& packageDir, const std::string& package, const std::string& fileSep); virtual void writeBegin() {} virtual void writeEnd(); virtual bool commit(const std::vector& includes); private: virtual void doWriteFunctions(const SourceFileAttributes& attributes, bool verbose); }; // Class to manage and dispatch to a list of generators class ExportsGenerators { public: typedef std::vector::iterator Itr; ExportsGenerators() {} virtual ~ExportsGenerators(); void add(ExportsGenerator* pGenerator); void writeBegin(); void writeFunctions(const SourceFileAttributes& attributes, bool verbose); void writeEnd(); // Commit and return a list of the files that were updated std::vector commit( const std::vector& includes); // Remove and return a list of files that were removed std::vector remove(); private: // prohibit copying ExportsGenerators(const ExportsGenerators&); ExportsGenerators& operator=(const ExportsGenerators&); private: std::vector generators_; }; // Standalone generation helpers (used by sourceCpp) std::string generateRArgList(const Function& function); void generateCpp(std::ostream& ostr, const SourceFileAttributes& attributes, bool includePrototype, bool cppInterface, const std::string& contextId); } // namespace attributes } // namespace Rcpp /******************************************************************* * AttributesParser.cpp *******************************************************************/ namespace Rcpp { namespace attributes { namespace { Rcpp::List regexMatches(Rcpp::CharacterVector lines, const std::string& regex) { Rcpp::Environment base("package:base"); Rcpp::Function regexec = base["regexec"]; Rcpp::Function regmatches = base["regmatches"]; Rcpp::RObject result = regexec(regex, lines); Rcpp::List matches = regmatches(lines, result); return matches; } // Parse embedded R code chunks from a file (receives the lines of the // file as a CharcterVector for using with regexec and as a standard // stl vector for traversal/insepection) std::vector parseEmbeddedR( Rcpp::CharacterVector linesVector, const std::deque& lines) { Rcpp::List matches = regexMatches(linesVector, "^\\s*/\\*{3,}\\s+[Rr]\\s*$"); bool withinRBlock = false; CommentState commentState; std::vector embeddedR; for (int i = 0; i 0; // check state and do the right thing if (beginRBlock) { withinRBlock = true; } else if (withinRBlock) { if (commentState.inComment()) embeddedR.push_back(line); else withinRBlock = false; } } return embeddedR; } } // anonymous namespace // Generate a type signature for the function with the provided name // (type signature == function pointer declaration) std::string Function::signature(const std::string& name) const { std::ostringstream ostr; ostr << type() << "(*" << name << ")("; const std::vector& args = arguments(); for (std::size_t i = 0; i::const_iterator it = params_.begin(); it != params_.end(); ++it) { if (it->name() == name) return *it; } return Param(); } // Type operator << std::ostream& operator<<(std::ostream& os, const Type& type) { if (!type.empty()) { if (type.isConst()) os << "const "; os << type.name(); if (type.isReference()) os << "&"; } return os; } // Argument operator << std::ostream& operator<<(std::ostream& os, const Argument& argument) { if (!argument.empty()) { os << argument.type(); if (!argument.name().empty()) { os << " "; os << argument.name(); if (!argument.defaultValue().empty()) os << " = " << argument.defaultValue(); } } return os; } // Function operator << std::ostream& operator<<(std::ostream& os, const Function& function) { if (!function.empty()) { if (!function.type().empty()) { os << function.type(); os << " "; } os << function.name(); os << "("; const std::vector& arguments = function.arguments(); for (std::size_t i = 0; i& params = attribute.params(); if (params.size() > 0) { os << "("; for (std::size_t i = 0; i lines; while(std::getline(buffer, line)) { // strip \r (for the case of windows line terminators on posix) if (line.length() > 0 && *line.rbegin() == '\r') line.erase(line.length()-1, 1); lines.push_back(line); } lines_ = Rcpp::wrap(lines); // Scan for attributes CommentState commentState; Rcpp::List matches = regexMatches(lines_, "^\\s*//\\s*\\[\\[Rcpp::(\\w+)(\\(.*?\\))?\\]\\]\\s*$"); for (int i = 0; i 0) { // if the match size isn't 3 then regmatches has not behaved // as expected (it should return a vector of either 0 or 3 // elements). we don't ever expect this to occur but if it // does let's not crash if (match.size() != 3) continue; // add the attribute Attribute attr = parseAttribute( Rcpp::as >(match), i); attributes_.push_back(attr); if( attr.isExportedFunction() ){ functionMap_.insert(attr.function()); } } // if it's not an attribute line then it could still be a // line of interest (e.g. roxygen comment) else { // save roxygen comments if (line.find("//'") == 0) { std::string roxLine = "#" + line.substr(2); roxygenBuffer_.push_back(roxLine); } // a non-roxygen line causes us to clear the roxygen buffer else if (!roxygenBuffer_.empty()) { roxygenChunks_.push_back(roxygenBuffer_); roxygenBuffer_.clear(); } } } // Scan for Rcpp modules commentState.reset(); Rcpp::List modMatches = regexMatches(lines_, "^\\s*RCPP_MODULE\\s*\\(\\s*(\\w+)\\s*\\).*$"); for (int i = 0; i 0) { const char * name = match[1]; modules_.push_back(name); } } // Parse embedded R embeddedR_ = parseEmbeddedR(lines_, lines); } } // Parse an attribute from the vector returned by regmatches Attribute SourceFileAttributesParser::parseAttribute( const std::vector& match, int lineNumber) { // Attribute name std::string name = match[1]; // Warn if this is an unknown attribute if (!isKnownAttribute(name)) { attributeWarning("Unrecognized attribute Rcpp::" + name, lineNumber); } // Extract params if we've got them std::vector params; std::string paramsText = match[2]; if (!paramsText.empty()) { // we know from the regex that it's enclosed in parens so remove // trim before we do this just in case someone updates the regex // to allow for whitespace around the call trimWhitespace(¶msText); paramsText = paramsText.substr(1, paramsText.size()-2); // parse the parameters params = parseParameters(paramsText); } // Extract function signature if this is a function attribute // and it doesn't appear at the end of the file Function function; // special handling for export if (name == kExportAttribute) { // parse the function (unless we are at the end of the file in // which case we print a warning) if ((lineNumber + 1) < lines_.size()) function = parseFunction(lineNumber + 1); else rcppExportWarning("No function found", lineNumber); } // validate interfaces parameter else if (name == kInterfacesAttribute) { if (params.empty()) { rcppInterfacesWarning("No interfaces specified", lineNumber); } else { for (std::size_t i=0; i SourceFileAttributesParser::parseParameters( const std::string& input) { const std::string delimiters(" ,"); std::vector params; std::string::size_type current; std::string::size_type next = -1; do { next = input.find_first_not_of(delimiters, next + 1); if (next == std::string::npos) break; next -= 1; current = next + 1; next = input.find_first_of(delimiters, current); params.push_back(Param(input.substr(current, next - current))); } while(next != std::string::npos); return params; } // Parse a function from the specified spot in the source file Function SourceFileAttributesParser::parseFunction(size_t lineNumber) { // Establish the text to parse for the signature std::string signature = parseSignature(lineNumber); if (signature.empty()) { rcppExportNoFunctionFoundWarning(lineNumber); return Function(); } // Start at the end and look for the () that deliniates the arguments // (bail with an empty result if we can't find them) std::string::size_type endParenLoc = signature.find_last_of(')'); std::string::size_type beginParenLoc = signature.find_first_of('('); if (endParenLoc == std::string::npos || beginParenLoc == std::string::npos || endParenLoc < beginParenLoc) { rcppExportNoFunctionFoundWarning(lineNumber); return Function(); } // Find the type and name by scanning backwards for the whitespace that // delimites the type and name Type type; std::string name; const std::string preambleText = signature.substr(0, beginParenLoc); for (std::string::const_reverse_iterator it = preambleText.rbegin(); it != preambleText.rend(); ++it) { char ch = *it; if (isWhitespace(ch)) { if (!name.empty()) { // we are at the break between type and name so we can also // extract the type std::string typeText; while (++it != preambleText.rend()) typeText.insert(0U, 1U, *it); type = parseType(typeText); // break (since we now have the name and the type) break; } else continue; } else { name.insert(0U, 1U, ch); } } // If we didn't find a name then bail if (name.empty()) { rcppExportNoFunctionFoundWarning(lineNumber); return Function(); } // If we didn't find a type then bail if (type.empty()) { rcppExportWarning("No function return type found", lineNumber); return Function(); } // Now scan for arguments std::vector arguments; std::string argsText = signature.substr(beginParenLoc + 1, endParenLoc-beginParenLoc-1); std::vector args = parseArguments(argsText); for (std::vector::const_iterator it = args.begin(); it != args.end(); ++it) { // Get argument sans whitespace (bail if the arg is empty) std::string arg = *it; trimWhitespace(&arg); if (arg.empty()) { // we don't warn here because the compilation will fail anyway continue; } // If the argument has an = within it then it has a default value std::string defaultValue; std::string::size_type eqPos = arg.find_first_of('='); if ( (eqPos != std::string::npos) && ((eqPos + 1) < arg.size()) ) { defaultValue = arg.substr(eqPos+1); trimWhitespace(&defaultValue); arg = arg.substr(0, eqPos); trimWhitespace(&arg); } // Scan backwards for whitespace to determine where the type ends // (we go backwards because whitespace is valid inside the type // identifier but invalid inside the variable name). Note that if // there is no whitespace we'll end up taking the whole string, // which allows us to capture a type with no variable (but note // we'll ultimately fail to parse types with no variable if they // have embedded whitespace) std::string::size_type pos = arg.find_last_of(kWhitespaceChars); // check for name std::string name; if (pos != std::string::npos) { name = arg.substr(pos); trimWhitespace(&name); } if (name.empty()) { rcppExportInvalidParameterWarning(arg, lineNumber); return Function(); } // check for type string Type type = parseType(arg.substr(0, pos)); if (type.empty()) { rcppExportInvalidParameterWarning(arg, lineNumber); return Function(); } // add argument arguments.push_back(Argument(name, type, defaultValue)); } return Function(type, name, arguments, signature); } // Parse the text of a function signature from the specified line std::string SourceFileAttributesParser::parseSignature(size_t lineNumber) { // Look for the next { std::string signature; for (int i = lineNumber; i SourceFileAttributesParser::parseArguments( const std::string& argText) { int templateCount = 0; int parenCount = 0; bool insideQuotes = false; std::string currentArg; std::vector args; char prevChar = 0; for (std::string::const_iterator it = argText.begin(); it != argText.end(); ++it) { char ch = *it; if (ch == '"' && prevChar != '\\') { insideQuotes = !insideQuotes; } if ((ch == ',') && (templateCount == 0) && (parenCount == 0) && !insideQuotes) { args.push_back(currentArg); currentArg.clear(); continue; } else { currentArg.push_back(ch); switch(ch) { case '<': templateCount++; break; case '>': templateCount--; break; case '(': parenCount++; break; case ')': parenCount--; break; } } prevChar = ch; } if (!currentArg.empty()) args.push_back(currentArg); return args; } Type SourceFileAttributesParser::parseType(const std::string& text) { const std::string constQualifier("const"); const std::string referenceQualifier("&"); // trim whitespace std::string type = text; trimWhitespace(&type); // check for const and reference bool isConst = false; bool isReference = false; if (type.find(constQualifier) == 0) { isConst = true; type.erase(0, constQualifier.length()); } // if the type is now empty (because it was detected as only const) // then this is an invalid state so we bail if (type.empty()) return Type(); if (type.find(referenceQualifier) == (type.length() - referenceQualifier.length())) { isReference = true; type.erase(type.length() - referenceQualifier.length()); } trimWhitespace(&type); // if the type is now empty because of some strange parse then bail if (type.empty()) return Type(); return Type(type, isConst, isReference); } // Validation helpers bool SourceFileAttributesParser::isKnownAttribute(const std::string& name) const { return name == kExportAttribute || name == kDependsAttribute || name == kPluginsAttribute || name == kInterfacesAttribute; } // Print an attribute parsing related warning void SourceFileAttributesParser::attributeWarning( const std::string& message, const std::string& attribute, size_t lineNumber) { // get basename of source file for warning message Rcpp::Function basename = Rcpp::Environment::base_env()["basename"]; std::string file = Rcpp::as(basename(sourceFile_)); std::ostringstream ostr; ostr << message; if (!attribute.empty()) ostr << " for " << attribute << " attribute"; ostr << " at " << file << ":" << lineNumber; showWarning(ostr.str()); } void SourceFileAttributesParser::attributeWarning( const std::string& message, size_t lineNumber) { attributeWarning(message, "", lineNumber); } void SourceFileAttributesParser::rcppExportWarning( const std::string& message, size_t lineNumber) { attributeWarning(message, "Rcpp::export", lineNumber); } void SourceFileAttributesParser::rcppExportNoFunctionFoundWarning( size_t lineNumber) { rcppExportWarning("No function found", lineNumber); } void SourceFileAttributesParser::rcppExportInvalidParameterWarning( const std::string& param, size_t lineNumber) { rcppExportWarning("Invalid parameter: " "'" + param + "'", lineNumber); } void SourceFileAttributesParser::rcppInterfacesWarning( const std::string& message, size_t lineNumber) { attributeWarning(message + " (valid interfaces are 'r' and 'cpp')", "Rcpp::interfaces", lineNumber); } // Track /* */ comment state void CommentState::submitLine(const std::string& line) { std::size_t pos = 0; while (pos != std::string::npos) { // check for a // which would invalidate any other token found std::size_t lineCommentPos = line.find("//", pos); // look for the next token std::string token = inComment() ? "*/" : "/*"; pos = line.find(token, pos); // process the comment token if found if (pos != std::string::npos) { // break if the line comment precedes the comment token if (lineCommentPos != std::string::npos && lineCommentPos < pos) break; inComment_ = !inComment_; pos += token.size(); } } } } // namespace attributes } // namespace Rcpp /******************************************************************* * AttributesGen.cpp *******************************************************************/ namespace Rcpp { namespace attributes { // constants namespace { const char * const kRcppExportsSuffix = "_RcppExports.h"; const char * const kTrySuffix = "_try"; } ExportsGenerator::ExportsGenerator(const std::string& targetFile, const std::string& package, const std::string& commentPrefix) : targetFile_(targetFile), package_(package), commentPrefix_(commentPrefix), hasCppInterface_(false) { // read the existing target file if it exists if (FileInfo(targetFile_).exists()) { std::ifstream ifs(targetFile_.c_str()); if (ifs.fail()) throw Rcpp::file_io_error(targetFile_); std::stringstream buffer; buffer << ifs.rdbuf(); existingCode_ = buffer.str(); } // see if this is safe to overwite and throw if it isn't if (!isSafeToOverwrite()) throw Rcpp::file_exists(targetFile_); } void ExportsGenerator::writeFunctions( const SourceFileAttributes& attributes, bool verbose) { if (attributes.hasInterface(kInterfaceCpp)) hasCppInterface_ = true; doWriteFunctions(attributes, verbose); } // Commit the stream -- is a no-op if the existing code is identical // to the generated code. Returns true if data was written and false // if it wasn't (throws exception on io error) bool ExportsGenerator::commit(const std::string& preamble) { // get the generated code std::string code = codeStream_.str(); // if there is no generated code AND the exports file does not // currently exist then do nothing if (code.empty() && !FileInfo(targetFile_).exists()) return false; // write header/preamble std::ostringstream headerStream; headerStream << commentPrefix_ << " This file was generated by " << "Rcpp::compileAttributes" << std::endl; headerStream << commentPrefix_ << " Generator token: " << generatorToken() << std::endl << std::endl; if (!preamble.empty()) headerStream << preamble; // get generated code and only write it if there was a change std::string generatedCode = headerStream.str() + code; if (generatedCode != existingCode_) { // open the file std::ofstream ofs(targetFile_.c_str(), std::ofstream::out | std::ofstream::trunc); if (ofs.fail()) throw Rcpp::file_io_error(targetFile_); // write generated code and return ofs << generatedCode; ofs.close(); return true; } else { return false; } } // Remove the generated file entirely bool ExportsGenerator::remove() { return removeFile(targetFile_); } CppExportsGenerator::CppExportsGenerator(const std::string& packageDir, const std::string& package, const std::string& fileSep) : ExportsGenerator( packageDir + fileSep + "src" + fileSep + "RcppExports.cpp", package, "//") { } void CppExportsGenerator::doWriteFunctions( const SourceFileAttributes& attributes, bool verbose) { // generate functions generateCpp(ostr(), attributes, true, attributes.hasInterface(kInterfaceCpp), package()); // track cppExports and signatures (we use these at the end to // generate the ValidateSignature and RegisterCCallable functions) if (attributes.hasInterface(kInterfaceCpp)) { for (SourceFileAttributes::const_iterator it = attributes.begin(); it != attributes.end(); ++it) { if (it->isExportedFunction()) { // add it to the list if it's not hidden Function fun = it->function().renamedTo(it->exportedName()); if (!fun.isHidden()) cppExports_.push_back(*it); } } } // verbose if requested if (verbose) { Rcpp::Rcout << "Exports from " << attributes.sourceFile() << ":" << std::endl; for (std::vector::const_iterator it = attributes.begin(); it != attributes.end(); ++it) { if (it->isExportedFunction()) Rcpp::Rcout << " " << it->function() << std::endl; } Rcpp::Rcout << std::endl; } } void CppExportsGenerator::writeEnd() { // generate a function that can be used to validate exported // functions and their signatures prior to looking up with // GetCppCallable (otherwise inconsistent signatures between // client and library would cause a crash) if (hasCppInterface()) { ostr() << std::endl; ostr() << "// validate" << " (ensure exported C++ functions exist before " << "calling them)" << std::endl; ostr() << "static int " << exportValidationFunctionRegisteredName() << "(const char* sig) { " << std::endl; ostr() << " static std::set signatures;" << std::endl; ostr() << " if (signatures.empty()) {" << std::endl; for (std::size_t i=0;i& includes) { // includes std::ostringstream ostr; if (!includes.empty()) { for (std::size_t i=0;i" << std::endl; ostr << "#include " << std::endl; } ostr << std::endl; // always bring in Rcpp ostr << "using namespace Rcpp;" << std::endl << std::endl; // commit with preamble return ExportsGenerator::commit(ostr.str()); } CppExportsIncludeGenerator::CppExportsIncludeGenerator( const std::string& packageDir, const std::string& package, const std::string& fileSep) : ExportsGenerator( packageDir + fileSep + "inst" + fileSep + "include" + fileSep + package + kRcppExportsSuffix, package, "//") { includeDir_ = packageDir + fileSep + "inst" + fileSep + "include"; } void CppExportsIncludeGenerator::writeBegin() { ostr() << "namespace " << package() << " {" << std::endl << std::endl; // Import Rcpp into this namespace. This allows declarations to // be written without fully qualifying all Rcpp types. The only // negative side-effect is that when this package's namespace // is imported it will also pull in Rcpp. However since this is // opt-in and represents a general desire to do namespace aliasing // this seems okay ostr() << " using namespace Rcpp;" << std::endl << std::endl; // Write our export validation helper function. Putting it in // an anonymous namespace will hide it from callers and give // it per-translation unit linkage ostr() << " namespace {" << std::endl; ostr() << " void validateSignature(const char* sig) {" << std::endl; ostr() << " Rcpp::Function require = " << "Rcpp::Environment::base_env()[\"require\"];" << std::endl; ostr() << " require(\"" << package() << "\", " << "Rcpp::Named(\"quietly\") = true);" << std::endl; std::string validate = "validate"; std::string fnType = "Ptr_" + validate; ostr() << " typedef int(*" << fnType << ")(const char*);" << std::endl; std::string ptrName = "p_" + validate; ostr() << " static " << fnType << " " << ptrName << " = " << "(" << fnType << ")" << std::endl << " " << getCCallable(exportValidationFunctionRegisteredName()) << ";" << std::endl; ostr() << " if (!" << ptrName << "(sig)) {" << std::endl; ostr() << " throw Rcpp::function_not_exported(" << std::endl << " " << "\"C++ function with signature '\" + std::string(sig) + \"' not found in " << package() << "\");" << std::endl; ostr() << " }" << std::endl; ostr() << " }" << std::endl; ostr() << " }" << std::endl << std::endl; } void CppExportsIncludeGenerator::doWriteFunctions( const SourceFileAttributes& attributes, bool verbose) { // don't write anything if there is no C++ interface if (!attributes.hasInterface(kInterfaceCpp)) return; for(std::vector::const_iterator it = attributes.begin(); it != attributes.end(); ++it) { if (it->isExportedFunction()) { Function function = it->function().renamedTo(it->exportedName()); // if it's hidden then don't generate a C++ interface if (function.isHidden()) continue; ostr() << " inline " << function << " {" << std::endl; std::string fnType = "Ptr_" + function.name(); ostr() << " typedef SEXP(*" << fnType << ")("; for (size_t i=0; i& args = function.arguments(); for (std::size_t i = 0; i(" << "__result).c_str());" << std::endl; ostr() << " return Rcpp::as<" << function.type() << " >" << "(__result);" << std::endl; ostr() << " }" << std::endl << std::endl; } } } void CppExportsIncludeGenerator::writeEnd() { ostr() << "}" << std::endl; ostr() << std::endl; ostr() << "#endif // " << getHeaderGuard() << std::endl; } bool CppExportsIncludeGenerator::commit( const std::vector& includes) { if (hasCppInterface()) { // create the include dir if necessary createDirectory(includeDir_); // generate preamble std::ostringstream ostr; // header guard std::string guard = getHeaderGuard(); ostr << "#ifndef " << guard << std::endl; ostr << "#define " << guard << std::endl << std::endl; // includes if (!includes.empty()) { for (std::size_t i=0;i& includes) { if (hasCppInterface()) { // create the include dir if necessary createDirectory(includeDir_); // commit return ExportsGenerator::commit(); } else { return ExportsGenerator::remove(); } } std::string CppPackageIncludeGenerator::getHeaderGuard() const { return "__" + package() + "_h__"; } RExportsGenerator::RExportsGenerator(const std::string& packageDir, const std::string& package, const std::string& fileSep) : ExportsGenerator( packageDir + fileSep + "R" + fileSep + "RcppExports.R", package, "#") { } void RExportsGenerator::doWriteFunctions( const SourceFileAttributes& attributes, bool verbose) { // write standalone roxygen chunks const std::vector >& roxygenChunks = attributes.roxygenChunks(); for (std::size_t i = 0; i& chunk = roxygenChunks[i]; for (std::size_t l = 0; l < chunk.size(); l++) ostr() << chunk[l] << std::endl; ostr() << "NULL" << std::endl << std::endl; } // write exported functions if (attributes.hasInterface(kInterfaceR)) { // process each attribute for(std::vector::const_iterator it = attributes.begin(); it != attributes.end(); ++it) { // alias the attribute and function (bail if not export) const Attribute& attribute = *it; if (!attribute.isExportedFunction()) continue; const Function& function = attribute.function(); // print roxygen lines for (size_t i=0; i& arguments = function.arguments(); for (size_t i = 0; i& includes) { return ExportsGenerator::commit(); } ExportsGenerators::~ExportsGenerators() { try { for(Itr it = generators_.begin(); it != generators_.end(); ++it) delete *it; generators_.clear(); } catch(...) {} } void ExportsGenerators::add(ExportsGenerator* pGenerator) { generators_.push_back(pGenerator); } void ExportsGenerators::writeBegin() { for(Itr it = generators_.begin(); it != generators_.end(); ++it) (*it)->writeBegin(); } void ExportsGenerators::writeFunctions( const SourceFileAttributes& attributes, bool verbose) { for(Itr it = generators_.begin(); it != generators_.end(); ++it) (*it)->writeFunctions(attributes, verbose); } void ExportsGenerators::writeEnd() { for(Itr it = generators_.begin(); it != generators_.end(); ++it) (*it)->writeEnd(); } // Commit and return a list of the files that were updated std::vector ExportsGenerators::commit( const std::vector& includes) { std::vector updated; for(Itr it = generators_.begin(); it != generators_.end(); ++it) { if ((*it)->commit(includes)) updated.push_back((*it)->targetFile()); } return updated; } // Remove and return a list of files that were removed std::vector ExportsGenerators::remove() { std::vector removed; for(Itr it = generators_.begin(); it != generators_.end(); ++it) { if ((*it)->remove()) removed.push_back((*it)->targetFile()); } return removed; } // Helpers for converting C++ default arguments to R default arguments namespace { // convert a C++ numeric argument to an R argument value // (returns empty string if no conversion is possible) std::string cppNumericArgToRArg(const std::string& type, const std::string& cppArg) { // check for a number double num; std::stringstream argStream(cppArg); if ((argStream >> num)) { // L suffix means return the value literally if (!argStream.eof()) { std::string suffix; argStream >> suffix; if (argStream.eof() && suffix == "L") return cppArg; } // no decimal and the type isn't explicitly double or // float means integer if (cppArg.find('.') == std::string::npos && type != "double" && type != "float") return cppArg + "L"; // otherwise return arg literally else return cppArg; } else { return std::string(); } } // convert a C++ ::create style argument value to an R argument // value (returns empty string if no conversion is possible) std::string cppCreateArgToRArg(const std::string& cppArg) { std::string create = "::create"; size_t createLoc = cppArg.find(create); if (createLoc == std::string::npos || ((createLoc + create.length()) >= cppArg.size())) { return std::string(); } std::string type = cppArg.substr(0, createLoc); std::string rcppScope = "Rcpp::"; size_t rcppLoc = type.find(rcppScope); if (rcppLoc == 0 && type.size() > rcppScope.length()) type = type.substr(rcppScope.length()); std::string args = cppArg.substr(createLoc + create.length()); if (type == "CharacterVector") return "character" + args; else if (type == "IntegerVector") return "integer" + args; else if (type == "NumericVector") return "numeric" + args; else return std::string(); } // convert a C++ Matrix to an R argument (returns emtpy string // if no conversion possible) std::string cppMatrixArgToRArg(const std::string& cppArg) { // look for Matrix std::string matrix = "Matrix"; size_t matrixLoc = cppArg.find(matrix); if (matrixLoc == std::string::npos || ((matrixLoc + matrix.length()) >= cppArg.size())) { return std::string(); } std::string args = cppArg.substr(matrixLoc + matrix.length()); return "matrix" + args; } // convert a C++ literal to an R argument (returns emtpy string // if no conversion possible) std::string cppLiteralArgToRArg(const std::string& cppArg) { if (cppArg == "true") return "TRUE"; else if (cppArg == "false") return "FALSE"; else if (cppArg == "R_NilValue") return "NULL"; else if (cppArg == "NA_STRING" || cppArg == "NA_INTEGER" || cppArg == "NA_LOGICAL" || cppArg == "NA_REAL") { return "NA"; } else return std::string(); } // convert a C++ argument value to an R argument value (returns empty // string if no conversion is possible) std::string cppArgToRArg(const std::string& type, const std::string& cppArg) { // try for quoted string if (isQuoted(cppArg)) return cppArg; // try for literal std::string rArg = cppLiteralArgToRArg(cppArg); if (!rArg.empty()) return rArg; // try for a create arg rArg = cppCreateArgToRArg(cppArg); if (!rArg.empty()) return rArg; // try for a matrix arg rArg = cppMatrixArgToRArg(cppArg); if (!rArg.empty()) return rArg; // try for a numeric arg rArg = cppNumericArgToRArg(type, cppArg); if (!rArg.empty()) return rArg; // couldn't parse the arg return std::string(); } } // anonymous namespace // Generate an R argument list for a function std::string generateRArgList(const Function& function) { std::ostringstream argsOstr; const std::vector& arguments = function.arguments(); for (size_t i = 0; i::const_iterator it = attributes.begin(); it != attributes.end(); ++it) { // alias the attribute and function (bail if not export) const Attribute& attribute = *it; if (!attribute.isExportedFunction()) continue; const Function& function = attribute.function(); // include prototype if requested if (includePrototype) { ostr << "// " << function.name() << std::endl; ostr << function << ";"; } // write the C++ callable SEXP-based function (this version // returns errors via "try-error") ostr << std::endl; ostr << (cppInterface ? "static" : "RcppExport"); ostr << " SEXP "; std::string funcName = contextId + "_" + function.name(); ostr << funcName; if (cppInterface) ostr << kTrySuffix; ostr << "("; std::ostringstream ostrArgs; const std::vector& arguments = function.arguments(); for (size_t i = 0; i::type " << argument.name() << "(" << argument.name() << "SEXP );" << std::endl; } ostr << " "; if (!function.type().isVoid()) ostr << function.type() << " __result = "; ostr << function.name() << "("; for (size_t i = 0; iempty()) return; // trim right std::string::size_type pos = pStr->find_last_not_of(kWhitespaceChars); if (pos != std::string::npos) pStr->erase(pos + 1); // trim left pos = pStr->find_first_not_of(kWhitespaceChars); pStr->erase(0, pos); } // Strip balanced quotes from around a string (assumes already trimmed) void stripQuotes(std::string* pStr) { if (pStr->length() < 2) return; char quote = *(pStr->begin()); if ( (quote == '\'' || quote == '\"') && (*(pStr->rbegin()) == quote) ) *pStr = pStr->substr(1, pStr->length()-2); } // is the passed string quoted? bool isQuoted(const std::string& str) { if (str.length() < 2) return false; char quote = *(str.begin()); return (quote == '\'' || quote == '\"') && (*(str.rbegin()) == quote); } // show a warning message void showWarning(const std::string& msg) { Rcpp::Function warning = Rcpp::Environment::base_env()["warning"]; warning(msg, Rcpp::Named("call.") = false); } } // namespace attributes } // namespace Rcpp /******************************************************************* * Attributes.cpp *******************************************************************/ using namespace Rcpp::attributes; // Implementation helpers for sourceCppContext namespace { // Class that manages generation of source code for the sourceCpp dynlib class SourceCppDynlib { public: SourceCppDynlib() {} SourceCppDynlib(const std::string& cppSourcePath, Rcpp::List platform) : cppSourcePath_(cppSourcePath) { // get cpp source file info FileInfo cppSourceFilenameInfo(cppSourcePath_); if (!cppSourceFilenameInfo.exists()) throw Rcpp::file_not_found(cppSourcePath_); // record the base name of the source file Rcpp::Function basename = Rcpp::Environment::base_env()["basename"]; cppSourceFilename_ = Rcpp::as(basename(cppSourcePath_)); // get platform info fileSep_ = Rcpp::as(platform["file.sep"]); dynlibExt_ = Rcpp::as(platform["dynlib.ext"]); // generate temp directory Rcpp::Function tempfile = Rcpp::Environment::base_env()["tempfile"]; buildDirectory_ = Rcpp::as(tempfile("sourcecpp_")); std::replace(buildDirectory_.begin(), buildDirectory_.end(), '\\', '/'); Rcpp::Function dircreate = Rcpp::Environment::base_env()["dir.create"]; dircreate(buildDirectory_); // generate a random context id contextId_ = "sourceCpp_" + createRandomizer(); // regenerate the source code regenerateSource(); } bool isEmpty() const { return cppSourcePath_.empty(); } bool isBuilt() const { return FileInfo(dynlibPath()).exists(); }; bool isSourceDirty() const { // source file out of date means we're dirty if (FileInfo(cppSourcePath_).lastModified() > FileInfo(generatedCppSourcePath()).lastModified()) return true; // no dynlib means we're dirty if (!FileInfo(dynlibPath()).exists()) return true; // not dirty return false; } void regenerateSource() { // create new dynlib filename previousDynlibFilename_ = dynlibFilename_; dynlibFilename_ = "sourceCpp_" + createRandomizer() + dynlibExt_; // copy the source file to the build dir Rcpp::Function filecopy = Rcpp::Environment::base_env()["file.copy"]; filecopy(cppSourcePath_, generatedCppSourcePath(), true); // parse attributes SourceFileAttributesParser sourceAttributes(cppSourcePath_); // generate cpp for attributes and append them std::ostringstream ostr; // always include Rcpp.h in case the user didn't ostr << std::endl << std::endl; ostr << "#include " << std::endl; generateCpp(ostr, sourceAttributes, false, false, contextId_); generatedCpp_ = ostr.str(); std::ofstream cppOfs(generatedCppSourcePath().c_str(), std::ofstream::out | std::ofstream::app); if (cppOfs.fail()) throw Rcpp::file_io_error(generatedCppSourcePath()); cppOfs << generatedCpp_; cppOfs.close(); // generate R for attributes and write it into the build directory std::ofstream rOfs(generatedRSourcePath().c_str(), std::ofstream::out | std::ofstream::trunc); if (rOfs.fail()) throw Rcpp::file_io_error(generatedRSourcePath()); // DLLInfo - hide using . and ensure uniqueness using contextId std::string dllInfo = "`." + contextId_ + "_DLLInfo`"; rOfs << dllInfo << " <- dyn.load('" << dynlibPath() << "')" << std::endl << std::endl; // Generate R functions generateR(rOfs, sourceAttributes, dllInfo); // remove the DLLInfo rOfs << std::endl << "rm(" << dllInfo << ")" << std::endl; rOfs.close(); // discover exported functions and dependencies exportedFunctions_.clear(); depends_.clear(); plugins_.clear(); for (SourceFileAttributesParser::const_iterator it = sourceAttributes.begin(); it != sourceAttributes.end(); ++it) { if (it->name() == kExportAttribute && !it->function().empty()) exportedFunctions_.push_back(it->exportedName()); else if (it->name() == kDependsAttribute) { for (size_t i = 0; iparams().size(); ++i) depends_.push_back(it->params()[i].name()); } else if (it->name() == kPluginsAttribute) { for (size_t i = 0; iparams().size(); ++i) plugins_.push_back(it->params()[i].name()); } } // capture modules modules_ = sourceAttributes.modules(); // capture embededded R embeddedR_ = sourceAttributes.embeddedR(); } const std::string& contextId() const { return contextId_; } const std::string& cppSourcePath() const { return cppSourcePath_; } std::string buildDirectory() const { return buildDirectory_; } std::string generatedCpp() const { return generatedCpp_; } std::string cppSourceFilename() const { return cppSourceFilename_; } std::string rSourceFilename() const { return cppSourceFilename() + ".R"; } std::string dynlibFilename() const { return dynlibFilename_; } std::string dynlibPath() const { return buildDirectory_ + fileSep_ + dynlibFilename(); } std::string previousDynlibPath() const { if (!previousDynlibFilename_.empty()) return buildDirectory_ + fileSep_ + previousDynlibFilename_; else return std::string(); } const std::vector& exportedFunctions() const { return exportedFunctions_; } const std::vector& modules() const { return modules_; } const std::vector& depends() const { return depends_; }; const std::vector& plugins() const { return plugins_; }; const std::vector& embeddedR() const { return embeddedR_; } private: std::string generatedCppSourcePath() const { return buildDirectory_ + fileSep_ + cppSourceFilename(); } std::string generatedRSourcePath() const { return buildDirectory_ + fileSep_ + rSourceFilename(); } void generateR(std::ostream& ostr, const SourceFileAttributes& attributes, const std::string& dllInfo) const { // process each attribute for(std::vector::const_iterator it = attributes.begin(); it != attributes.end(); ++it) { // alias the attribute and function (bail if not export) const Attribute& attribute = *it; if (!attribute.isExportedFunction()) continue; const Function& function = attribute.function(); // export the function ostr << attribute.exportedName() << " <- Rcpp:::sourceCppFunction(" << "function(" << generateRArgList(function) << ") {}, " << (function.type().isVoid() ? "TRUE" : "FALSE") << ", " << dllInfo << ", " << "'" << contextId_ + "_" + function.name() << "')" << std::endl; } // modules std::vector modules = attributes.modules(); if (modules.size() > 0) { // modules require definition of C++Object to be loaded ostr << "library(Rcpp)" << std::endl; // load each module for (std::vector::const_iterator it = modules.begin(); it != modules.end(); ++it) { ostr << " populate( Rcpp::Module(\"" << *it << "\"," << dllInfo << "), environment() ) " << std::endl; } } } std::string createRandomizer() { Rcpp::Function sample = Rcpp::Environment::base_env()["sample"]; std::ostringstream ostr; ostr << Rcpp::as(sample(100000, 1)); return ostr.str(); } private: std::string cppSourcePath_; std::string generatedCpp_; std::string cppSourceFilename_; std::string contextId_; std::string buildDirectory_; std::string fileSep_; std::string dynlibFilename_; std::string previousDynlibFilename_; std::string dynlibExt_; std::vector exportedFunctions_; std::vector modules_; std::vector depends_; std::vector plugins_; std::vector embeddedR_; }; // Dynlib cache that allows lookup by either file path or code contents class SourceCppDynlibCache { public: SourceCppDynlibCache() {} private: // prohibit copying SourceCppDynlibCache(const SourceCppDynlibCache&); SourceCppDynlibCache& operator=(const SourceCppDynlibCache&); public: // Insert into cache by file name SourceCppDynlib* insertFile(const std::string& file, const SourceCppDynlib& dynlib) { Entry entry; entry.file = file; entry.dynlib = dynlib; entries_.push_back(entry); return &(entries_.rbegin()->dynlib); } // Insert into cache by code SourceCppDynlib* insertCode(const std::string& code, const SourceCppDynlib& dynlib) { Entry entry; entry.code = code; entry.dynlib = dynlib; entries_.push_back(entry); return &(entries_.rbegin()->dynlib); } // Lookup by file SourceCppDynlib* lookupByFile(const std::string& file) { for (std::size_t i = 0; i < entries_.size(); i++) { if (entries_[i].file == file) return &(entries_[i].dynlib); } return NULL; } // Lookup by code SourceCppDynlib* lookupByCode(const std::string& code) { for (std::size_t i = 0; i < entries_.size(); i++) { if (entries_[i].code == code) return &(entries_[i].dynlib); } return NULL; } private: struct Entry { std::string file; std::string code; SourceCppDynlib dynlib; }; std::vector entries_; }; } // anonymous namespace // Create temporary build directory, generate code as necessary, and return // the context required for the sourceCpp function to complete it's work RcppExport SEXP sourceCppContext(SEXP sFile, SEXP sCode, SEXP sRebuild, SEXP sPlatform) { BEGIN_RCPP // parameters std::string file = Rcpp::as(sFile); std::string code = sCode != R_NilValue ? Rcpp::as(sCode) : ""; bool rebuild = Rcpp::as(sRebuild); Rcpp::List platform = Rcpp::as(sPlatform); // get dynlib (using cache if possible) static SourceCppDynlibCache s_dynlibCache; SourceCppDynlib* pDynlib = !code.empty() ? s_dynlibCache.lookupByCode(code) : s_dynlibCache.lookupByFile(file); // check dynlib build state bool buildRequired = false; // if there is no dynlib in the cache then create one if (pDynlib == NULL) { buildRequired = true; SourceCppDynlib newDynlib(file, platform); if (!code.empty()) pDynlib = s_dynlibCache.insertCode(code, newDynlib); else pDynlib = s_dynlibCache.insertFile(file, newDynlib); } // if the cached dynlib is dirty then regenerate the source else if (rebuild || pDynlib->isSourceDirty()) { buildRequired = true; pDynlib->regenerateSource(); } // if the dynlib hasn't yet been built then note that else if (!pDynlib->isBuilt()) { buildRequired = true; } // return context as a list using namespace Rcpp; return List::create( _["contextId"] = pDynlib->contextId(), _["cppSourcePath"] = pDynlib->cppSourcePath(), _["buildRequired"] = buildRequired, _["buildDirectory"] = pDynlib->buildDirectory(), _["generatedCpp"] = pDynlib->generatedCpp(), _["exportedFunctions"] = pDynlib->exportedFunctions(), _["modules"] = pDynlib->modules(), _["cppSourceFilename"] = pDynlib->cppSourceFilename(), _["rSourceFilename"] = pDynlib->rSourceFilename(), _["dynlibFilename"] = pDynlib->dynlibFilename(), _["dynlibPath"] = pDynlib->dynlibPath(), _["previousDynlibPath"] = pDynlib->previousDynlibPath(), _["depends"] = pDynlib->depends(), _["plugins"] = pDynlib->plugins(), _["embeddedR"] = pDynlib->embeddedR()); END_RCPP } // Compile the attributes within the specified package directory into // RcppExports.cpp and RcppExports.R RcppExport SEXP compileAttributes(SEXP sPackageDir, SEXP sPackageName, SEXP sDepends, SEXP sCppFiles, SEXP sCppFileBasenames, SEXP sIncludes, SEXP sVerbose, SEXP sPlatform) { BEGIN_RCPP // arguments std::string packageDir = Rcpp::as(sPackageDir); std::string packageName = Rcpp::as(sPackageName); Rcpp::CharacterVector vDepends = Rcpp::as(sDepends); std::set depends; for (Rcpp::CharacterVector::iterator it = vDepends.begin(); it != vDepends.end(); ++it) { depends.insert(std::string(*it)); } std::vector cppFiles = Rcpp::as >(sCppFiles); std::vector cppFileBasenames = Rcpp::as >(sCppFileBasenames); std::vector includes = Rcpp::as >(sIncludes); bool verbose = Rcpp::as(sVerbose); Rcpp::List platform = Rcpp::as(sPlatform); std::string fileSep = Rcpp::as(platform["file.sep"]); // initialize generators ExportsGenerators generators; generators.add(new CppExportsGenerator(packageDir, packageName, fileSep)); generators.add(new RExportsGenerator(packageDir, packageName, fileSep)); // catch file exists exception if the include file already exists // and we are unable to overwrite it try { generators.add(new CppExportsIncludeGenerator(packageDir, packageName, fileSep)); } catch(const Rcpp::file_exists& e) { std::string msg = "The header file '" + e.filePath() + "' already exists so " "cannot be overwritten by Rcpp::interfaces"; throw Rcpp::exception(msg.c_str(), __FILE__, __LINE__); } // catch file exists exception for package include (because if it // already exists we simply leave it alone) try { generators.add(new CppPackageIncludeGenerator(packageDir, packageName, fileSep)); } catch(const Rcpp::file_exists& e) {} // write begin generators.writeBegin(); // Parse attributes from each file and generate code as required. bool haveAttributes = false; std::set dependsAttribs; for (std::size_t i=0; iname() == kDependsAttribute) { for (size_t i = 0; iparams().size(); ++i) dependsAttribs.insert(it->params()[i].name()); } } } // write end generators.writeEnd(); // commit or remove std::vector updated; if (haveAttributes) updated = generators.commit(includes); else updated = generators.remove(); // print warning if there are depends attributes that don't have // corresponding entries in the DESCRIPTION file std::vector diff; std::set_difference(dependsAttribs.begin(), dependsAttribs.end(), depends.begin(), depends.end(), std::back_inserter(diff)); if (!diff.empty()) { std::string msg = "The following packages are referenced using Rcpp::depends " "attributes however are not listed in the Depends and LinkingTo " "fields of the package DESCRIPTION file: "; for (size_t i=0; i >(updated); END_RCPP } rcpp-0.11.0/src/Rcpp_init.cpp0000644000000000000000000000760412273452733012664 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // Rcpp_init.cpp : Rcpp R/C++ interface class library -- Initialize and register // // Copyright (C) 2010 - 2013 John Chambers, 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 . #define COMPILING_RCPP #include #include "internal.h" // borrowed from Matrix #define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} #define EXTDEF(name) {#name, (DL_FUNC) &name, -1} static R_CallMethodDef callEntries[] = { CALLDEF(Class__name,1), CALLDEF(Class__has_default_constructor,1), CALLDEF(CppClass__complete,1), CALLDEF(CppClass__methods,1), CALLDEF(CppObject__finalize,2), CALLDEF(Module__classes_info,1), CALLDEF(Module__complete,1), CALLDEF(Module__get_class,2), CALLDEF(Module__has_class,2), CALLDEF(Module__has_function,2), CALLDEF(Module__functions_arity,1), CALLDEF(Module__functions_names,1), CALLDEF(Module__name,1), CALLDEF(Module__get_function, 2), CALLDEF(get_rcpp_cache,0), CALLDEF(rcpp_error_recorder,1), CALLDEF(as_character_externalptr,1), CALLDEF(CppField__get,3), CALLDEF(CppField__set,4), CALLDEF(rcpp_capabilities,0), CALLDEF(rcpp_can_use_cxx0x,0), {NULL, NULL, 0} }; static R_ExternalMethodDef extEntries[] = { EXTDEF(CppMethod__invoke), EXTDEF(CppMethod__invoke_void), EXTDEF(CppMethod__invoke_notvoid), EXTDEF(InternalFunction_invoke), EXTDEF(Module__invoke), EXTDEF(class__newInstance), EXTDEF(class__dummyInstance), {NULL, NULL, 0} } ; // this is called by R_init_Rcpp that is in Module.cpp void init_Rcpp_routines(DllInfo *info){ /* Register routines, allocate resources. */ R_registerRoutines(info, NULL /* .C*/, callEntries /*.Call*/, NULL /* .Fortran */, extEntries /*.External*/ ); } void registerFunctions(){ using namespace Rcpp ; using namespace Rcpp::internal ; #define RCPP_REGISTER(__FUN__) R_RegisterCCallable( "Rcpp", #__FUN__ , (DL_FUNC)__FUN__ ); RCPP_REGISTER(rcpp_get_stack_trace) RCPP_REGISTER(rcpp_set_stack_trace) RCPP_REGISTER(type2name) RCPP_REGISTER(demangle) RCPP_REGISTER(enterRNGScope) RCPP_REGISTER(exitRNGScope) RCPP_REGISTER(get_Rcpp_namespace) RCPP_REGISTER(get_cache) RCPP_REGISTER(stack_trace) RCPP_REGISTER(get_string_elt) RCPP_REGISTER(char_get_string_elt) RCPP_REGISTER(set_string_elt) RCPP_REGISTER(char_set_string_elt) RCPP_REGISTER(get_string_ptr) RCPP_REGISTER(get_vector_elt) RCPP_REGISTER(set_vector_elt) RCPP_REGISTER(get_vector_ptr) RCPP_REGISTER(char_nocheck) RCPP_REGISTER(dataptr) RCPP_REGISTER(getCurrentScope) RCPP_REGISTER(setCurrentScope) RCPP_REGISTER(get_string_buffer) RCPP_REGISTER(short_file_name) RCPP_REGISTER(mktime00) RCPP_REGISTER(gmtime_) RCPP_REGISTER(reset_current_error) RCPP_REGISTER(error_occured) RCPP_REGISTER(rcpp_get_current_error) #undef RCPP_REGISTER } extern "C" void R_unload_Rcpp(DllInfo *info) { /* Release resources. */ } extern "C" void R_init_Rcpp( DllInfo* info){ setCurrentScope(0) ; registerFunctions() ; // init the cache init_Rcpp_cache() ; // init routines init_Rcpp_routines(info) ; } rcpp-0.11.0/src/Module.cpp0000644000000000000000000001470412273452733012161 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*- // // Module.cpp: Rcpp R/C++ interface class library -- Rcpp modules // // Copyright (C) 2010 - 2013 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 . #define COMPILING_RCPP #include #include "internal.h" typedef Rcpp::XPtr XP_Module ; typedef Rcpp::XPtr XP_Class ; typedef Rcpp::XPtr XP_Function ; RCPP_FUN_1( bool, Class__has_default_constructor, XP_Class cl ){ return cl->has_default_constructor() ; } RCPP_FUN_2( SEXP, Module__get_function, XP_Module module, std::string fun ){ return module->get_function( fun ) ; } RCPP_FUN_2( bool, Class__has_method, XP_Class cl, std::string m){ return cl->has_method(m) ; } RCPP_FUN_2( bool, Class__has_property, XP_Class cl, std::string m){ return cl->has_property(m) ; } RCPP_FUN_1( std::string, Class__name, XP_Class cl){ return cl->name ; } RCPP_FUN_2( bool, Module__has_function, XP_Module module, std::string met ){ return module->has_function( met ) ; } RCPP_FUN_2( bool, Module__has_class, XP_Module module, std::string cl ){ return module->has_class( cl ) ; } RCPP_FUN_2( Rcpp::CppClass, Module__get_class, XP_Module module, std::string cl ){ return module->get_class( cl ) ; } RCPP_FUN_1( bool, CppObject__needs_init, SEXP xp ){ return EXTPTR_PTR(xp) == 0 ; } RCPP_FUN_1( Rcpp::CharacterVector, CppClass__methods, XP_Class cl){ return cl->method_names() ; } RCPP_FUN_1( Rcpp::CharacterVector, CppClass__properties, XP_Class cl){ return cl->property_names() ; } RCPP_FUN_1( Rcpp::List, CppClass__property_classes, XP_Class cl){ return cl->property_classes() ; } RCPP_FUN_1( Rcpp::IntegerVector, CppClass__methods_arity, XP_Class cl){ return cl->methods_arity() ; } RCPP_FUN_1( Rcpp::LogicalVector, CppClass__methods_voidness, XP_Class cl){ return cl->methods_voidness() ; } RCPP_FUN_2( bool, CppClass__property_is_readonly, XP_Class cl, std::string p){ return cl->property_is_readonly(p) ; } RCPP_FUN_2( std::string, CppClass__property_class, XP_Class cl, std::string p){ return cl->property_class(p) ; } RCPP_FUN_1( Rcpp::IntegerVector, Module__functions_arity, XP_Module module ){ return module-> functions_arity() ; } RCPP_FUN_1( Rcpp::CharacterVector, Module__functions_names, XP_Module module ){ return module-> functions_names() ; } RCPP_FUN_1( std::string, Module__name, XP_Module module ){ return module->name; } RCPP_FUN_1( Rcpp::List, Module__classes_info, XP_Module module ){ return module->classes_info() ; } RCPP_FUN_1( Rcpp::CharacterVector, Module__complete, XP_Module module ){ return module->complete() ; } RCPP_FUN_1( Rcpp::CharacterVector, CppClass__complete, XP_Class cl){ return cl->complete(); } // these operate directly on the external pointers, rather than // looking up the property in the map RCPP_FUN_3(SEXP, CppField__get, XP_Class cl, SEXP field_xp, SEXP obj){ return cl->getProperty( field_xp, obj ) ; } RCPP_FUN_4(SEXP, CppField__set, XP_Class cl, SEXP field_xp, SEXP obj, SEXP value){ cl->setProperty( field_xp, obj, value ) ; return R_NilValue ; } RCPP_FUN_2(SEXP, CppObject__finalize, XP_Class cl, SEXP obj){ cl->run_finalizer( obj ) ; return R_NilValue ; } // .External functions SEXP InternalFunction_invoke( SEXP args ){ BEGIN_RCPP SEXP p = CDR(args) ; XP_Function fun( CAR(p) ) ; p = CDR(p) ; UNPACK_EXTERNAL_ARGS(cargs,p) return fun->operator()( cargs ) ; END_RCPP } SEXP Module__invoke( SEXP args){ BEGIN_RCPP SEXP p = CDR(args) ; XP_Module module( CAR(p) ) ; p = CDR(p) ; std::string fun = Rcpp::as( CAR(p) ) ; p = CDR(p) ; UNPACK_EXTERNAL_ARGS(cargs,p) return module->invoke( fun, cargs, nargs ) ; END_RCPP } SEXP class__newInstance(SEXP args){ SEXP p = CDR(args) ; XP_Module module( CAR(p) ) ; p = CDR(p) ; XP_Class clazz( CAR(p) ) ; p = CDR(p); UNPACK_EXTERNAL_ARGS(cargs,p) return clazz->newInstance(cargs, nargs ) ; } // relies on being set in .onLoad() SEXP rcpp_dummy_pointer = R_NilValue; #define CHECK_DUMMY_OBJ(p) if(p == rcpp_dummy_pointer) forward_exception_to_r( Rcpp::not_initialized()) SEXP class__dummyInstance(SEXP args) { SEXP p; if(args == R_NilValue) return rcpp_dummy_pointer; p = CDR(args); if(p != R_NilValue) rcpp_dummy_pointer = CAR(p); return rcpp_dummy_pointer; } SEXP CppMethod__invoke(SEXP args){ SEXP p = CDR(args) ; // the external pointer to the class XP_Class clazz( CAR(p) ) ; p = CDR(p); // the external pointer to the method SEXP met = CAR(p) ; p = CDR(p) ; // the external pointer to the object SEXP obj = CAR(p); p = CDR(p) ; CHECK_DUMMY_OBJ(obj); // additional arguments, processed the same way as .Call does UNPACK_EXTERNAL_ARGS(cargs,p) return clazz->invoke( met, obj, cargs, nargs ) ; } SEXP CppMethod__invoke_void(SEXP args){ SEXP p = CDR(args) ; // the external pointer to the class XP_Class clazz( CAR(p) ) ; p = CDR(p); // the external pointer to the method SEXP met = CAR(p) ; p = CDR(p) ; // the external pointer to the object SEXP obj = CAR(p); p = CDR(p) ; CHECK_DUMMY_OBJ(obj); // additional arguments, processed the same way as .Call does UNPACK_EXTERNAL_ARGS(cargs,p) clazz->invoke_void( met, obj, cargs, nargs ) ; return R_NilValue ; } SEXP CppMethod__invoke_notvoid(SEXP args){ SEXP p = CDR(args) ; // the external pointer to the class XP_Class clazz( CAR(p) ) ; p = CDR(p); // the external pointer to the method SEXP met = CAR(p) ; p = CDR(p) ; // the external pointer to the object SEXP obj = CAR(p); p = CDR(p) ; CHECK_DUMMY_OBJ(obj); // additional arguments, processed the same way as .Call does UNPACK_EXTERNAL_ARGS(cargs,p) return clazz->invoke_notvoid( met, obj, cargs, nargs ) ; } namespace Rcpp{ static Module* current_scope ; } Rcpp::Module* getCurrentScope(){ return Rcpp::current_scope ; } void setCurrentScope( Rcpp::Module* scope ){ Rcpp::current_scope = scope ; } rcpp-0.11.0/src/internal.h0000644000000000000000000001253212273452733012212 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // internal.h: Rcpp R/C++ interface class library -- // // Copyright (C) 2012 - 2013 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_internal_h #define Rcpp_internal_h #include #define CALLFUN_0(name) SEXP name() #define CALLFUN_1(name) SEXP name(SEXP) #define CALLFUN_2(name) SEXP name(SEXP,SEXP) #define CALLFUN_3(name) SEXP name(SEXP,SEXP,SEXP) #define CALLFUN_4(name) SEXP name(SEXP,SEXP,SEXP,SEXP) #define CALLFUN_5(name) SEXP name(SEXP,SEXP,SEXP,SEXP,SEXP) #define EXTFUN(name) SEXP name(SEXP) // this file contains declarations of functions that are not // exported via Rcpp.h but are needed to make Rcpp work internally #define MAX_ARGS 65 #define UNPACK_EXTERNAL_ARGS(__CARGS__,__P__) \ SEXP __CARGS__[MAX_ARGS] ; \ int nargs = 0 ; \ for(; nargs. #define COMPILING_RCPP #define USE_RINTERNALS #include #include #include "internal.h" #include #include // [[Rcpp::register]] SEXP get_string_elt(SEXP x, int i){ return STRING_ELT(x, i ) ; } // [[Rcpp::register]] const char* char_get_string_elt(SEXP x, int i){ return CHAR(STRING_ELT(x, i )) ; } // [[Rcpp::register]] void set_string_elt(SEXP x, int i, SEXP value){ STRING_ELT(x, i) = value ; } // [[Rcpp::register]] void char_set_string_elt(SEXP x, int i, const char* value){ STRING_ELT(x, i) = Rf_mkChar(value) ; } // [[Rcpp::register]] SEXP* get_string_ptr(SEXP x){ return STRING_PTR(x) ; } // [[Rcpp::register]] SEXP get_vector_elt(SEXP x, int i){ return VECTOR_ELT(x, i ) ; } // [[Rcpp::register]] void set_vector_elt(SEXP x, int i, SEXP value){ SET_VECTOR_ELT(x, i, value ) ; } // [[Rcpp::register]] SEXP* get_vector_ptr(SEXP x){ return VECTOR_PTR(x) ; } // [[Rcpp::register]] void* dataptr(SEXP x){ return DATAPTR(x); } // [[Rcpp::register]] const char* char_nocheck( SEXP x ){ return CHAR(x); } static bool Rcpp_cache_know = false ; static SEXP Rcpp_cache = R_NilValue ; #define RCPP_HASH_CACHE_INDEX 4 #define RCPP_CACHE_SIZE 5 #ifndef RCPP_HASH_CACHE_INITIAL_SIZE #define RCPP_HASH_CACHE_INITIAL_SIZE 1024 #endif // only used for debugging SEXP get_rcpp_cache() { if( ! Rcpp_cache_know ){ SEXP getNamespaceSym = Rf_install("getNamespace"); // cannot be gc()'ed once in symbol table Rcpp::Shield RCPP( Rf_eval(Rf_lang2( getNamespaceSym, Rf_mkString("Rcpp") ), R_GlobalEnv) ) ; Rcpp_cache = Rf_findVarInFrame( RCPP, Rf_install(".rcpp_cache") ) ; Rcpp_cache_know = true ; } return Rcpp_cache ; } namespace Rcpp { namespace internal { // [[Rcpp::register]] SEXP get_Rcpp_namespace(){ return VECTOR_ELT( get_rcpp_cache() , 0 ) ; } } } // [[Rcpp::register]] SEXP rcpp_get_stack_trace(){ return VECTOR_ELT( get_rcpp_cache(), 3 ) ; } // [[Rcpp::register]] SEXP rcpp_set_stack_trace(SEXP e){ SET_VECTOR_ELT( get_rcpp_cache(), 3, e ) ; return R_NilValue ; } SEXP set_error_occured(SEXP cache, SEXP e){ SET_VECTOR_ELT( cache, 1, e ) ; return R_NilValue ; } SEXP set_current_error(SEXP cache, SEXP e){ SET_VECTOR_ELT( cache, 2, e ) ; return R_NilValue ; } SEXP init_Rcpp_cache(){ SEXP getNamespaceSym = Rf_install("getNamespace"); // cannot be gc()'ed once in symbol table Rcpp::Shield RCPP( Rf_eval(Rf_lang2( getNamespaceSym, Rf_mkString("Rcpp") ), R_GlobalEnv) ) ; Rcpp::Shield cache( Rf_allocVector( VECSXP, RCPP_CACHE_SIZE ) ); // the Rcpp namespace SET_VECTOR_ELT( cache, 0, RCPP ) ; set_error_occured( cache, Rf_ScalarLogical(FALSE) ) ; // error occured set_current_error( cache, R_NilValue ) ; // current error SET_VECTOR_ELT( cache, 3, R_NilValue ) ; // stack trace SET_VECTOR_ELT( cache, RCPP_HASH_CACHE_INDEX, Rf_allocVector(INTSXP, RCPP_HASH_CACHE_INITIAL_SIZE) ) ; Rf_defineVar( Rf_install(".rcpp_cache"), cache, RCPP ); return cache ; } // [[Rcpp::register]] SEXP reset_current_error(){ SEXP cache = get_rcpp_cache() ; // error occured set_error_occured( cache, Rf_ScalarLogical(FALSE) ) ; // current error set_current_error( cache, R_NilValue ) ; // stack trace SET_VECTOR_ELT( cache, 3, R_NilValue ) ; return R_NilValue ; } // [[Rcpp::register]] int error_occured(){ SEXP err = VECTOR_ELT( get_rcpp_cache(), 1 ) ; return LOGICAL(err)[0] ; } // [[Rcpp::internal]] SEXP rcpp_error_recorder(SEXP e){ SEXP cache = get_rcpp_cache() ; // error occured set_error_occured( cache, Rf_ScalarLogical(TRUE) ) ; // current error set_current_error(cache, e ) ; return R_NilValue ; } // [[Rcpp::register]] SEXP rcpp_get_current_error(){ return VECTOR_ELT( get_rcpp_cache(), 2 ) ; } // [[Rcpp::register]] int* get_cache( int m){ SEXP cache = get_rcpp_cache() ; SEXP hash_cache = VECTOR_ELT( cache, RCPP_HASH_CACHE_INDEX) ; int n = Rf_length(hash_cache) ; if( m > n ){ Rcpp::Shield new_hash_cache( Rf_allocVector( INTSXP, m) ) ; hash_cache = new_hash_cache ; SET_VECTOR_ELT(cache,RCPP_HASH_CACHE_INDEX, hash_cache); } int *res = INTEGER(hash_cache) ; std::fill(res, res+m, 0 ) ; return res ; } rcpp-0.11.0/src/Makevars0000644000000000000000000000004312253723677011721 0ustar PKG_CPPFLAGS = -I../inst/include/ rcpp-0.11.0/src/Date.cpp0000644000000000000000000010476012273452733011613 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // jedit: :folding=explicit: // // Date.cpp: Rcpp R/C++ interface class library -- Date type // // Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois // // The mktime00() as well as the gmtime_() replacement function are // Copyright (C) 2000 - 2010 The R Development Core Team. // // gmtime_() etc are from the public domain timezone code dated // 1996-06-05 by Arthur David Olson. // // 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 . #define COMPILING_RCPP #include #include // for gmtime #include namespace Rcpp { // Taken from R's src/main/datetime.c and made a member function called with C++ reference /* Substitute for mktime -- no checking, always in GMT */ // [[Rcpp::register]] double mktime00(struct tm &tm) { static const int days_in_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) #define days_in_year(year) (isleap(year) ? 366 : 365) int day = 0; int i, year, year0; double excess = 0.0; day = tm.tm_mday - 1; year0 = Date::baseYear() + tm.tm_year; /* safety check for unbounded loops */ if (year0 > 3000) { excess = (int)(year0/2000) - 1; year0 -= excess * 2000; } else if (year0 < 0) { excess = -1 - (int)(-year0/2000); year0 -= excess * 2000; } for(i = 0; i < tm.tm_mon; i++) day += days_in_month[i]; if (tm.tm_mon > 1 && isleap(year0)) day++; tm.tm_yday = day; if (year0 > 1970) { for (year = 1970; year < year0; year++) day += days_in_year(year); } else if (year0 < 1970) { for (year = 1969; year >= year0; year--) day -= days_in_year(year); } /* weekday: Epoch day was a Thursday */ if ((tm.tm_wday = (day + 4) % 7) < 0) tm.tm_wday += 7; return tm.tm_sec + (tm.tm_min * 60) + (tm.tm_hour * 3600) + (day + excess * 730485) * 86400.0; } #undef isleap #undef days_in_year #include "sys/types.h" /* for time_t */ #include "string.h" #include "limits.h" /* for CHAR_BIT et al. */ #define _NO_OLDNAMES /* avoid tznames */ #include "time.h" #undef _NO_OLDNAMES #include #ifndef EOVERFLOW # define EOVERFLOW 79 #endif #include "stdlib.h" #include "stdint.h" #include "stdio.h" #include "fcntl.h" #include "float.h" /* for FLT_MAX and DBL_MAX */ #include // solaris needs this for read() and close() /* merged from private.h */ #define TYPE_BIT(type) (sizeof (type) * CHAR_BIT) #define TYPE_SIGNED(type) (((type) -1) < 0) #define TYPE_INTEGRAL(type) (((type) 0.5) != 0.5) #define GRANDPARENTED "Local time zone must be set--see zic manual page" #define YEARSPERREPEAT 400 /* years before a Gregorian repeat */ #define AVGSECSPERYEAR 31556952L #define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) #define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */ #define is_digit(c) ((unsigned)(c) - '0' <= 9) #define INITIALIZE(x) (x = 0) //#include "tzfile.h" // BEGIN ------------------------------------------------------------------------------------------ tzfile.h #ifndef TZFILE_H #define TZFILE_H /* ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. */ /* ** This header is for use ONLY with the time conversion code. ** There is no guarantee that it will remain unchanged, ** or that it will remain at all. ** Do NOT copy it to any system include directory. ** Thank you! */ /* ** Information about time zone files. */ #ifndef TZDIR #define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ #endif /* !defined TZDIR */ #ifndef TZDEFAULT #define TZDEFAULT "localtime" #endif /* !defined TZDEFAULT */ #ifndef TZDEFRULES #define TZDEFRULES "America/New_York" #endif /* !defined TZDEFRULES */ /* ** Each file begins with. . . */ #define TZ_MAGIC "TZif" struct tzhead { char tzh_magic[4]; /* TZ_MAGIC */ char tzh_version[1]; /* '\0' or '2' as of 2005 */ char tzh_reserved[15]; /* reserved--must be zero */ char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ char tzh_leapcnt[4]; /* coded number of leap seconds */ char tzh_timecnt[4]; /* coded number of transition times */ char tzh_typecnt[4]; /* coded number of local time types */ char tzh_charcnt[4]; /* coded number of abbr. chars */ }; /* ** . . .followed by. . . ** ** tzh_timecnt (char [4])s coded transition times a la time(2) ** tzh_timecnt (unsigned char)s types of local time starting at above ** tzh_typecnt repetitions of ** one (char [4]) coded UTC offset in seconds ** one (unsigned char) used to set tm_isdst ** one (unsigned char) that's an abbreviation list index ** tzh_charcnt (char)s '\0'-terminated zone abbreviations ** tzh_leapcnt repetitions of ** one (char [4]) coded leap second transition times ** one (char [4]) total correction after above ** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition ** time is standard time, if FALSE, ** transition time is wall clock time ** if absent, transition times are ** assumed to be wall clock time ** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition ** time is UTC, if FALSE, ** transition time is local time ** if absent, transition times are ** assumed to be local time */ /* ** If tzh_version is '2' or greater, the above is followed by a second instance ** of tzhead and a second instance of the data in which each coded transition ** time uses 8 rather than 4 chars, ** then a POSIX-TZ-environment-variable-style string for use in handling ** instants after the last transition time stored in the file ** (with nothing between the newlines if there is no POSIX representation for ** such instants). */ /* ** In the current implementation, "tzset()" refuses to deal with files that ** exceed any of the limits below. */ #ifndef TZ_MAX_TIMES #define TZ_MAX_TIMES 1200 #endif /* !defined TZ_MAX_TIMES */ #ifndef TZ_MAX_TYPES #ifndef NOSOLAR #define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ #endif /* !defined NOSOLAR */ #ifdef NOSOLAR /* ** Must be at least 14 for Europe/Riga as of Jan 12 1995, ** as noted by Earl Chew. */ #define TZ_MAX_TYPES 20 /* Maximum number of local time types */ #endif /* !defined NOSOLAR */ #endif /* !defined TZ_MAX_TYPES */ #ifndef TZ_MAX_CHARS #define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ /* (limited by what unsigned chars can hold) */ #endif /* !defined TZ_MAX_CHARS */ #ifndef TZ_MAX_LEAPS #define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ #endif /* !defined TZ_MAX_LEAPS */ #define SECSPERMIN 60 #define MINSPERHOUR 60 #define HOURSPERDAY 24 #define DAYSPERWEEK 7 #define DAYSPERNYEAR 365 #define DAYSPERLYEAR 366 #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) #define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) #define MONSPERYEAR 12 #define TM_SUNDAY 0 #define TM_MONDAY 1 #define TM_TUESDAY 2 #define TM_WEDNESDAY 3 #define TM_THURSDAY 4 #define TM_FRIDAY 5 #define TM_SATURDAY 6 #define TM_JANUARY 0 #define TM_FEBRUARY 1 #define TM_MARCH 2 #define TM_APRIL 3 #define TM_MAY 4 #define TM_JUNE 5 #define TM_JULY 6 #define TM_AUGUST 7 #define TM_SEPTEMBER 8 #define TM_OCTOBER 9 #define TM_NOVEMBER 10 #define TM_DECEMBER 11 #define EPOCH_YEAR 1970 #define EPOCH_WDAY TM_THURSDAY #define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) /* ** Since everything in isleap is modulo 400 (or a factor of 400), we know that ** isleap(y) == isleap(y % 400) ** and so ** isleap(a + b) == isleap((a + b) % 400) ** or ** isleap(a + b) == isleap(a % 400 + b % 400) ** This is true even if % means modulo rather than Fortran remainder ** (which is allowed by C89 but not C99). ** We use this to avoid addition overflow problems. */ #define isleap_sum(a, b) isleap((a) % 400 + (b) % 400) #endif /* !defined TZFILE_H */ // -------------------------------------------------------------------------------------- END tzfile.h #ifdef O_BINARY #define OPEN_MODE (O_RDONLY | O_BINARY) #endif /* defined O_BINARY */ #ifndef O_BINARY #define OPEN_MODE O_RDONLY #endif /* !defined O_BINARY */ static const char gmt[] = "GMT"; /* ** The DST rules to use if TZ has no rules and we can't load TZDEFRULES. ** We default to US rules as of 1999-08-17. ** POSIX 1003.1 section 8.1.1 says that the default DST rules are ** implementation dependent; for historical reasons, US rules are a ** common default. */ #ifndef TZDEFRULESTRING #define TZDEFRULESTRING ",M4.1.0,M10.5.0" #endif /* !defined TZDEFDST */ #define BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) #ifdef TZNAME_MAX #define MY_TZNAME_MAX TZNAME_MAX #endif /* defined TZNAME_MAX */ #ifndef TZNAME_MAX #define MY_TZNAME_MAX 255 #endif /* !defined TZNAME_MAX */ struct ttinfo { /* time type information */ long tt_gmtoff; /* UTC offset in seconds */ int tt_isdst; /* used to set tm_isdst */ int tt_abbrind; /* abbreviation list index */ int tt_ttisstd; /* TRUE if transition is std time */ int tt_ttisgmt; /* TRUE if transition is UTC */ }; struct lsinfo { /* leap second information */ time_t ls_trans; /* transition time */ long ls_corr; /* correction to apply */ }; struct state { int leapcnt; int timecnt; int typecnt; int charcnt; int goback; int goahead; time_t ats[TZ_MAX_TIMES]; unsigned char types[TZ_MAX_TIMES]; struct ttinfo ttis[TZ_MAX_TYPES]; char chars[BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt), (2 * (MY_TZNAME_MAX + 1)))]; struct lsinfo lsis[TZ_MAX_LEAPS]; }; struct rule { int r_type; /* type of rule--see below */ int r_day; /* day number of rule */ int r_week; /* week number of rule */ int r_mon; /* month number of rule */ long r_time; /* transition time of rule */ }; #define JULIAN_DAY 0 /* Jn - Julian day */ #define DAY_OF_YEAR 1 /* n - day of year */ #define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ static const int mon_lengths[2][MONSPERYEAR] = { { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } }; static const int year_lengths[2] = { DAYSPERNYEAR, DAYSPERLYEAR }; static int gmt_is_set; //static struct state lclmem; static struct state gmtmem; //#define lclptr (&lclmem) #define gmtptr (&gmtmem) static struct tm tm; //extern const char *getTZinfo(void); static int tzparse(const char * name, struct state * sp, int lastditch); static int typesequiv(const struct state * sp, int a, int b); static const char * getsecs(const char * strp, long * secsp); static const char * getnum(const char * strp, int * const nump, const int min, const int max); static const char * getrule(const char * strp, struct rule * const rulep); static time_t transtime(const time_t janfirst, const int year, const struct rule * const rulep, const long offset); static struct tm * timesub(const time_t * const timep, const long offset, const struct state * const sp, struct tm * const tmp); static int leaps_thru_end_of(const int y); static int increment_overflow(int * number, int delta) { int number0; number0 = *number; *number += delta; return (*number < number0) != (delta < 0); } static long detzcode(const char * const codep) { long result; int i; result = (codep[0] & 0x80) ? ~0L : 0; for (i = 0; i < 4; ++i) result = (result << 8) | (codep[i] & 0xff); return result; } static time_t detzcode64(const char * const codep) { time_t result; int i; result = (codep[0] & 0x80) ? (~(int_fast64_t) 0) : 0; for (i = 0; i < 8; ++i) result = result * 256 + (codep[i] & 0xff); return result; } static int differ_by_repeat(const time_t t1, const time_t t0) { if (TYPE_INTEGRAL(time_t) && TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) return 0; /* R change */ return (int_fast64_t)t1 - (int_fast64_t)t0 == SECSPERREPEAT; } static const char * getzname(const char * strp) { char c; while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' && c != '+') ++strp; return strp; } static const char * getqzname(const char *strp, const int delim) { int c; while ((c = *strp) != '\0' && c != delim) ++strp; return strp; } static const char * getoffset(const char * strp, long * const offsetp) { int neg = 0; if (*strp == '-') { neg = 1; ++strp; } else if (*strp == '+') ++strp; strp = getsecs(strp, offsetp); if (strp == NULL) return NULL; /* illegal time */ if (neg) *offsetp = -*offsetp; return strp; } static const char * getsecs( const char * strp, long * const secsp) { int num; /* ** `HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like ** "M10.4.6/26", which does not conform to Posix, ** but which specifies the equivalent of ** ``02:00 on the first Sunday on or after 23 Oct''. */ strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1); if (strp == NULL) return NULL; *secsp = num * (long) SECSPERHOUR; if (*strp == ':') { ++strp; strp = getnum(strp, &num, 0, MINSPERHOUR - 1); if (strp == NULL) return NULL; *secsp += num * SECSPERMIN; if (*strp == ':') { ++strp; /* `SECSPERMIN' allows for leap seconds. */ strp = getnum(strp, &num, 0, SECSPERMIN); if (strp == NULL) return NULL; *secsp += num; } } return strp; } static const char * getnum(const char * strp, int * const nump, const int min, const int max) { char c; int num; if (strp == NULL || !is_digit(c = *strp)) return NULL; num = 0; do { num = num * 10 + (c - '0'); if (num > max) return NULL; /* illegal value */ c = *++strp; } while (is_digit(c)); if (num < min) return NULL; /* illegal value */ *nump = num; return strp; } static const char * getrule(const char * strp, struct rule * const rulep) { if (*strp == 'J') { /* ** Julian day. */ rulep->r_type = JULIAN_DAY; ++strp; strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); } else if (*strp == 'M') { /* ** Month, week, day. */ rulep->r_type = MONTH_NTH_DAY_OF_WEEK; ++strp; strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); if (strp == NULL) return NULL; if (*strp++ != '.') return NULL; strp = getnum(strp, &rulep->r_week, 1, 5); if (strp == NULL) return NULL; if (*strp++ != '.') return NULL; strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); } else if (is_digit(*strp)) { /* ** Day of year. */ rulep->r_type = DAY_OF_YEAR; strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); } else return NULL; /* invalid format */ if (strp == NULL) return NULL; if (*strp == '/') { /* ** Time specified. */ ++strp; strp = getsecs(strp, &rulep->r_time); } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ return strp; } static int tzload(const char * name, struct state * const sp, const int doextend) { const char * p; int i; int fid; int stored; int nread; union { struct tzhead tzhead; char buf[2 * sizeof(struct tzhead) + 2 * sizeof *sp + 4 * TZ_MAX_TIMES]; } u; sp->goback = sp->goahead = FALSE; /* if (name == NULL && (name = TZDEFAULT) == NULL) return -1; */ if (name == NULL) { // edd 06 Jul 2010 let's do without getTZinfo() //name = getTZinfo(); //if( strcmp(name, "unknown") == 0 ) name = TZDEFAULT; name = TZDEFAULT; } { int doaccess; /* ** Section 4.9.1 of the C standard says that ** "FILENAME_MAX expands to an integral constant expression ** that is the size needed for an array of char large enough ** to hold the longest file name string that the implementation ** guarantees can be opened." */ char fullname[FILENAME_MAX + 1]; // edd 08 Jul 2010 not currently needed const char *sname = name; if (name[0] == ':') ++name; doaccess = name[0] == '/'; if (!doaccess) { char buf[1000]; p = getenv("TZDIR"); if (p == NULL) { snprintf(buf, 1000, "%s/share/zoneinfo", getenv("R_HOME")); buf[999] = '\0'; p = buf; } /* if ((p = TZDIR) == NULL) return -1; */ if ((strlen(p) + strlen(name) + 1) >= sizeof fullname) return -1; (void) strcpy(fullname, p); (void) strcat(fullname, "/"); (void) strcat(fullname, name); /* ** Set doaccess if '.' (as in "../") shows up in name. */ if (strchr(name, '.') != NULL) doaccess = TRUE; name = fullname; } // edd 16 Jul 2010 comment out whole block //if (doaccess && access(name, R_OK) != 0) { // edd 08 Jul 2010 we use this without TZ for dates only // so no need to warn //Rf_warning("unknown timezone '%s'", sname); //return -1; //} if ((fid = open(name, OPEN_MODE)) == -1) { // edd 08 Jul 2010 we use this without TZ for dates only // so no need to warn //Rf_warning("unknown timezone '%s'", sname); return -1; } } nread = read(fid, u.buf, sizeof u.buf); if (close(fid) < 0 || nread <= 0) return -1; for (stored = 4; stored <= 8; stored *= 2) { int ttisstdcnt; int ttisgmtcnt; ttisstdcnt = (int) detzcode(u.tzhead.tzh_ttisstdcnt); ttisgmtcnt = (int) detzcode(u.tzhead.tzh_ttisgmtcnt); sp->leapcnt = (int) detzcode(u.tzhead.tzh_leapcnt); sp->timecnt = (int) detzcode(u.tzhead.tzh_timecnt); sp->typecnt = (int) detzcode(u.tzhead.tzh_typecnt); sp->charcnt = (int) detzcode(u.tzhead.tzh_charcnt); p = u.tzhead.tzh_charcnt + sizeof u.tzhead.tzh_charcnt; if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS || sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES || sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES || sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS || (ttisstdcnt != sp->typecnt && ttisstdcnt != 0) || (ttisgmtcnt != sp->typecnt && ttisgmtcnt != 0)) return -1; if (nread - (p - u.buf) < sp->timecnt * stored + /* ats */ sp->timecnt + /* types */ sp->typecnt * 6 + /* ttinfos */ sp->charcnt + /* chars */ sp->leapcnt * (stored + 4) + /* lsinfos */ ttisstdcnt + /* ttisstds */ ttisgmtcnt) /* ttisgmts */ return -1; for (i = 0; i < sp->timecnt; ++i) { sp->ats[i] = (stored == 4) ? detzcode(p) : detzcode64(p); p += stored; } for (i = 0; i < sp->timecnt; ++i) { sp->types[i] = (unsigned char) *p++; if (sp->types[i] >= sp->typecnt) return -1; } for (i = 0; i < sp->typecnt; ++i) { struct ttinfo * ttisp; ttisp = &sp->ttis[i]; ttisp->tt_gmtoff = detzcode(p); p += 4; ttisp->tt_isdst = (unsigned char) *p++; if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1) return -1; ttisp->tt_abbrind = (unsigned char) *p++; if (ttisp->tt_abbrind < 0 || ttisp->tt_abbrind > sp->charcnt) return -1; } for (i = 0; i < sp->charcnt; ++i) sp->chars[i] = *p++; sp->chars[i] = '\0'; /* ensure '\0' at end */ for (i = 0; i < sp->leapcnt; ++i) { struct lsinfo * lsisp; lsisp = &sp->lsis[i]; lsisp->ls_trans = (stored == 4) ? detzcode(p) : detzcode64(p); p += stored; lsisp->ls_corr = detzcode(p); p += 4; } for (i = 0; i < sp->typecnt; ++i) { struct ttinfo * ttisp; ttisp = &sp->ttis[i]; if (ttisstdcnt == 0) ttisp->tt_ttisstd = FALSE; else { ttisp->tt_ttisstd = *p++; if (ttisp->tt_ttisstd != TRUE && ttisp->tt_ttisstd != FALSE) return -1; } } for (i = 0; i < sp->typecnt; ++i) { struct ttinfo * ttisp; ttisp = &sp->ttis[i]; if (ttisgmtcnt == 0) ttisp->tt_ttisgmt = FALSE; else { ttisp->tt_ttisgmt = *p++; if (ttisp->tt_ttisgmt != TRUE && ttisp->tt_ttisgmt != FALSE) return -1; } } /* ** Out-of-sort ats should mean we're running on a ** signed time_t system but using a data file with ** unsigned values (or vice versa). */ for (i = 0; i < sp->timecnt - 2; ++i) if (sp->ats[i] > sp->ats[i + 1]) { ++i; if (TYPE_SIGNED(time_t)) { /* ** Ignore the end (easy). */ sp->timecnt = i; } else { /* ** Ignore the beginning (harder). */ int j; for (j = 0; j + i < sp->timecnt; ++j) { sp->ats[j] = sp->ats[j + i]; sp->types[j] = sp->types[j + i]; } sp->timecnt = j; } break; } /* ** If this is an old file, we're done. */ if (u.tzhead.tzh_version[0] == '\0') break; nread -= p - u.buf; for (i = 0; i < nread; ++i) u.buf[i] = p[i]; /* ** If this is a narrow integer time_t system, we're done. */ if (stored >= (int) sizeof(time_t) && TYPE_INTEGRAL(time_t)) break; } if (doextend && nread > 2 && u.buf[0] == '\n' && u.buf[nread - 1] == '\n' && sp->typecnt + 2 <= TZ_MAX_TYPES) { struct state ts; int result; u.buf[nread - 1] = '\0'; result = tzparse(&u.buf[1], &ts, FALSE); if (result == 0 && ts.typecnt == 2 && sp->charcnt + ts.charcnt <= TZ_MAX_CHARS) { for (i = 0; i < 2; ++i) ts.ttis[i].tt_abbrind += sp->charcnt; for (i = 0; i < ts.charcnt; ++i) sp->chars[sp->charcnt++] = ts.chars[i]; i = 0; while (i < ts.timecnt && ts.ats[i] <= sp->ats[sp->timecnt - 1]) ++i; while (i < ts.timecnt && sp->timecnt < TZ_MAX_TIMES) { sp->ats[sp->timecnt] = ts.ats[i]; sp->types[sp->timecnt] = sp->typecnt + ts.types[i]; ++sp->timecnt; ++i; } sp->ttis[sp->typecnt++] = ts.ttis[0]; sp->ttis[sp->typecnt++] = ts.ttis[1]; } } i = 2 * YEARSPERREPEAT; sp->goback = sp->goahead = sp->timecnt > i; sp->goback = sp->goback && typesequiv(sp, sp->types[i], sp->types[0]) && differ_by_repeat(sp->ats[i], sp->ats[0]); sp->goahead = sp->goahead && typesequiv(sp, sp->types[sp->timecnt - 1], sp->types[sp->timecnt - 1 - i]) && differ_by_repeat(sp->ats[sp->timecnt - 1], sp->ats[sp->timecnt - 1 - i]); return 0; } static time_t transtime(const time_t janfirst, const int year, const struct rule * const rulep, const long offset) { int leapyear; time_t value; int i; int d, m1, yy0, yy1, yy2, dow; INITIALIZE(value); leapyear = isleap(year); switch (rulep->r_type) { case JULIAN_DAY: /* ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap ** years. ** In non-leap years, or if the day number is 59 or less, just ** add SECSPERDAY times the day number-1 to the time of ** January 1, midnight, to get the day. */ value = janfirst + (rulep->r_day - 1) * SECSPERDAY; if (leapyear && rulep->r_day >= 60) value += SECSPERDAY; break; case DAY_OF_YEAR: /* ** n - day of year. ** Just add SECSPERDAY times the day number to the time of ** January 1, midnight, to get the day. */ value = janfirst + rulep->r_day * SECSPERDAY; break; case MONTH_NTH_DAY_OF_WEEK: /* ** Mm.n.d - nth "dth day" of month m. */ value = janfirst; for (i = 0; i < rulep->r_mon - 1; ++i) value += mon_lengths[leapyear][i] * SECSPERDAY; /* ** Use Zeller's Congruence to get day-of-week of first day of ** month. */ m1 = (rulep->r_mon + 9) % 12 + 1; yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; yy1 = yy0 / 100; yy2 = yy0 % 100; dow = ((26 * m1 - 2) / 10 + 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7; if (dow < 0) dow += DAYSPERWEEK; /* ** "dow" is the day-of-week of the first day of the month. Get ** the day-of-month (zero-origin) of the first "dow" day of the ** month. */ d = rulep->r_day - dow; if (d < 0) d += DAYSPERWEEK; for (i = 1; i < rulep->r_week; ++i) { if (d + DAYSPERWEEK >= mon_lengths[leapyear][rulep->r_mon - 1]) break; d += DAYSPERWEEK; } /* ** "d" is the day-of-month (zero-origin) of the day we want. */ value += d * SECSPERDAY; break; } /* ** "value" is the Epoch-relative time of 00:00:00 UTC on the day in ** question. To get the Epoch-relative time of the specified local ** time on that day, add the transition time and the current offset ** from UTC. */ return value + rulep->r_time + offset; } static int tzparse(const char * name, struct state * const sp, const int lastditch) { const char * stdname; const char * dstname; size_t stdlen; size_t dstlen; long stdoffset; long dstoffset; time_t * atp; unsigned char * typep; char * cp; int load_result; INITIALIZE(dstname); stdname = name; if (lastditch) { stdlen = strlen(name); /* length of standard zone name */ name += stdlen; if (stdlen >= sizeof sp->chars) stdlen = (sizeof sp->chars) - 1; stdoffset = 0; } else { if (*name == '<') { name++; stdname = name; name = getqzname(name, '>'); if (*name != '>') return (-1); stdlen = name - stdname; name++; } else { name = getzname(name); stdlen = name - stdname; } if (*name == '\0') return -1; name = getoffset(name, &stdoffset); if (name == NULL) return -1; } load_result = tzload(TZDEFRULES, sp, FALSE); if (load_result != 0) sp->leapcnt = 0; /* so, we're off a little */ if (*name != '\0') { if (*name == '<') { dstname = ++name; name = getqzname(name, '>'); if (*name != '>') return -1; dstlen = name - dstname; name++; } else { dstname = name; name = getzname(name); dstlen = name - dstname; /* length of DST zone name */ } if (*name != '\0' && *name != ',' && *name != ';') { name = getoffset(name, &dstoffset); if (name == NULL) return -1; } else dstoffset = stdoffset - SECSPERHOUR; if (*name == '\0' && load_result != 0) name = TZDEFRULESTRING; if (*name == ',' || *name == ';') { struct rule start; struct rule end; int year; time_t janfirst; time_t starttime; time_t endtime; ++name; if ((name = getrule(name, &start)) == NULL) return -1; if (*name++ != ',') return -1; if ((name = getrule(name, &end)) == NULL) return -1; if (*name != '\0') return -1; sp->typecnt = 2; /* standard time and DST */ /* ** Two transitions per year, from EPOCH_YEAR forward. */ sp->ttis[0].tt_gmtoff = -dstoffset; sp->ttis[0].tt_isdst = 1; sp->ttis[0].tt_abbrind = stdlen + 1; sp->ttis[1].tt_gmtoff = -stdoffset; sp->ttis[1].tt_isdst = 0; sp->ttis[1].tt_abbrind = 0; atp = sp->ats; typep = sp->types; janfirst = 0; sp->timecnt = 0; for (year = EPOCH_YEAR; sp->timecnt + 2 <= TZ_MAX_TIMES; ++year) { time_t newfirst; starttime = transtime(janfirst, year, &start, stdoffset); endtime = transtime(janfirst, year, &end, dstoffset); if (starttime > endtime) { *atp++ = endtime; *typep++ = 1; /* DST ends */ *atp++ = starttime; *typep++ = 0; /* DST begins */ } else { *atp++ = starttime; *typep++ = 0; /* DST begins */ *atp++ = endtime; *typep++ = 1; /* DST ends */ } sp->timecnt += 2; newfirst = janfirst; newfirst += year_lengths[isleap(year)] * SECSPERDAY; if (newfirst <= janfirst) break; janfirst = newfirst; } } else { long theirstdoffset; long theirdstoffset; long theiroffset; int isdst; int i; int j; if (*name != '\0') return -1; /* ** Initial values of theirstdoffset and theirdstoffset. */ theirstdoffset = 0; for (i = 0; i < sp->timecnt; ++i) { j = sp->types[i]; if (!sp->ttis[j].tt_isdst) { theirstdoffset = -sp->ttis[j].tt_gmtoff; break; } } theirdstoffset = 0; for (i = 0; i < sp->timecnt; ++i) { j = sp->types[i]; if (sp->ttis[j].tt_isdst) { theirdstoffset = -sp->ttis[j].tt_gmtoff; break; } } /* ** Initially we're assumed to be in standard time. */ isdst = FALSE; theiroffset = theirstdoffset; /* ** Now juggle transition times and types ** tracking offsets as you do. */ for (i = 0; i < sp->timecnt; ++i) { j = sp->types[i]; sp->types[i] = sp->ttis[j].tt_isdst; if (sp->ttis[j].tt_ttisgmt) { /* No adjustment to transition time */ } else { /* ** If summer time is in effect, and the ** transition time was not specified as ** standard time, add the summer time ** offset to the transition time; ** otherwise, add the standard time ** offset to the transition time. */ /* ** Transitions from DST to DDST ** will effectively disappear since ** POSIX provides for only one DST ** offset. */ if (isdst && !sp->ttis[j].tt_ttisstd) { sp->ats[i] += dstoffset - theirdstoffset; } else { sp->ats[i] += stdoffset - theirstdoffset; } } theiroffset = -sp->ttis[j].tt_gmtoff; if (sp->ttis[j].tt_isdst) theirdstoffset = theiroffset; else theirstdoffset = theiroffset; } /* ** Finally, fill in ttis. ** ttisstd and ttisgmt need not be handled. */ sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = FALSE; sp->ttis[0].tt_abbrind = 0; sp->ttis[1].tt_gmtoff = -dstoffset; sp->ttis[1].tt_isdst = TRUE; sp->ttis[1].tt_abbrind = stdlen + 1; sp->typecnt = 2; } } else { dstlen = 0; sp->typecnt = 1; /* only standard time */ sp->timecnt = 0; sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = 0; sp->ttis[0].tt_abbrind = 0; } sp->charcnt = stdlen + 1; if (dstlen != 0) sp->charcnt += dstlen + 1; if ((size_t) sp->charcnt > sizeof sp->chars) return -1; cp = sp->chars; (void) strncpy(cp, stdname, stdlen); cp += stdlen; *cp++ = '\0'; if (dstlen != 0) { (void) strncpy(cp, dstname, dstlen); *(cp + dstlen) = '\0'; } return 0; } static int typesequiv(const struct state * const sp, const int a, const int b) { int result; if (sp == NULL || a < 0 || a >= sp->typecnt || b < 0 || b >= sp->typecnt) result = FALSE; else { const struct ttinfo * ap = &sp->ttis[a]; const struct ttinfo * bp = &sp->ttis[b]; result = ap->tt_gmtoff == bp->tt_gmtoff && ap->tt_isdst == bp->tt_isdst && ap->tt_ttisstd == bp->tt_ttisstd && ap->tt_ttisgmt == bp->tt_ttisgmt && strcmp(&sp->chars[ap->tt_abbrind], &sp->chars[bp->tt_abbrind]) == 0; } return result; } static int leaps_thru_end_of(const int y) { return (y >= 0) ? (y / 4 - y / 100 + y / 400) : -(leaps_thru_end_of(-(y + 1)) + 1); } static struct tm * timesub(const time_t * const timep, const long offset, const struct state * const sp, struct tm * const tmp) { const struct lsinfo * lp; time_t tdays; int idays; /* unsigned would be so 2003 */ long rem; int y; const int * ip; long corr; int hit; int i; corr = 0; hit = 0; i = sp->leapcnt; while (--i >= 0) { lp = &sp->lsis[i]; if (*timep >= lp->ls_trans) { if (*timep == lp->ls_trans) { hit = ((i == 0 && lp->ls_corr > 0) || lp->ls_corr > sp->lsis[i - 1].ls_corr); if (hit) while (i > 0 && sp->lsis[i].ls_trans == sp->lsis[i - 1].ls_trans + 1 && sp->lsis[i].ls_corr == sp->lsis[i - 1].ls_corr + 1) { ++hit; --i; } } corr = lp->ls_corr; break; } } y = EPOCH_YEAR; tdays = *timep / SECSPERDAY; rem = *timep - tdays * SECSPERDAY; while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { int newy; time_t tdelta; int idelta; int leapdays; tdelta = tdays / DAYSPERLYEAR; idelta = tdelta; if (tdelta - idelta >= 1 || idelta - tdelta >= 1) return NULL; if (idelta == 0) idelta = (tdays < 0) ? -1 : 1; newy = y; if (increment_overflow(&newy, idelta)) return NULL; leapdays = leaps_thru_end_of(newy - 1) - leaps_thru_end_of(y - 1); tdays -= ((time_t) newy - y) * DAYSPERNYEAR; tdays -= leapdays; y = newy; } { long seconds; seconds = tdays * SECSPERDAY + 0.5; tdays = seconds / SECSPERDAY; rem += seconds - tdays * SECSPERDAY; } /* ** Given the range, we can now fearlessly cast... */ idays = tdays; rem += offset - corr; while (rem < 0) { rem += SECSPERDAY; --idays; } while (rem >= SECSPERDAY) { rem -= SECSPERDAY; ++idays; } while (idays < 0) { if (increment_overflow(&y, -1)) return NULL; idays += year_lengths[isleap(y)]; } while (idays >= year_lengths[isleap(y)]) { idays -= year_lengths[isleap(y)]; // if (increment_overflow(&y, 1)) // commented-out because of nasty g++ -Wall comment // return NULL; } tmp->tm_year = y; tmp->tm_yday = idays; /* ** The "extra" mods below avoid overflow problems. */ tmp->tm_wday = EPOCH_WDAY + ((y - EPOCH_YEAR) % DAYSPERWEEK) * (DAYSPERNYEAR % DAYSPERWEEK) + leaps_thru_end_of(y - 1) - leaps_thru_end_of(EPOCH_YEAR - 1) + idays; tmp->tm_wday %= DAYSPERWEEK; if (tmp->tm_wday < 0) tmp->tm_wday += DAYSPERWEEK; tmp->tm_hour = (int) (rem / SECSPERHOUR); rem %= SECSPERHOUR; tmp->tm_min = (int) (rem / SECSPERMIN); /* ** A positive leap second requires a special ** representation. This uses "... ??:59:60" et seq. */ tmp->tm_sec = (int) (rem % SECSPERMIN) + hit; ip = mon_lengths[isleap(y)]; for (tmp->tm_mon = 0; idays >= ip[tmp->tm_mon]; ++(tmp->tm_mon)) idays -= ip[tmp->tm_mon]; tmp->tm_mday = (int) (idays + 1); tmp->tm_isdst = 0; #ifdef TM_GMTOFF tmp->TM_GMTOFF = offset; #endif /* defined TM_GMTOFF */ return tmp; } static void gmtload(struct state * const sp) { if (tzload(gmt, sp, TRUE) != 0) (void) tzparse(gmt, sp, TRUE); } static struct tm * gmtsub(const time_t * const timep, const long offset, struct tm * const tmp) { struct tm * result; if (!gmt_is_set) { gmt_is_set = TRUE; gmtload(gmtptr); } result = timesub(timep, offset, gmtptr, tmp); return result; } // [[Rcpp::register]] struct tm * gmtime_(const time_t * const timep) { return gmtsub(timep, 0L, &tm); } } rcpp-0.11.0/TODO0000644000000000000000000000766612253723677010150 0ustar Current active misfeatures o Rcpp.package.skeleton() does not work with supplied functions, eg Rcpp.package.skeleton("foo", list=c("funA", "funB")) ends in error. o Sugar ops unit tests on +, -, ... need double, fail with int o DataFrame::create(Named("a")=b, Named("b")=b) fails with NumericVectors Documentation o Finish the quickref vignette o Maybe a vignette about stats functions o Add a vignette about the API API o Rcpp::Factor and Rcpp::Ordered o Fast indexing and g++ 4.5.0 or later: open issue of why this compiler gets upset when the previous version(s) coped just fine o Vector::resize Modules o Class inheritance. Reflect C++ inheritance at the R level. Syntactic sugar o logical indexing, ie NumericVector( LogicalVector ) o recycling : binary operators and math functions of 2 or more arguments need to recycle their arguments. o not sure rep should be lazy, i.e. rep( x, 4 ) fetches x[i] 4 times, maybe we should use LazyVector like in outer to somehow cache the result when it is judged expensive to calculate o crossprod o Vector * Matrix, Matrix * Matrix o operator% o operator/ needs to handle the case of division by 0 o matrix functions : apply o for character vectors: nchar, grepl, sub, gsub o Compound operators: ++,--,+=, -=, ... o other statistical distribution functions : multinom : this only has dmultinom which is handled in R, so maybe we can skip it signrank : has the weird call to .C( "signrank_free" ), need to understand that wilcox : has the weird call to .C( "wilcox_free" ), need to understand that tukey : only has p and q, no r or d o other random generators: rmultinom : tricky because it generates a matrix rnbeta : the R version is implemented in R (not in C), should we still have it in Rcpp in compile code ? rnf : idem rnt : idem Attributes o Allow externally specified build directory for sourceCpp (to support caching across R sessions) o Proactively detect types that can't be handled by as/wrap and print a clearer error message o Add unit tests o Add random = false parameter to Rcpp::export once we support parsing key/value pairs in attribute parameters o Rcpp.package.skeleton should look for Rcpp::depends in cpp_files and call inline plugins, etc. as necessary to create a package that can build the cpp file(s). Note that packages exporting plugins (e.g. Eigen, Armadillo) don't currently provide custom Makevars so this won't quite work for those packages. o Detect useDynLib .registration = TRUE and in that case emit .Call wrappers as symbols rather than strings w/ PACKAGE = o Solution for the problem of sharing/propagating typedefs to RcppExports o Allow use of 'inline' keyword on exported functions o Allow sourceCpp to build an entire directory o Consider allowing local includes in sourceCpp (but compilation cache must pay mind to any local includes) o Support persistence of sourceCpp created functions across sessions (either via long-lived temp dir or via environment persistence) o Additional high-level mechanism for specifying additional build configuration (perhaps cxxflags and libs attributes) o Verify whether sourceCpp still needs to check for spaces in the path of source file names on Windows o Consider adding -Wall and -Wpedantic for sourceCpp builds Testing o all r* functions : rnorm, etc ... o many dpq functions have not been tested yet o new autogenerated sugar functions: cos, acosh, atan, cos, cosh, log, log10, sqrt, sin, sinh, tan, tanh rcpp-0.11.0/DESCRIPTION0000644000000000000000000000706312273452733011147 0ustar Package: Rcpp Title: Seamless R and C++ Integration Version: 0.11.0 Date: 2014-02-02 Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "edd@debian.org" ), person("Romain", "Francois", role = "aut", email = "romain@r-enthusiasts.com"), person("JJ", "Allaire", role = "ctb", email = "jj.allaire@gmail.com"), person("John", "Chambers", role = "ctb", email = "jmc@r-project.org"), person("Douglas", "Bates", role = "ctb", email = "bates@stat.wisc.edu"), person("Kevin", "Ushey", role = "ctb", email = "kevinushey@gmail.com")) Description: The Rcpp package provides R functions as well as a C++ library which facilitate the integration of R and C++. . R data types (SEXP) are matched to C++ objects in a class hierarchy. All R types are supported (vectors, functions, environment, etc ...) and each type is mapped to a dedicated class. For example, numeric vectors are represented as instances of the Rcpp::NumericVector class, environments are represented as instances of Rcpp::Environment, functions are represented as Rcpp::Function, etc ... The "Rcpp-introduction" vignette provides a good entry point to Rcpp. . Conversion from C++ to R and back is driven by the templates Rcpp::wrap and Rcpp::as which are highly flexible and extensible, as documented in the "Rcpp-extending" vignette. . Rcpp also provides Rcpp modules, a framework that allows exposing C++ functions and classes to the R level. The "Rcpp-modules" vignette details the current set of features of Rcpp-modules. . Rcpp includes a concept called Rcpp sugar that brings many R functions into C++. Sugar takes advantage of lazy evaluation and expression templates to achieve great performance while exposing a syntax that is much nicer to use than the equivalent low-level loop code. The "Rcpp-sugar" vignette gives an overview of the feature. . Rcpp attributes provide a high-level syntax for declaring C++ functions as callable from R and automatically generating the code required to invoke them. Attributes are intended to facilitate both interactive use of C++ within R sessions as well as to support R package development. Attributes are built on top of Rcpp modules and their implementation is based on previous work in the inline package. . Many examples are included, and around 891 unit tests in 430 unit test functions provide additional usage examples. . An earlier version of Rcpp, containing what we now call the 'classic Rcpp API' was written during 2005 and 2006 by Dominick Samperi. This code has been factored out of Rcpp into the package RcppClassic, and it is still available for code relying on the older interface. New development should always use this Rcpp package instead. . Additional documentation is available via the paper by Eddelbuettel and Francois (2011, JSS) paper and the book by Eddelbuettel (2013, Springer); see 'citation("Rcpp")' for details. Depends: R (>= 3.0.0) Imports: methods Suggests: RUnit, inline, rbenchmark, highlight VignetteBuilder: highlight URL: http://www.rcpp.org, http://dirk.eddelbuettel.com/code/rcpp.html, https://github.com/RcppCore/Rcpp License: GPL (>= 2) BugReports: https://github.com/RcppCore/Rcpp/issues MailingList: Please send questions and comments regarding Rcpp to rcpp-devel@lists.r-forge.r-project.org Packaged: 2014-02-02 14:27:39.686013 UTC; edd Author: Dirk Eddelbuettel [aut, cre], Romain Francois [aut], JJ Allaire [ctb], John Chambers [ctb], Douglas Bates [ctb], Kevin Ushey [ctb] Maintainer: Dirk Eddelbuettel rcpp-0.11.0/inst/0000755000000000000000000000000012273452733010410 5ustar rcpp-0.11.0/inst/THANKS0000644000000000000000000000371412253723677011336 0ustar In alphabetical order: Baptiste Auguie for additional OS X testing Dario Buttari for a patch permitting compilation under Cygwin Darren Cook for suggesting to remove exception specifiers Laurent Gautier for helpful discussions on R internals Alistair Gee for a patch making ColDatum more robust Toni Giorgino for a bug report concerning erase(iter, iter) Robin Girard for a pointing out that operator+ on Date types was wrong Christian Gunning for a documentation + unit tests patches and reporting bugs Rainer Hurling for help debugging builds issues on FreeBSD Gregor Kastner for noticing a bug in IntegerVector initialization Glenn Lawyer for sending in documentation patches Gong-Yi Liao for a corrected compile-time test for long long variables Uwe Ligges for help with Windows (32 and 64 bit) build issues Tama Ma for a patch that extends Module constructors Karl Millar for a patch helping with a non-g++ compiler Anirban Mukherjee for reporting more clang++ warnings we had not seen Ben North for a bug report and patch concerning iterators Martyn Plummer for help and patches regarding Solaris build issues David Reiss for the first-ever contributed patch (Rcpp*View) Brian Ripley for help with Win64 + Solaris build issues Dominick Samperi for starting what is now in the RcppClassic package Oleg Sklyar for the incredibly cool inline package Alexey Stukalov for a support enabling Intel Compiler 12.0 support Luke Tierney for helpful discussions on R internals Thomas Tse for several patches with small corrections Simon Urbanek for help on OS X build issues and with R internals Ken Williams for additional OS X testing Jelmer Ypma for contributing the Rcout iostreams class patch Yan Zhou for patches improving C++11 and compiler support rcpp-0.11.0/inst/discovery/0000755000000000000000000000000012253723677012425 5ustar rcpp-0.11.0/inst/discovery/cxx0x.R0000644000000000000000000000317012253723677013623 0ustar #!/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() ) }) rcpp-0.11.0/inst/NEWS.Rd0000644000000000000000000022614212273452367011465 0ustar \name{NEWS} \title{News for Package 'Rcpp'} \newcommand{\cpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}} \section{Changes in Rcpp version 0.11.0 (2014-02-02)}{ \itemize{ \item Changes in Rcpp API: \itemize{ \item Functions provided/used by \cpkg{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 \cpkg{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 } } rcpp-0.11.0/inst/CITATION0000644000000000000000000000221012253723677011546 0ustar 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", url = "http://www.jstatsoft.org/v40/i08/", textVersion = paste("Dirk Eddelbuettel and Romain Francois (2011).", "Rcpp: Seamless R and C++ Integration.", "Journal of Statistical Software, 40(8), 1-18.", "URL http://www.jstatsoft.org/v40/i08/.") ) 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", textVersion = paste("Eddelbuettel, Dirk (2013)", "Seamless R and C++ Integration with Rcpp.", "Springer, New York. ISBN 978-1-4614-6867-7.") ) rcpp-0.11.0/inst/unitTests/0000755000000000000000000000000012273214364012406 5ustar rcpp-0.11.0/inst/unitTests/runit.client.package.R0000644000000000000000000000351512253723677016557 0ustar #!/usr/bin/r -t # # Copyright (C) 2010 - 2012 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 now (Dec 2011) appears to fail on Windows .onWindows <- .Platform$OS.type == "windows" .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" .client.package <- function( pkg = "RcppTestA" ){ td <- tempfile() cwd <- getwd() dir.create( td ) file.copy( system.file( "unitTests", pkg, package = "Rcpp" ) , td, recursive = TRUE) setwd( td ) on.exit( { setwd( cwd) ; unlink( td, recursive = TRUE ) } ) R <- shQuote( file.path( R.home( component = "bin" ), "R" )) cmd <- paste( R , "CMD build", pkg ) system( cmd ) dir.create( "templib" ) install.packages( paste( pkg, "_1.0.tar.gz", sep = "" ), "templib", repos = NULL, type = "source" ) require( pkg, "templib", character.only = TRUE ) hello_world <- get( "rcpp_hello_world", asNamespace( pkg ) ) checkEquals( hello_world(), list( c("foo", "bar"), c(0.0, 1.0) ), msg = "code from client package" ) checkException( .Call("hello_world_ex", PACKAGE = pkg ), msg = "exception in client package" ) } if ( .runThisTest && ! .onWindows ) { test.client.packageA <- function(){ .client.package( "RcppTestA" ) } } rcpp-0.11.0/inst/unitTests/runit.table.R0000644000000000000000000000315212273214204014752 0ustar #!/usr/bin/r -t # # Copyright (C) 2014 Dirk Eddelbuettel, Romain Francois, and Kevin Ushey # # 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("table.cpp") table_ <- function(x) c(base::table(x, useNA="ifany")) test.table.numeric <- function() { x <- c(1, 2, 1, 1, NA, NaN, -Inf, Inf) checkEquals( RcppTable(x), table_(x), "table matches R: numeric case") } test.table.integer <- function() { x <- c(-1L, 1L, NA_integer_, NA_integer_, 100L, 1L) checkEquals( RcppTable(x), table_(x), "table matches R: integer case") } test.table.logical <- function() { x <- c(TRUE, TRUE, FALSE, NA) checkEquals( RcppTable(x), table_(x), "table matches R: logical case") } test.table.character <- function() { x <- c("a", "a", "b", "a", NA, NA) checkEquals( RcppTable(x), table_(x), "table matches R: character case") } } rcpp-0.11.0/inst/unitTests/runit.sugar.R0000644000000000000000000004532412273214137015020 0ustar #!/usr/bin/r -t # -*- mode: R; ess-indent-level: 4; indent-tabs-mode: nil; -*- # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("sugar.cpp") test.sugar.abs <- function( ){ x <- rnorm(10) y <- -10:10 checkEquals( runit_abs(x,y) , list( abs(x), abs(y) ) ) } test.sugar.all.one.less <- function( ){ checkTrue( runit_all_one_less( 1 ) ) checkTrue( ! runit_all_one_less( 1:10 ) ) checkTrue( is.na( runit_all_one_less( NA ) ) ) checkTrue( is.na( runit_all_one_less( c( NA, 1) ) ) ) checkTrue( ! runit_all_one_less( c( 6, NA) ) ) } test.sugar.all.one.greater <- function( ){ checkTrue( ! runit_all_one_greater( 1 ) ) checkTrue( ! runit_all_one_greater( 1:10 ) ) checkTrue( runit_all_one_greater( 6:10 ) ) checkTrue( ! runit_all_one_greater( c(NA, 1) ) ) checkTrue( is.na( runit_all_one_greater( c(NA, 6) ) ) ) } test.sugar.all.one.less.or.equal <- function( ){ checkTrue( runit_all_one_less_or_equal( 1 ) ) checkTrue( ! runit_all_one_less_or_equal( 1:10 ) ) checkTrue( is.na( runit_all_one_less_or_equal( NA ) ) ) checkTrue( is.na( runit_all_one_less_or_equal( c( NA, 1) ) ) ) checkTrue( ! runit_all_one_less_or_equal( c( 6, NA) ) ) checkTrue( runit_all_one_less_or_equal( 5 ) ) } test.sugar.all.one.greater.or.equal <- function( ){ fx <- runit_all_one_greater_or_equal checkTrue( ! fx( 1 ) ) checkTrue( ! fx( 1:10 ) ) checkTrue( fx( 6:10 ) ) checkTrue( fx( 5 ) ) checkTrue( ! fx( c(NA, 1) ) ) checkTrue( is.na( fx( c(NA, 6) ) ) ) } test.sugar.all.one.equal <- function( ){ fx <- runit_all_one_equal checkTrue( ! fx( 1 ) ) checkTrue( ! fx( 1:2 ) ) checkTrue( fx( rep(5,4) ) ) checkTrue( is.na( fx( c(5,NA) ) ) ) checkTrue(! fx( c(NA, 1) ) ) } test.sugar.all.one.not.equal <- function( ){ fx <- runit_all_not_equal_one checkTrue( fx( 1 ) ) checkTrue( fx( 1:2 ) ) checkTrue( ! fx( 5 ) ) checkTrue( is.na( fx( c(NA, 1) ) ) ) checkTrue( ! fx( c(NA, 5) ) ) } test.sugar.all.less <- function( ){ fx <- runit_all_less checkTrue( ! fx( 1, 0 ) ) checkTrue( fx( 1:10, 2:11 ) ) checkTrue( fx( 0, 1 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.all.greater <- function( ){ fx <- runit_all_greater checkTrue( fx( 1, 0 ) ) checkTrue( fx( 2:11, 1:10 ) ) checkTrue( ! fx( 0, 1 ) ) checkTrue( ! fx( 0:9, c(0:8,10) ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.all.less.or.equal <- function( ){ fx <- runit_all_less_or_equal checkTrue( fx( 1, 1 ) ) checkTrue( ! fx( 1:2, c(1,1) ) ) checkTrue( fx( 0, 1 ) ) checkTrue( ! fx( 1, 0 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.all.greater.or.equal <- function( ){ fx <- runit_all_greater_or_equal checkTrue( fx( 1, 1 ) ) checkTrue( fx( 1:2, c(1,1) ) ) checkTrue( ! fx( 0, 1 ) ) checkTrue( fx( 1, 0 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.all.equal <- function( ){ fx <- runit_all_equal checkTrue( fx( 1, 1 ) ) checkTrue( ! fx( 1:2, c(1,1) ) ) checkTrue( ! fx( 0, 1 ) ) checkTrue( ! fx( 1, 0 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.all.not.equal <- function( ){ fx <- runit_all_not_equal checkTrue( ! fx( 1, 1 ) ) checkTrue( ! fx( 1:2, c(1,1) ) ) checkTrue( fx( 0, 1 ) ) checkTrue( fx( 1, 0 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.any.less <- function( ){ fx <- runit_any_less checkTrue( ! fx( 1, 0 ) ) checkTrue( fx( 1:10, 2:11 ) ) checkTrue( fx( 0, 1 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.any.greater <- function( ){ fx <- runit_any_greater checkTrue( fx( 1, 0 ) ) checkTrue( fx( 2:11, 1:10 ) ) checkTrue( ! fx( 0, 1 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.any.less.or.equal <- function( ){ fx <- runit_any_less_or_equal checkTrue( fx( 1, 1 ) ) checkTrue( fx( 1:2, c(1,1) ) ) checkTrue( fx( 0, 1 ) ) checkTrue( ! fx( 1, 0 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.any.greater.or.equal <- function( ){ fx <- runit_any_greater_or_equal checkTrue( fx( 1, 1 ) ) checkTrue( fx( 1:2, c(1,1) ) ) checkTrue( ! fx( 0, 1 ) ) checkTrue( fx( 1, 0 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.any.equal <- function( ){ fx <- runit_any_equal checkTrue( fx( 1, 1 ) ) checkTrue( fx( 1:2, c(1,1) ) ) checkTrue( ! fx( 0, 1 ) ) checkTrue( ! fx( 1, 0 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.any.not.equal <- function( ){ fx <- runit_any_not_equal checkTrue( ! fx( 1, 1 ) ) checkTrue( fx( 1:2, c(1,1) ) ) checkTrue( fx( 0, 1 ) ) checkTrue( fx( 1, 0 ) ) checkTrue( is.na( fx( NA, 1 ) ) ) } test.sugar.constructor <- function( ){ fx <- runit_constructor checkEquals( fx( 1, 0 ), FALSE ) checkEquals( fx( 1:10, 2:11 ), rep(TRUE,10) ) checkEquals( fx( 0, 1 ), TRUE ) checkTrue( identical( fx( NA, 1 ), NA ) ) } test.sugar.assignment <- function( ){ fx <- runit_assignment checkEquals( fx( 1, 0 ), FALSE ) checkEquals( fx( 1:10, 2:11 ), rep(TRUE,10) ) checkEquals( fx( 0, 1 ), TRUE ) checkTrue( identical( fx( NA, 1 ), NA ) ) } test.sugar.diff <- function( ){ x <- as.integer(round(rnorm(100,1,100))) checkEquals( runit_diff_int(x) , diff(x) ) x <- rnorm( 100 ) checkEquals( runit_diff(x) , diff(x) ) y <- rnorm(100) pred <- sample( c(T,F), 99, replace = TRUE ) checkEquals( runit_diff_ifelse(pred, x, y ), ifelse( pred, diff(x), diff(y) ) ) } test.sugar.exp <- function( ){ fx <- runit_exp x <- rnorm(10) y <- -10:10 checkEquals( fx(x,y) , list( exp(x), exp(y) ) ) } test.sugar.floor <- function( ){ fx <- runit_floor x <- rnorm(10) y <- -10:10 checkEquals( fx(x,y) , list( floor(x), floor(y) ) ) } test.sugar.ceil <- function( ){ fx <- runit_ceil x <- rnorm(10) y <- -10:10 checkEquals( fx(x,y) , list( ceiling(x), ceiling(y) ) ) } test.sugar.pow <- function( ){ fx <- runit_pow x <- rnorm(10) y <- -10:10 checkEquals( fx(x,y) , list( x^3L , y^2.3 ) ) } test.sugar.ifelse <- function( ){ fx <- runit_ifelse x <- 1:10 y <- 10:1 checkEquals( fx( x, y), list( "vec_vec" = ifelse( x x, x <= 2, 2 != x), "sugar vector scalar logical operations") } test.vector.vector.ops <- function( ){ x <- rnorm(10) y <- runif(10) checkEquals(vector_vector_ops(x,y), list(x + y, y - x, x * y, y / x), "sugar vector vector operations") } test.vector.vector.logical <- function( ){ x <- rnorm(10) y <- runif(10) checkEquals(vector_vector_logical(x,y), list(x < y, x > y, x <= y, x >= y, x == y, x != y), "sugar vector vector operations") } } rcpp-0.11.0/inst/unitTests/runit.Reference.R0000644000000000000000000000237112273213765015576 0ustar #!/usr/bin/r -t # # Copyright (C) 2013 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("Reference.cpp") test.Reference <- function(){ Instrument <- setRefClass( Class="Instrument", fields=list("id"="character", "description"="character") ) Instrument$accessors(c("id", "description")) instrument <- Instrument$new(id="AAPL", description="Apple") checkEquals( runit_Reference_getId(instrument), "AAPL", msg = ".field" ) } } rcpp-0.11.0/inst/unitTests/runit.DataFrame.R0000644000000000000000000000640512273213253015516 0ustar #!/usr/bin/r -t # -*- mode: R; tab-width: 4; -*- # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("DataFrame.cpp") test.DataFrame.FromSEXP <- function() { DF <- data.frame(a=1:3, b=c("a","b","c")) checkEquals( FromSEXP(DF), DF, msg = "DataFrame pass-through") } test.DataFrame.index.byName <- function() { DF <- data.frame(a=1:3, b=c("a","b","c")) checkEquals( index_byName(DF, "a"), DF$a, msg = "DataFrame column by name 'a'") checkEquals( index_byName(DF, "b"), DF$b, msg = "DataFrame column by name 'b'") } test.DataFrame.index.byPosition <- function() { DF <- data.frame(a=1:3, b=c("a","b","c")) checkEquals( index_byPosition(DF, 0), DF$a, msg = "DataFrame column by position 0") checkEquals( index_byPosition(DF, 1), DF$b, msg = "DataFrame column by position 1") } test.DataFrame.string.element <- function() { DF <- data.frame(a=1:3, b=c("a","b","c"), stringsAsFactors=FALSE) checkEquals( string_element(DF), DF[2,"b"], msg = "DataFrame string element") } test.DataFrame.CreateOne <- function() { DF <- data.frame(a=1:3) checkEquals( createOne(), DF, msg = "DataFrame create1") } test.DataFrame.CreateTwo <- function() { DF <- data.frame(a=1:3, b=c("a","b","c")) checkEquals( createTwo(), DF, msg = "DataFrame create2") } test.DataFrame.SlotProxy <- function(){ setClass("track", representation(x="data.frame", y = "function")) df <- data.frame( x = 1:10, y = 1:10 ) tr1 <- new( "track", x = df, y = rnorm ) checkTrue( identical( SlotProxy(tr1, "x"), df ), msg = "DataFrame( SlotProxy )" ) checkException( SlotProxy(tr1, "y"), msg = "DataFrame( SlotProxy ) -> exception" ) } test.DataFrame.AttributeProxy <- function(){ df <- data.frame( x = 1:10, y = 1:10 ) tr1 <- structure( NULL, x = df, y = rnorm ) checkTrue( identical( AttributeProxy(tr1, "x"), df) , msg = "DataFrame( AttributeProxy )" ) checkException( AttributeProxy(tr1, "y"), msg = "DataFrame( AttributeProxy ) -> exception" ) } test.DataFrame.CreateTwo.stringsAsFactors <- function() { DF <- data.frame(a=1:3, b=c("a","b","c"), stringsAsFactors = FALSE ) checkEquals( createTwoStringsAsFactors(), DF, msg = "DataFrame create2 stringsAsFactors = false") } test.DataFrame.nrows <- function(){ df <- data.frame( x = 1:10, y = 1:10 ) checkEquals( DataFrame_nrows( df ), nrow(df) ) } } rcpp-0.11.0/inst/unitTests/runit.wstring.R0000644000000000000000000000304612273214341015364 0ustar #!/usr/bin/r -t # -*- mode: R; tab-width: 4; -*- # # Copyright (C) 2013 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if ( .runThisTest) { .setUp <- Rcpp:::unitTestSetup("wstring.cpp") test.CharacterVector_wstring <- function(){ res <- CharacterVector_wstring() checkEquals( res, c("foobar", "foobar" ) ) } test.wstring_return <- function(){ checkEquals( wstring_return(), "foo" ) } test.wstring_param <- function(){ checkEquals( wstring_param( "foo", "bar" ), "foobar" ) } test.wrap_vector_wstring <- function(){ checkEquals( wrap_vector_wstring( ), c("foo", "bar" ) ) } ##test.as_vector_wstring <- function(){ ## ## the "€" did not survive on Windows, so trying its unicode equivalent ## checkEquals( as_vector_wstring(letters), paste0( letters, "\u20ac" ) ) ##} } rcpp-0.11.0/inst/unitTests/runit.Rcpp.package.skeleton.R0000644000000000000000000001500412273213744020013 0ustar # Copyright (C) 2013 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { test.Rcpp.package.skeleton <- function(){ tempdir <- tempdir() path <- tempdir pkg_path <- file.path(path, "foo") R_path <- file.path(pkg_path, "R") src_path <- file.path(pkg_path, "src") env <- new.env() env$funA <- function(alpha, beta) "gamma" env$funB <- function(first, ..., last) "foo" Rcpp.package.skeleton("foo", path=path, list=c("funA", "funB"), author="Boo-Boo Bear", maintainer="Yogi Bear", license="An Opensource License", email="yogibear@yogimail.com", environment=env ) on.exit(unlink(pkg_path, recursive=TRUE)) checkTrue( "foo" %in% list.files(path), "pkg path generated as named" ) ## check the DESCRIPTION DESCRIPTION <- as.list( read.dcf( file.path(pkg_path, "DESCRIPTION") )[1,] ) checkTrue( DESCRIPTION["Author"] == "Boo-Boo Bear", "wrote the Author field in DESCRIPTION" ) checkTrue( DESCRIPTION["Maintainer"] == "Yogi Bear ", "wrote the Maintainer field in DESCRIPTION") checkTrue( DESCRIPTION["License"] == "An Opensource License", "wrote the License field in DESCRIPTION" ) checkTrue( DESCRIPTION["LinkingTo"] == "Rcpp", "we make sure that we 'link' to Rcpp (use its headers)" ) ## make sure we have useDynLib in the namespace NAMESPACE <- readLines( file.path(pkg_path, "NAMESPACE") ) ## note: we use regular expressions anticipating a possible future ## usage of e.g. '.registration=TRUE' in Rcpp.package.skeleton checkTrue( any(grepl( "useDynLib(foo", NAMESPACE, fixed=TRUE )), "NAMESPACE has useDynLib(foo)" ) R_files <- list.files(R_path, full.names=TRUE) checkTrue( all( c("funA.R", "funB.R") %in% list.files(R_path)), "created R files from functions" ) for (file in grep("RcppExports.R", R_files, invert=TRUE, value=TRUE)) { code <- readLines(file) fn <- eval(parse(text=paste(code, collapse="\n"))) fn_name <- gsub(".*/(.*)\\.R$", "\\1", file) checkIdentical(fn, get(fn_name), sprintf("we parsed the function '%s' correctly", fn_name) ) } ## make sure we can build the package as generated ## note: the generated .Rd placeholders are insufficient to be able ## to successfully install the pkg; e.g. I see ## Error in Rd_info(db[[i]]) : ## missing/empty \title field in '/funA.Rd' invisible(sapply( list.files( file.path(pkg_path, "man"), full.names=TRUE), unlink )) owd <- getwd() setwd(path) on.exit( setwd(owd), add=TRUE ) R <- shQuote( file.path( R.home( component = "bin" ), "R" )) system( paste(R, "CMD build", pkg_path) ) checkTrue( file.exists("foo_1.0.tar.gz"), "can successfully R CMD build the pkg") dir.create("templib") install.packages("foo_1.0.tar.gz", file.path(path, "templib"), repos=NULL, type="source") on.exit( unlink( file.path(path, "foo_1.0.tar.gz") ), add=TRUE) require("foo", file.path(path, "templib"), character.only=TRUE) on.exit( unlink( file.path(path, "templib"), recursive=TRUE), add=TRUE ) } test.Rcpp.package.skeleton.Attributes <- function(){ tempdir <- tempdir() path <- tempdir pkg_path <- file.path(path, "foo") R_path <- file.path(pkg_path, "R") src_path <- file.path(pkg_path, "src") Rcpp.package.skeleton("foo", path=path, attributes=TRUE, example_code=TRUE, environment=environment()) on.exit( unlink(pkg_path, recursive=TRUE) ) checkTrue( file.exists( file.path(src_path, "RcppExports.cpp") ), "RcppExports.cpp was created") checkTrue( file.exists( file.path(src_path, "rcpp_hello_world.cpp") ), "rcpp_hello_world.cpp was created" ) checkTrue( file.exists( file.path(R_path, "RcppExports.R") ), "RcppExports.R was created") } test.Rcpp.package.skeleton.NoAttributes <- function(){ tempdir <- tempdir() path <- tempdir pkg_path <- file.path(path, "foo") R_path <- file.path(pkg_path, "R") src_path <- file.path(pkg_path, "src") Rcpp.package.skeleton("foo", path=path, attributes=FALSE, example_code=TRUE, environment=environment()) on.exit( unlink(pkg_path, recursive=TRUE) ) checkTrue( file.exists( file.path(src_path, "rcpp_hello_world.cpp") ), "rcpp_hello_world.cpp was created") checkTrue( file.exists( file.path(src_path, "rcpp_hello_world.h") ), "rcpp_hello_world.h was created") checkTrue( file.exists( file.path(R_path, "rcpp_hello_world.R") ), "rcpp_hello_world.R was created" ) } test.Rcpp.package.skeleton.Module <- function(){ tempdir <- tempdir() path <- tempdir pkg_path <- file.path(path, "foo") R_path <- file.path(pkg_path, "R") src_path <- file.path(pkg_path, "src") Rcpp.package.skeleton("foo", path=path, module=TRUE, environment=environment()) on.exit( unlink(pkg_path, recursive=TRUE) ) checkTrue( file.exists( file.path(src_path, "rcpp_module.cpp") ), "rcpp_module.cpp was created" ) } } rcpp-0.11.0/inst/unitTests/runit.Language.R0000644000000000000000000001621112273213414015410 0ustar #!/usr/bin/r -t # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("language.cpp") test.Language <- function(){ checkEquals( runit_language( call("rnorm") ), call("rnorm" ), msg = "Language( LANGSXP )" ) checkException( runit_language(test.Language), msg = "Language not compatible with function" ) checkException( runit_language(new.env()), msg = "Language not compatible with environment" ) checkException( runit_language(1:10), msg = "Language not compatible with integer" ) checkException( runit_language(TRUE), msg = "Language not compatible with logical" ) checkException( runit_language(1.3), msg = "Language not compatible with numeric" ) checkException( runit_language(as.raw(1) ), msg = "Language not compatible with raw" ) } test.Language.variadic <- function(){ checkEquals( runit_lang_variadic_1(), call("rnorm", 10L, 0.0, 2.0 ), msg = "variadic templates" ) checkEquals( runit_lang_variadic_2(), call("rnorm", 10L, mean = 0.0, 2.0 ), msg = "variadic templates (with names)" ) } # same as above but without variadic templates test.Language.push.back <- function(){ checkEquals( runit_lang_push_back(), call("rnorm", 10L, mean = 0.0, 2.0 ), msg = "Language::push_back" ) } test.Language.square <- function(){ checkEquals( runit_lang_square_rv(), 10.0, msg = "Language::operator[] used as rvalue" ) checkEquals( runit_lang_square_lv(), call("rnorm", "foobar", 20.0, 20.0) , msg = "Pairlist::operator[] used as lvalue" ) } test.Language.function <- function(){ checkEquals( runit_lang_fun(sort, sample(1:10)), 1:10, msg = "Language( Function ) " ) } test.Language.inputoperator <- function(){ checkEquals( runit_lang_inputop(), call("rnorm", 10L, sd = 10L ) , msg = "Language<<" ) } test.Language.unary.call <- function(){ checkEquals( runit_lang_unarycall( 1:10 ), lapply( 1:10, function(n) seq(from=n, to = 0 ) ), msg = "c++ lapply using calls" ) } test.Language.unary.call.index <- function(){ checkEquals( runit_lang_unarycallindex( 1:10 ), lapply( 1:10, function(n) seq(from=10, to = n ) ), msg = "c++ lapply using calls" ) } test.Language.binary.call <- function(){ checkEquals( runit_lang_binarycall( 1:10, 11:20 ), lapply( 1:10, function(n) seq(n, n+10) ), msg = "c++ lapply using calls" ) } test.Language.fixed.call <- function(){ set.seed(123) res <- runit_lang_fixedcall() set.seed(123) exp <- lapply( 1:10, function(n) rnorm(10) ) checkEquals( res, exp, msg = "std::generate" ) } test.Language.in.env <- function(){ e <- new.env() e[["y"]] <- 1:10 checkEquals( runit_lang_inenv(e), sum(1:10), msg = "Language::eval( SEXP )" ) } test.Pairlist <- function(){ checkEquals( runit_pairlist( pairlist("rnorm") ), pairlist("rnorm" ), msg = "Pairlist( LISTSXP )" ) checkEquals( runit_pairlist( call("rnorm") ), pairlist(as.name("rnorm")), msg = "Pairlist( LANGSXP )" ) checkEquals( runit_pairlist(1:10), as.pairlist(1:10) , msg = "Pairlist( INTSXP) " ) checkEquals( runit_pairlist(TRUE), as.pairlist( TRUE) , msg = "Pairlist( LGLSXP )" ) checkEquals( runit_pairlist(1.3), as.pairlist(1.3), msg = "Pairlist( REALSXP) " ) checkEquals( runit_pairlist(as.raw(1) ), as.pairlist(as.raw(1)), msg = "Pairlist( RAWSXP)" ) checkException( runit_pairlist(runit_pairlist), msg = "Pairlist not compatible with function" ) checkException( runit_pairlist(new.env()), msg = "Pairlist not compatible with environment" ) } test.Pairlist.variadic <- function(){ checkEquals( runit_pl_variadic_1(), pairlist("rnorm", 10L, 0.0, 2.0 ), msg = "variadic templates" ) checkEquals( runit_pl_variadic_2(), pairlist("rnorm", 10L, mean = 0.0, 2.0 ), msg = "variadic templates (with names)" ) } test.Pairlist.push.front <- function(){ checkEquals( runit_pl_push_front(), pairlist( foobar = 10, "foo", 10.0, 1L), msg = "Pairlist::push_front" ) } test.Pairlist.push.back <- function(){ checkEquals( runit_pl_push_back(), pairlist( 1L, 10.0, "foo", foobar = 10), msg = "Pairlist::push_back" ) } test.Pairlist.insert <- function(){ checkEquals( runit_pl_insert(), pairlist( 30.0, 1L, bla = "bla", 10.0, 20.0, "foobar" ), msg = "Pairlist::replace" ) } test.Pairlist.replace <- function(){ checkEquals( runit_pl_replace(), pairlist( first = 1, 20.0 , FALSE), msg = "Pairlist::replace" ) } test.Pairlist.size <- function(){ checkEquals( runit_pl_size(), 3L, msg = "Pairlist::size()" ) } test.Pairlist.remove <- function(){ checkEquals( runit_pl_remove_1(), pairlist(10.0, 20.0), msg = "Pairlist::remove(0)" ) checkEquals( runit_pl_remove_2(), pairlist(1L, 10.0), msg = "Pairlist::remove(0)" ) checkEquals( runit_pl_remove_3(), pairlist(1L, 20.0), msg = "Pairlist::remove(0)" ) } test.Pairlist.square <- function(){ checkEquals( runit_pl_square_1(), 10.0, msg = "Pairlist::operator[] used as rvalue" ) checkEquals( runit_pl_square_2(), pairlist(1L, "foobar", 1L) , msg = "Pairlist::operator[] used as lvalue" ) } test.Formula <- function(){ checkEquals( runit_formula_(), x ~ y + z, msg = "Formula( string )" ) } test.Formula.SEXP <- function(){ checkEquals( runit_formula_SEXP( x ~ y + z), x ~ y + z, msg = "Formula( SEXP = formula )" ) checkEquals( runit_formula_SEXP( "x ~ y + z" ), x ~ y + z, msg = "Formula( SEXP = STRSXP )" ) checkEquals( runit_formula_SEXP( parse( text = "x ~ y + z") ), x ~ y + z, msg = "Formula( SEXP = EXPRSXP )" ) checkEquals( runit_formula_SEXP( list( "x ~ y + z") ), x ~ y + z, msg = "Formula( SEXP = VECSXP(1 = STRSXP) )" ) checkEquals( runit_formula_SEXP( list( x ~ y + z) ), x ~ y + z, msg = "Formula( SEXP = VECSXP(1 = formula) )" ) } } rcpp-0.11.0/inst/unitTests/runit.stats.R0000644000000000000000000003157312273214074015036 0ustar #!/usr/bin/r -t # -*- mode: R; tab-width: 4; -*- # # Copyright (C) 2010 - 2013 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("stats.cpp") test.stats.dbeta <- function() { vv <- seq(0, 1, by = 0.1) a <- 0.5; b <- 2.5 checkEquals(runit_dbeta(vv, a, b), list( NoLog = dbeta(vv, a, b), Log = dbeta(vv, a, b, log=TRUE) ), msg = " stats.qbeta") } test.stats.dbinom <- function( ){ v <- 1:10 checkEquals(runit_dbinom(v) , list( false = dbinom(v, 10, .5), true = dbinom(v, 10, .5, TRUE ) ), msg = "stats.dbinom" ) } test.stats.dunif <- function() { vv <- seq(0, 1, by = 0.1) checkEquals(runit_dunif(vv), list( NoLog_noMin_noMax = dunif(vv), NoLog_noMax = dunif(vv, 0), NoLog = dunif(vv, 0, 1), Log = dunif(vv, 0, 1, log=TRUE), Log_noMax = dunif(vv, 0, log=TRUE) #,Log_noMin_noMax = dunif(vv, log=TRUE) ## wrong answer ), msg = " stats.dunif") } test.stats.dgamma <- function( ) { v <- 1:4 checkEquals(runit_dgamma(v), list( NoLog = dgamma(v, 1.0, 1.0), Log = dgamma(v, 1.0, 1.0, log = TRUE ), Log_noRate = dgamma(v, 1.0, log = TRUE ) ), msg = "stats.dgamma" ) } test.stats.dpois <- function( ){ v <- 0:5 checkEquals(runit_dpois(v) , list( false = dpois(v, .5), true = dpois(v, .5, TRUE ) ), msg = "stats.dpois" ) } test.stats.dnorm <- function( ) { v <- seq(0.0, 1.0, by=0.1) checkEquals(runit_dnorm(v), list( false_noMean_noSd = dnorm(v), false_noSd = dnorm(v, 0.0), false = dnorm(v, 0.0, 1.0), true = dnorm(v, 0.0, 1.0, log=TRUE ), true_noSd = dnorm(v, 0.0, log=TRUE ), true_noMean_noSd = dnorm(v, log=TRUE ) ), msg = "stats.dnorm" ) } test.stats.dt <- function( ) { v <- seq(0.0, 1.0, by=0.1) checkEquals(runit_dt(v), list( false = dt(v, 5), true = dt(v, 5, log=TRUE ) # NB: need log=TRUE here ), msg = "stats.dt" ) } test.stats.pbeta <- function( ) { a <- 0.5; b <- 2.5 v <- qbeta(seq(0.0, 1.0, by=0.1), a, b) checkEquals(runit_pbeta(v, a, b), list(lowerNoLog = pbeta(v, a, b), lowerLog = pbeta(v, a, b, log=TRUE), upperNoLog = pbeta(v, a, b, lower=FALSE), upperLog = pbeta(v, a, b, lower=FALSE, log=TRUE) ), msg = " stats.pbeta" ) ## Borrowed from R's d-p-q-r-tests.R x <- c(.01, .10, .25, .40, .55, .71, .98) pbval <- c(-0.04605755624088, -0.3182809860569, -0.7503593555585, -1.241555830932, -1.851527837938, -2.76044482378, -8.149862739881) checkEqualsNumeric(runit_pbeta(x, 0.8, 2)$upperLog, pbval, msg = " stats.pbeta") checkEqualsNumeric(runit_pbeta(1-x, 2, 0.8)$lowerLog, pbval, msg = " stats.pbeta") } test.stats.pbinom <- function( ) { n <- 20 p <- 0.5 vv <- 0:n checkEquals(runit_pbinom(vv, n, p), list(lowerNoLog = pbinom(vv, n, p), lowerLog = pbinom(vv, n, p, log=TRUE), upperNoLog = pbinom(vv, n, p, lower=FALSE), upperLog = pbinom(vv, n, p, lower=FALSE, log=TRUE) ), msg = " stats.pbinom") } test.stats.pcauchy <- function( ) { location <- 0.5 scale <- 1.5 vv <- 1:5 checkEquals(runit_pcauchy(vv, location, scale), list(lowerNoLog = pcauchy(vv, location, scale), lowerLog = pcauchy(vv, location, scale, log=TRUE), upperNoLog = pcauchy(vv, location, scale, lower=FALSE), upperLog = pcauchy(vv, location, scale, lower=FALSE, log=TRUE) ), msg = " stats.pcauchy") } test.stats.punif <- function( ) { v <- qunif(seq(0.0, 1.0, by=0.1)) checkEquals(runit_punif(v), list(lowerNoLog = punif(v), lowerLog = punif(v, log=TRUE ), upperNoLog = punif(v, lower=FALSE), upperLog = punif(v, lower=FALSE, log=TRUE) ), msg = "stats.punif" ) # TODO: also borrow from R's d-p-q-r-tests.R } test.stats.pf <- function( ) { v <- (1:9)/10 checkEquals(runit_pf(v), list(lowerNoLog = pf(v, 6, 8, lower=TRUE, log=FALSE), lowerLog = pf(v, 6, 8, log=TRUE ), upperNoLog = pf(v, 6, 8, lower=FALSE), upperLog = pf(v, 6, 8, lower=FALSE, log=TRUE) ), msg = "stats.pf" ) } test.stats.pnf <- function( ) { v <- (1:9)/10 checkEquals(runit_pnf(v), list(lowerNoLog = pf(v, 6, 8, ncp=2.5, lower=TRUE, log=FALSE), lowerLog = pf(v, 6, 8, ncp=2.5, log=TRUE ), upperNoLog = pf(v, 6, 8, ncp=2.5, lower=FALSE), upperLog = pf(v, 6, 8, ncp=2.5, lower=FALSE, log=TRUE) ), msg = "stats.pnf" ) } test.stats.pchisq <- function( ) { v <- (1:9)/10 checkEquals(runit_pchisq(v), list(lowerNoLog = pchisq(v, 6, lower=TRUE, log=FALSE), lowerLog = pchisq(v, 6, log=TRUE ), upperNoLog = pchisq(v, 6, lower=FALSE), upperLog = pchisq(v, 6, lower=FALSE, log=TRUE) ), msg = "stats.pchisq" ) } test.stats.pnchisq <- function( ) { v <- (1:9)/10 checkEquals(runit_pnchisq(v), list(lowerNoLog = pchisq(v, 6, ncp=2.5, lower=TRUE, log=FALSE), lowerLog = pchisq(v, 6, ncp=2.5, log=TRUE ), upperNoLog = pchisq(v, 6, ncp=2.5, lower=FALSE), upperLog = pchisq(v, 6, ncp=2.5, lower=FALSE, log=TRUE) ), msg = "stats.pnchisq" ) } test.stats.pgamma <- function( ) { v <- (1:9)/10 checkEquals(runit_pgamma(v), list(lowerNoLog = pgamma(v, shape = 2.0), lowerLog = pgamma(v, shape = 2.0, log=TRUE ), upperNoLog = pgamma(v, shape = 2.0, lower=FALSE), upperLog = pgamma(v, shape = 2.0, lower=FALSE, log=TRUE) ), msg = "stats.pgamma" ) } test.stats.pnorm <- function( ) { v <- qnorm(seq(0.0, 1.0, by=0.1)) checkEquals(runit_pnorm(v), list(lowerNoLog = pnorm(v), lowerLog = pnorm(v, log=TRUE ), upperNoLog = pnorm(v, lower=FALSE), upperLog = pnorm(v, lower=FALSE, log=TRUE) ), msg = "stats.pnorm" ) ## Borrowed from R's d-p-q-r-tests.R z <- c(-Inf,Inf,NA,NaN, rt(1000, df=2)) z.ok <- z > -37.5 | !is.finite(z) pz <- runit_pnorm(z) checkEqualsNumeric(pz$lowerNoLog, 1 - pz$upperNoLog, msg = "stats.pnorm") checkEqualsNumeric(pz$lowerNoLog, runit_pnorm(-z)$upperNoLog, msg = "stats.pnorm") checkEqualsNumeric(log(pz$lowerNoLog[z.ok]), pz$lowerLog[z.ok], msg = "stats.pnorm") ## FIXME: Add tests that use non-default mu and sigma } test.stats.ppois <- function( ) { vv <- 0:20 checkEquals(runit_ppois(vv), list(lowerNoLog = ppois(vv, 0.5), lowerLog = ppois(vv, 0.5, log=TRUE), upperNoLog = ppois(vv, 0.5, lower=FALSE), upperLog = ppois(vv, 0.5, lower=FALSE, log=TRUE) ), msg = " stats.ppois") } test.stats.pt <- function( ) { v <- seq(0.0, 1.0, by=0.1) checkEquals(runit_pt(v), list(lowerNoLog = pt(v, 5), lowerLog = pt(v, 5, log=TRUE), upperNoLog = pt(v, 5, lower=FALSE), upperLog = pt(v, 5, lower=FALSE, log=TRUE) ), msg = "stats.pt" ) } test.stats.pnt <- function( ) { v <- seq(0.0, 1.0, by=0.1) checkEquals(runit_pnt(v), list(lowerNoLog = pt(v, 5, ncp=7), lowerLog = pt(v, 5, ncp=7, log=TRUE), upperNoLog = pt(v, 5, ncp=7, lower=FALSE), upperLog = pt(v, 5, ncp=7, lower=FALSE, log=TRUE) ), msg = "stats.pnt" ) } test.stats.qbinom <- function( ) { n <- 20 p <- 0.5 vv <- seq(0, 1, by = 0.1) checkEquals(runit_qbinom_prob(vv, n, p), list(lower = qbinom(vv, n, p), upper = qbinom(vv, n, p, lower=FALSE) ), msg = " stats.qbinom") } test.stats.qunif <- function( ) { checkEquals(runit_qunif_prob(c(0, 1, 1.1, -.1)), list(lower = c(0, 1, NaN, NaN), upper = c(1, 0, NaN, NaN) ), msg = "stats.qunif" ) # TODO: also borrow from R's d-p-q-r-tests.R } test.stats.qnorm <- function( ) { checkEquals(runit_qnorm_prob(c(0, 1, 1.1, -.1)), list(lower = c(-Inf, Inf, NaN, NaN), upper = c(Inf, -Inf, NaN, NaN) ), msg = "stats.qnorm" ) ## Borrowed from R's d-p-q-r-tests.R and Wichura (1988) checkEqualsNumeric(runit_qnorm_prob(c( 0.25, .001, 1e-20))$lower, c(-0.6744897501960817, -3.090232306167814, -9.262340089798408), msg = "stats.qnorm", tol = 1e-15) checkEquals(runit_qnorm_log(c(-Inf, 0, 0.1)), list(lower = c(-Inf, Inf, NaN), upper = c(Inf, -Inf, NaN) ), msg = "stats.qnorm" ) checkEqualsNumeric(runit_qnorm_log(-1e5)$lower, -447.1974945) } test.stats.qpois.prob <- function( ) { vv <- seq(0, 1, by = 0.1) checkEquals(runit_qpois_prob(vv), list(lower = qpois(vv, 0.5), upper = qpois(vv, 0.5, lower=FALSE) ), msg = " stats.qpois.prob") } test.stats.qt <- function( ) { v <- seq(0.05, 0.95, by=0.05) ( x1 <- runit_qt(v, 5, FALSE, FALSE) ) ( x2 <- qt(v, df=5, lower=FALSE, log=FALSE) ) checkEquals(x1, x2, msg="stats.qt.f.f") ( x1 <- runit_qt(v, 5, TRUE, FALSE) ) ( x2 <- qt(v, df=5, lower=TRUE, log=FALSE) ) checkEquals(x1, x2, msg="stats.qt.t.f") ( x1 <- runit_qt(-v, 5, FALSE, TRUE) ) ( x2 <- qt(-v, df=5, lower=FALSE, log=TRUE) ) checkEquals(x1, x2, msg="stats.qt.f.t") ( x1 <- runit_qt(-v, 5, TRUE, TRUE) ) ( x2 <- qt(-v, df=5, lower=TRUE, log=TRUE) ) checkEquals(x1, x2, msg="stats.qt.t.t") } ## TODO: test.stats.qgamma ## TODO: test.stats.(dq)chisq } rcpp-0.11.0/inst/unitTests/runit.Matrix.R0000644000000000000000000001125712273213567015147 0ustar #!/usr/bin/r -t # # Copyright (C) 2010 - 2014 Dirk Eddelbuettel, Romain Francois and Kevin Ushey # # 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("Matrix.cpp") test.List.column <- function(){ x <- matrix( 1:16+.5, nc = 4 ) res <- runit_Row_Column_sugar( x ) target <- list( x[1,], x[,1], x[2,], x[,2], x[2,] + x[,2] ) checkEquals( res, target, msg = "column and row as sugar" ) } test.NumericMatrix <- function(){ x <- matrix( 1:16 + .5, ncol = 4 ) checkEquals( matrix_numeric(x), sum(diag(x)), msg = "matrix indexing" ) y <- as.vector( x ) checkException( matrix_numeric(y) , msg = "not a matrix" ) } test.CharacterMatrix <- function(){ x <- matrix( letters[1:16], ncol = 4 ) checkEquals( matrix_character(x), paste( diag(x), collapse = "" ) ) } test.GenericMatrix <- function( ){ g <- function(y){ sapply( y, function(x) seq(from=x, to = 16) ) } x <- matrix( g(1:16), ncol = 4 ) checkEquals( matrix_generic(x), g(diag(matrix(1:16,ncol=4))), msg = "GenericMatrix" ) } test.IntegerMatrix.diag <- function(){ expected <- matrix( 0L, nrow = 5, ncol = 5 ) diag( expected ) <- 1L checkEquals( matrix_integer_diag(), expected, msg = "IntegerMatrix::diag" ) } test.CharacterMatrix.diag <- function(){ expected <- matrix( "", nrow = 5, ncol = 5 ) diag( expected ) <- "foo" checkEquals( matrix_character_diag(), expected, msg = "CharacterMatrix::diag" ) } test.NumericMatrix.Ctors <- function(){ x <- matrix(0, 3, 3) checkEquals( matrix_numeric_ctor1(), x, msg = "matrix from single int" ) x <- matrix(0, 3, 3) checkEquals( matrix_numeric_ctor2(), x, msg = "matrix from two int" ) } test.IntegerVector.matrix.indexing <- function(){ x <- matrix( 1:16, ncol = 4 ) checkEquals( integer_matrix_indexing(x), sum(diag(x)), msg = "matrix indexing" ) checkEquals( diag(integer_matrix_indexing_lhs(x)), 2*0:3, msg = "matrix indexing lhs" ) y <- as.vector( x ) checkException( integer_matrix_indexing_lhs(y) , msg = "not a matrix" ) } test.NumericMatrix.row <- function(){ x <- matrix( 1:16 + .5, ncol = 4 ) checkEquals( runit_NumericMatrix_row( x ), sum( x[1,] ), msg = "iterating over a row" ) } test.CharacterMatrix.row <- function(){ m <- matrix( letters, ncol = 2 ) checkEquals( runit_CharacterMatrix_row(m), paste( m[1,], collapse = "" ), msg = "CharacterVector::Row" ) } test.List.row <- function(){ m <- lapply( 1:16, function(i) seq(from=1, to = i ) ) dim( m ) <- c( 4, 4 ) checkEquals( runit_GenericMatrix_row( m ), 1 + 0:3*4, msg = "List::Row" ) } test.NumericMatrix.column <- function(){ x <- matrix( 1:16 + .5, ncol = 4 ) checkEquals( runit_NumericMatrix_column( x ), sum( x[,1] ) , msg = "iterating over a column" ) } test.NumericMatrix.cumsum <- function(){ x <- matrix( 1:8 + .5, ncol = 2 ) checkEquals( runit_NumericMatrix_cumsum( x ), t(apply(x, 1, cumsum)) , msg = "cumsum" ) } test.CharacterMatrix.column <- function(){ m <- matrix( letters, ncol = 2 ) checkEquals( runit_CharacterMatrix_column(m), paste( m[,1], collapse = "" ), msg = "CharacterVector::Column" ) } test.List.column <- function(){ m <- lapply( 1:16, function(i) seq(from=1, to = i ) ) dim( m ) <- c( 4, 4 ) checkEquals( runit_GenericMatrix_column( m ), 1:4, msg = "List::Column" ) } test.NumericMatrix.colsum <- function( ){ probs <- matrix(1:12,nrow=3) checkEquals( runit_NumericMatrix_colsum( probs ), t(apply(probs,1,cumsum)) ) } test.NumericMatrix.rowsum <- function( ){ probs <- matrix(1:12,nrow=3) checkEquals( runit_NumericMatrix_rowsum( probs ), apply(probs,2,cumsum) ) } test.NumericMatrix.SubMatrix <- function( ){ target <- rbind( c(3,4,5,5), c(3,4,5,5), 0 ) checkEquals( runit_SubMatrix(), target, msg = "SubMatrix" ) } test.NumericMatrix.opequals <- function() { m <- matrix(1:4, nrow=2) checkEquals(m, matrix_opequals(m)) } } rcpp-0.11.0/inst/unitTests/RcppTestA/0000755000000000000000000000000012253723677014265 5ustar rcpp-0.11.0/inst/unitTests/RcppTestA/R/0000755000000000000000000000000012253723677014466 5ustar rcpp-0.11.0/inst/unitTests/RcppTestA/R/rcpp_hello_world.R0000644000000000000000000000012612253723677020146 0ustar rcpp_hello_world <- function(){ .Call( "rcpp_hello_world", PACKAGE = "RcppTestA" ) } rcpp-0.11.0/inst/unitTests/RcppTestA/man/0000755000000000000000000000000012253723677015040 5ustar rcpp-0.11.0/inst/unitTests/RcppTestA/man/RcppTestA-package.Rd0000644000000000000000000000055212253723677020567 0ustar \name{RcppTestA-package} \alias{RcppTestA-package} \alias{RcppTestA} \docType{package} \title{ Dummy package part of Rcpp unit tests } \description{ Dummy package part of Rcpp unit tests } \details{ \tabular{ll}{ Package: \tab RcppTestA\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2010-04-10\cr License: \tab GPL (>= 2)\cr LazyLoad: \tab yes\cr } } rcpp-0.11.0/inst/unitTests/RcppTestA/NAMESPACE0000644000000000000000000000002512253723677015501 0ustar useDynLib(RcppTestA) rcpp-0.11.0/inst/unitTests/RcppTestA/src/0000755000000000000000000000000012253723677015054 5ustar rcpp-0.11.0/inst/unitTests/RcppTestA/src/rcpp_hello_world.cpp0000644000000000000000000000064312253723677021121 0ustar #include "rcpp_hello_world.h" 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 ; } SEXP hello_world_ex(){ try{ throw std::range_error( "boom" ) ; } catch( std::exception& __ex__ ){ forward_exception_to_r( __ex__ ) ; } return R_NilValue ; } rcpp-0.11.0/inst/unitTests/RcppTestA/src/rcpp_hello_world.h0000644000000000000000000000026012253723677020561 0ustar #ifndef _RcppTestA_RCPP_HELLO_WORLD_H #define _RcppTestA_RCPP_HELLO_WORLD_H #include RcppExport SEXP rcpp_hello_world() ; RcppExport SEXP hello_world_ex() ; #endif rcpp-0.11.0/inst/unitTests/RcppTestA/DESCRIPTION0000644000000000000000000000053112253723677015772 0ustar Package: RcppTestA Type: Package Title: Dummy package part of Rcpp unit tests Version: 1.0 Date: 2010-04-10 Author: Romain Francois and Dirk Eddelbuettel Maintainer: Romain and Dirk Description: Dummy package part of Rcpp unit tests License: GPL (>= 2) LazyLoad: yes Depends: Rcpp (>= 0.7.11.4) LinkingTo: Rcpp rcpp-0.11.0/inst/unitTests/runit.S4.R0000644000000000000000000000647412273214047014170 0ustar #!/usr/bin/r -t # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("S4.cpp") test.RObject.S4methods <- function(){ setClass("track", representation(x="numeric", y="numeric")) tr <- new( "track", x = 2, y = 2 ) checkEquals( S4_methods(tr), list( TRUE, TRUE, FALSE, 2.0, 2.0 ), msg = "slot management" ) S4_getslots( tr ) checkEquals( tr@x, 10.0 , msg = "slot('x') = 10" ) checkEquals( tr@y, 20.0 , msg = "slot('y') = 20" ) checkException( S4_setslots( tr ), msg = "slot does not exist" ) checkException( S4_setslots_2( tr ), msg = "slot does not exist" ) } test.S4 <- function(){ setClass("track", representation(x="numeric", y="numeric")) tr <- new( "track", x = 2, y = 3 ) checkEquals( S4_get_slot_x( tr ), 2, msg = "S4( SEXP )" ) checkException( S4_get_slot_x( list( x = 2, y = 3 ) ), msg = "not S4" ) checkException( S4_get_slot_x( structure( list( x = 2, y = 3 ), class = "track" ) ), msg = "S3 is not S4" ) tr <- S4_ctor( "track" ) checkTrue( inherits( tr, "track" ) ) checkEquals( tr@x, numeric(0) ) checkEquals( tr@y, numeric(0) ) checkException( S4_ctor( "someclassthatdoesnotexist" ) ) } test.S4.is <- function(){ setClass("track", representation(x="numeric", y="numeric")) setClass("trackCurve", representation(smooth = "numeric"), contains = "track") tr1 <- new( "track", x = 2, y = 3 ) tr2 <- new( "trackCurve", x = 2, y = 3, smooth = 5 ) checkTrue( S4_is_track( tr1 ), msg = 'track is track' ) checkTrue( S4_is_track( tr2 ), msg = 'trackCurve is track' ) checkTrue( !S4_is_trackCurve( tr1 ), msg = 'track is not trackCurve' ) checkTrue( S4_is_trackCurve( tr2 ), msg = 'trackCurve is trackCurve' ) } test.Vector.SlotProxy.ambiguity <- function(){ setClass("track", representation(x="numeric", y="numeric")) setClass("trackCurve", representation(smooth = "numeric"), contains = "track") tr1 <- new( "track", x = 2, y = 3 ) checkEquals( S4_get_slot_x(tr1), 2, "Vector( SlotProxy ) ambiguity" ) } test.Vector.AttributeProxy.ambiguity <- function(){ x <- 1:10 attr( x, "foo" ) <- "bar" checkEquals( S4_get_attr_x(x), "bar", "Vector( AttributeProxy ) ambiguity" ) } test.S4.dotdataslot <- function(){ setClass( "Foo", contains = "character", representation( x = "numeric" ) ) foo <- S4_dotdata( new( "Foo", "bla", x = 10 ) ) checkEquals( as.character( foo) , "foooo" ) } test.S4.proxycoerce <- function() { setClass("Foo", list(data="integer")) foo <- new("Foo", data=1:3) checkEquals( S4_proxycoerce(foo), c(1, 2, 3) ) } } rcpp-0.11.0/inst/unitTests/runit.String.R0000644000000000000000000000323612273214121015132 0ustar #!/usr/bin/r -t # -*- mode: R; tab-width: 4; -*- # # Copyright (C) 2012 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("String.cpp") test.replace_all <- function(){ checkEquals( String_replace_all("foobar", "o", "*"), "f**bar") } test.replace_first <- function(){ checkEquals( String_replace_first("foobar", "o", "*"), "f*obar") } test.replace_last <- function(){ checkEquals( String_replace_last("foobar", "o", "*"), "fo*bar") } test.String.sapply <- function(){ res <- test_sapply_string( "foobar", c("o", "a" ), c("*", "!" ) ) checkEquals( res, "f**b!r" ) } test.compare.Strings <- function(){ res <- test_compare_Strings( "aaa", "aab" ) target <- list( "a < b" = TRUE, "a > b" = FALSE, "a == b" = FALSE, "a == a" = TRUE ) checkEquals( res, target ) } } rcpp-0.11.0/inst/unitTests/runTests.R0000644000000000000000000001363412273214364014367 0ustar ## -*- mode: R; tab-width: 4; -*- ## ## Copyright (C) 2009 - 2013 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 . ## Usage: ## ## r some/path/to/runTests.R # defaults ## r some/path/to/runTests.R --local # use cwd, not pkg dir ## r some/path/to/runTests.R --output=/tmp # undo what BDR imposed ## r some/path/to/runTests.R --allTests # undo what KH imposed ## pkg <- "Rcpp" if (require("RUnit", quietly = TRUE)) { is_local <- function(){ if( exists( "argv", globalenv() ) && "--local" %in% argv ) return(TRUE) if( "--local" %in% commandArgs(TRUE) ) return(TRUE) FALSE } if (is_local() ) path <- getwd() library(package=pkg, character.only = TRUE) if (!(exists("path"))) ## && file.exists(path))) path <- system.file("unitTests", package = pkg) ## --- Testing --- ## Define tests testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), dirs = path) ## TODO: actually prioritize which ones we want ## for now, expensive tests (eg Modules, client packages) are skipped checkForAllTests <- function() { if (exists( "argv", globalenv() ) && "--allTests" %in% argv) { Sys.setenv("RunAllRcppTests"="yes") return(TRUE) } if ("--allTests" %in% commandArgs(TRUE)) { Sys.setenv("RunAllRcppTests"="yes") return(TRUE) } Sys.setenv("RunAllRcppTests"="no") return(FALSE) } ## if (.Platform$OS.type == "windows" && allTests() == FALSE) { ## ## by imposing [D-Z] (instead of an implicit A-Z) we are going from ## ## 45 tests to run down to 38 (numbers as of release 0.8.3) ## testSuite$testFileRegexp <- "^runit\\.[D-Z].+\\.[rR]$" ## } if (Sys.getenv("RunAllRcppTests") == "") { # if env.var not yet set checkForAllTests() # see if we want to set flag } if (interactive()) { cat("Now have RUnit Test Suite 'testSuite' for package '", pkg, "' :\n", sep='') str(testSuite) cat('', "Consider doing", "\t tests <- runTestSuite(testSuite)", "\nand later", "\t printTextProtocol(tests)", '', sep="\n") } else { ## run from shell / Rscript / R CMD Batch / ... ## Run tests <- runTestSuite(testSuite) output <- NULL process_args <- function(argv){ if( !is.null(argv) && length(argv) > 0 ){ rx <- "^--output=(.*)$" g <- grep( rx, argv, value = TRUE ) if( length(g) ){ sub( rx, "\\1", g[1L] ) } } } # R CMD check uses this if( exists( "Rcpp.unit.test.output.dir", globalenv() ) ){ output <- Rcpp.unit.test.output.dir } else { ## give a chance to the user to customize where he/she wants ## the unit tests results to be stored with the --output= command ## line argument if( exists( "argv", globalenv() ) ){ ## littler output <- process_args(argv) } else { ## Rscript output <- process_args(commandArgs(TRUE)) } } if( is.null(output) ) { # if it did not work, use parent dir output <- ".." # as BDR does not want /tmp to be used } ## Print results output.txt <- file.path( output, sprintf("%s-unitTests.txt", pkg)) output.html <- file.path( output, sprintf("%s-unitTests.html", pkg)) printTextProtocol(tests, fileName=output.txt) message( sprintf( "saving txt unit test report to '%s'", output.txt ) ) ## Print HTML version to a file ## printHTMLProtocol has problems on Mac OS X if (Sys.info()["sysname"] != "Darwin"){ message( sprintf( "saving html unit test report to '%s'", output.html ) ) printHTMLProtocol(tests, fileName=output.html) } ## stop() if there are any failures i.e. FALSE to unit test. ## This will cause R CMD check to return error and stop err <- getErrors(tests) if( (err$nFail + err$nErr) > 0) { data <- Filter( function(x) any( sapply(x, function(.) .[["kind"]] ) %in% c("error","failure") ) , tests[[1]]$sourceFileResults ) err_msg <- sapply( data, function(x) { raw.msg <- paste( sapply( Filter( function(.) .[["kind"]] %in% c("error","failure"), x ), "[[", "msg" ), collapse = " // " ) raw.msg <- gsub( "Error in compileCode(f, code, language = language, verbose = verbose) : \n", "", raw.msg, fixed = TRUE ) raw.msg <- gsub( "\n", "", raw.msg, fixed = TRUE ) raw.msg } ) msg <- sprintf( "unit test problems: %d failures, %d errors\n%s", err$nFail, err$nErr, paste( err_msg, collapse = "\n" ) ) stop( msg ) } else{ success <- err$nTestFunc - err$nFail - err$nErr - err$nDeactivated cat( sprintf( "%d / %d\n", success, err$nTestFunc ) ) } } } else { cat("R package 'RUnit' cannot be loaded -- no unit tests run\n", "for package", pkg,"\n") } rcpp-0.11.0/inst/unitTests/runit.RObject.R0000644000000000000000000002344212273214034015220 0ustar #!/usr/bin/r -t # -*- mode: R; tab-width: 4; -*- # # Copyright (C) 2009 - 2014 Romain Francois and Dirk Eddelbuettel # # 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("RObject.cpp") test.RObject.asDouble <- function(){ checkEquals( asDouble(2.123), 4.246, msg = "as( REALSXP ) " ) checkEquals( asDouble(2L), 4.0, msg = "as( INTSXP ) " ) checkEquals( asDouble(as.raw(2L)), 4.0, msg = "as( RAWSXP )" ) checkException( asDouble('2'), msg = "as( STRSXP ) -> exception" ) checkException( asDouble(2:3), msg = "as expects the vector to be of length 1" ) } test.RObject.asInt <- function(){ checkEquals( asInt(2.123), 4L, msg = "as( REALSXP )" ) checkEquals( asInt(2), 4L, msg = "as( REALSXP )" ) checkEquals( asInt(2L), 4.0, msg = "as( INTSXP )" ) checkEquals( asInt(as.raw(2L)), 4.0, msg = "as( RAWSXP )" ) checkException( asInt( '2'), msg = "as can not convert character" ) checkException( asInt( 2:3), msg = "as expects the vector to be of length 1" ) } test.RObject.asStdString <- function(){ checkEquals( asStdString("abc"), "abcabc", msg = "as" ) checkException( asStdString(NULL), msg = "as expects character vector" ) checkException( asStdString(0L), msg = "as expects character vector" ) checkException( asStdString(0.1), msg = "as expects character vector" ) checkException( asStdString(as.raw(0L)), msg = "as expects character vector" ) checkException( asStdString(letters), msg = "as expects single string" ) } test.RObject.asRaw <- function(){ checkEquals( asRaw(1L), as.raw(2L), msg = "as(integer)" ) checkEquals( asRaw(1.3), as.raw(2L), msg = "as(numeric)" ) checkEquals( asRaw(as.raw(1)), as.raw(2L), msg = "as(raw)" ) checkException( asRaw(NULL) , msg = "as(NULL) -> exception" ) checkException( asRaw("foo") , msg = "as(character) -> exception" ) checkException( asRaw(1:2), msg = "as(>1 integer) -> exception" ) checkException( asRaw(as.numeric(1:2)), msg = "as(>1 numeric) -> exception" ) checkException( asRaw(as.raw(1:3)), msg = "as(>1 raw) -> exception" ) checkException( asRaw(integer(0)), msg = "as(0 integer) -> exception" ) checkException( asRaw(numeric(0)), msg = "as(0 numeric) -> exception" ) checkException( asRaw(raw(0)), msg = "as(0 raw) -> exception" ) } test.RObject.asLogical <- function(){ checkTrue( !asLogical(TRUE), msg = "as(TRUE) -> true" ) checkTrue( asLogical(FALSE), msg = "as(FALSE) -> false" ) checkTrue( !asLogical(1L), msg = "as(1L) -> true" ) checkTrue( asLogical(0L), msg = "as(0L) -> false" ) checkTrue( !asLogical(1.0), msg = "as(1.0) -> true" ) checkTrue( asLogical(0.0), msg = "as0.0) -> false" ) checkTrue( !asLogical(as.raw(1)), msg = "as(aw.raw(1)) -> true" ) checkTrue( asLogical(as.raw(0)), msg = "as(as.raw(0)) -> false" ) checkException( asLogical(NULL), msg = "as(NULL) -> exception" ) checkException( asLogical(c(TRUE,FALSE)), msg = "as(>1 logical) -> exception" ) checkException( asLogical(1:2), msg = "as(>1 integer) -> exception" ) checkException( asLogical(1:2+.1), msg = "as(>1 numeric) -> exception" ) checkException( asLogical(as.raw(1:2)), msg = "as(>1 raw) -> exception" ) checkException( asLogical(integer(0)), msg = "as(0 integer) -> exception" ) checkException( asLogical(numeric(0)), msg = "as(0 numeric) -> exception" ) checkException( asLogical(raw(0)), msg = "as(0 raw) -> exception" ) } test.RObject.asStdVectorInt <- function(){ checkEquals( asStdVectorInt(x=2:5), 2:5*2L, msg = "as< std::vector >(integer)" ) checkEquals( asStdVectorInt(x=2:5+.1), 2:5*2L, msg = "as< std::vector >(numeric)" ) checkEquals( asStdVectorInt(x=as.raw(2:5)), 2:5*2L, msg = "as< std::vector >(raw)" ) checkException( asStdVectorInt("foo"), msg = "as< std::vector >(character) -> exception" ) checkException( asStdVectorInt(NULL), msg = "as< std::vector >(NULL) -> exception" ) } test.RObject.asStdVectorDouble <- function(){ checkEquals( asStdVectorDouble(x=0.1+2:5), 2*(0.1+2:5), msg = "as< std::vector >( numeric )" ) checkEquals( asStdVectorDouble(x=2:5), 2*(2:5), msg = "as< std::vector >(integer)" ) checkEquals( asStdVectorDouble(x=as.raw(2:5)), 2*(2:5), msg = "as< std::vector >(raw)" ) checkException( asStdVectorDouble("foo"), msg = "as< std::vector >(character) -> exception" ) checkException( asStdVectorDouble(NULL), msg = "as< std::vector >(NULL) -> exception" ) } test.RObject.asStdVectorRaw <- function(){ checkEquals( asStdVectorRaw(x=as.raw(0:9)), as.raw(2*(0:9)), msg = "as< std::vector >(raw)" ) checkEquals( asStdVectorRaw(x=0:9), as.raw(2*(0:9)), msg = "as< std::vector >( integer )" ) checkEquals( asStdVectorRaw(x=as.numeric(0:9)), as.raw(2*(0:9)), msg = "as< std::vector >(numeric)" ) checkException( asStdVectorRaw("foo"), msg = "as< std::vector >(character) -> exception" ) checkException( asStdVectorRaw(NULL), msg = "as< std::vector >(NULL) -> exception" ) } test.RObject.asStdVectorBool <- function(){ checkEquals( asStdVectorBool(x=c(TRUE,FALSE)), c(FALSE, TRUE), msg = "as< std::vector >(logical)" ) checkEquals( asStdVectorBool(x=c(1L, 0L)), c(FALSE, TRUE), msg = "as< std::vector >(integer)" ) checkEquals( asStdVectorBool(x=c(1.0, 0.0)), c(FALSE, TRUE), msg = "as< std::vector >(numeric)" ) checkEquals( asStdVectorBool(x=as.raw(c(1,0))), c(FALSE, TRUE), msg = "as< std::vector >(raw)" ) checkException( asStdVectorBool("foo"), msg = "as< std::vector >(character) -> exception" ) checkException( asStdVectorBool(NULL), msg = "as< std::vector >(NULL) -> exception" ) } test.RObject.asStdVectorString <- function(){ checkEquals( asStdVectorString(c("foo", "bar")), c("foofoo", "barbar"), msg = "as< std::vector >(character)" ) checkException( asStdVectorString(1L), msg = "as< std::vector >(integer) -> exception" ) checkException( asStdVectorString(1.0), msg = "as< std::vector >(numeric) -> exception" ) checkException( asStdVectorString(as.raw(1)), msg = "as< std::vector >(raw) -> exception" ) checkException( asStdVectorString(TRUE), msg = "as< std::vector >(logical) -> exception" ) checkException( asStdVectorString(NULL), msg = "as< std::vector >(NULL) -> exception" ) } test.RObject.stdsetint <- function(){ checkEquals( stdsetint(), c(0L, 1L), msg = "wrap( set )" ) } test.RObject.stdsetdouble <- function(){ checkEquals( stdsetdouble(), as.numeric(0:1), msg = "wrap( set" ) } test.RObject.stdsetraw <- function(){ checkEquals( stdsetraw(), as.raw(0:1), msg = "wrap(set)" ) } test.RObject.stdsetstring <- function(){ checkEquals( stdsetstring(), c("bar", "foo"), msg = "wrap(set)" ) } test.RObject.attributeNames <- function(){ df <- data.frame( x = 1:10, y = 1:10 ) checkTrue( all( c("names","row.names","class") %in% attributeNames(df)), msg = "RObject.attributeNames" ) } test.RObject.hasAttribute <- function(){ df <- data.frame( x = 1:10 ) checkTrue( hasAttribute( df ), msg = "RObject.hasAttribute" ) } test.RObject.attr <- function(){ df <- data.frame( x = 1:150 ) rownames(df) <- 1:150 checkEquals( attr_( iris ), 1:150, msg = "RObject.attr" ) } test.RObject.attr.set <- function(){ checkEquals( attr(attr_set(), "foo"), 10L, msg = "RObject.attr() = " ) } test.RObject.isNULL <- function(){ df <- data.frame( x = 1:10 ) checkTrue( !isNULL( df ), msg = "RObject.isNULL(data frame) -> false" ) checkTrue( !isNULL(1L), msg = "RObject.isNULL(integer) -> false" ) checkTrue( !isNULL(1.0), msg = "RObject.isNULL(numeric) -> false" ) checkTrue( !isNULL(as.raw(1)), msg = "RObject.isNULL(raw) -> false" ) checkTrue( !isNULL(letters), msg = "RObject.isNULL(character) -> false") checkTrue( !isNULL(test.RObject.isNULL), msg = "RObject.isNULL(function) -> false" ) checkTrue( !isNULL(.GlobalEnv), msg = "RObject.isNULL(environment) -> false" ) checkTrue( isNULL(NULL), msg = "RObject.isNULL(NULL) -> true" ) } test.RObject.inherits <- function(){ x <- 1:10 checkTrue( !inherits_(x) ) class(x) <- "foo" checkTrue( inherits_(x) ) class(x) <- c("foo", "bar" ) checkTrue( inherits_(x) ) } } rcpp-0.11.0/inst/unitTests/runit.Function.R0000644000000000000000000000543712273213400015455 0ustar #!/usr/bin/r -t # -*- mode: R; tab-width: 4; -*- # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("Function.cpp", "stats") test.Function <- function(){ checkEquals( function_( rnorm ), rnorm, msg = "Function( CLOSXP )" ) checkEquals( function_( is.function ), is.function, msg = "Pairlist( BUILTINSXP )" ) checkException( function_(1:10), msg = "Function( INTSXP) " ) checkException( function_(TRUE), msg = "Function( LGLSXP )" ) checkException( function_(1.3), msg = "Function( REALSXP) " ) checkException( function_(as.raw(1) ), msg = "Function( RAWSXP)" ) checkException( function_(new.env()), msg = "Function not compatible with environment" ) } test.Function.variadic <- function(){ checkEquals( function_variadic( sort, sample(1:20) ), 20:1, msg = "calling function" ) checkException( function_variadic(sort, sort), msg = "Function, R error -> exception" ) } test.Function.env <- function(){ checkEquals( function_env(rnorm), asNamespace("stats" ), msg = "Function::environment" ) checkException( function_env(is.function), msg = "Function::environment( builtin) : exception" ) checkException( function_env(`~`), msg = "Function::environment( special) : exception" ) } test.Function.unary.call <- function(){ checkEquals( function_unarycall( lapply( 1:10, function(n) seq(from=n, to = 0 ) ) ), 2:11 , msg = "unary_call(Function)" ) } test.Function.binary.call <- function(){ data <- lapply( 1:10, function(n) seq(from=n, to = 0 ) ) res <- function_binarycall( data , rep(5L,10) ) expected <- lapply( data, pmin, 5 ) checkEquals( res, expected, msg = "binary_call(Function)" ) } test.Function.namespace.env <- function() { exportedfunc <- function_namespace_env() checkEquals( stats:::.asSparse, exportedfunc, msg = "namespace_env(Function)" ) } } rcpp-0.11.0/inst/unitTests/cpp/0000755000000000000000000000000012266757337013206 5ustar rcpp-0.11.0/inst/unitTests/cpp/support.cpp0000644000000000000000000000464512253723677015433 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // support.cpp: Rcpp R/C++ interface class library -- unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; // [[Rcpp::export]] List plus_REALSXP(){ return List::create( NA_REAL + NA_REAL, NA_REAL + 1.0, 1.0 + NA_REAL ); } // [[Rcpp::export]] List times_REALSXP(){ return List::create( NA_REAL * NA_REAL, NA_REAL * 1.0, 1.0 * NA_REAL ); } // [[Rcpp::export]] List divides_REALSXP(){ return List::create( NA_REAL / NA_REAL, NA_REAL / 1.0, 1.0 / NA_REAL ); } // [[Rcpp::export]] List minus_REALSXP(){ return List::create( NA_REAL - NA_REAL, NA_REAL - 1.0, 1.0 - NA_REAL ); } // [[Rcpp::export]] List functions_REALSXP(){ return List::create( NumericVector::create( exp( NA_REAL ), acos( NA_REAL ), asin( NA_REAL ), atan( NA_REAL ), ceil( NA_REAL ), cos( NA_REAL ), cosh( NA_REAL ), floor( NA_REAL ), log( NA_REAL ), log10( NA_REAL ), sqrt( NA_REAL), sin( NA_REAL ), sinh( NA_REAL ), tan( NA_REAL ), tanh( NA_REAL ), fabs( NA_REAL ), Rf_gammafn( NA_REAL), Rf_lgammafn( NA_REAL ), Rf_digamma( NA_REAL ), Rf_trigamma( NA_REAL ) ) , NumericVector::create( Rf_tetragamma( NA_REAL) , Rf_pentagamma( NA_REAL) , expm1( NA_REAL ), log1p( NA_REAL ), Rcpp::internal::factorial( NA_REAL ), Rcpp::internal::lfactorial( NA_REAL ) ) ); } rcpp-0.11.0/inst/unitTests/cpp/language.cpp0000644000000000000000000001350212253723677015472 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // language.cpp: Rcpp R/C++ interface class library -- Language unit tests // // Copyright (C) 2012 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 . #include using namespace Rcpp ; // [[Rcpp::export]] Language runit_language(SEXP x){ return Language(x) ; } // [[Rcpp::export]] Language runit_lang_variadic_1(){ return Language( "rnorm", 10, 0.0, 2.0 ) ; } // [[Rcpp::export]] Language runit_lang_variadic_2(){ return Language( "rnorm", 10, Named("mean",0.0), 2.0 ) ; } // [[Rcpp::export]] Language runit_lang_push_back(){ Language call("rnorm") ; call.push_back( 10 ) ; call.push_back( Named("mean", 0.0) ) ; call.push_back( 2.0 ) ; return call ; } // [[Rcpp::export]] double runit_lang_square_rv(){ Language p("rnorm") ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; return p[2] ; } // [[Rcpp::export]] Language runit_lang_square_lv(){ Language p("rnorm") ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; p[1] = "foobar" ; p[2] = p[3] ; return p ; } // [[Rcpp::export]] SEXP runit_lang_fun( Function fun, IntegerVector x ){ Language call( fun ); call.push_back(x) ; return Rf_eval( call, R_GlobalEnv ) ; } // [[Rcpp::export]] Language runit_lang_inputop(){ Language call( "rnorm" ); call << 10 << Named( "sd", 10 ) ; return call ; } // [[Rcpp::export]] List runit_lang_unarycall(IntegerVector x){ Language call( "seq", Named("from", 10 ), Named("to", 0 ) ) ; List output( x.size() ) ; std::transform( x.begin(), x.end(), output.begin(), unary_call(call) ) ; return output ; } // [[Rcpp::export]] List runit_lang_unarycallindex(IntegerVector x){ Language call( "seq", 10, 0 ) ; List output( x.size() ) ; std::transform( x.begin(), x.end(), output.begin(), unary_call(call,2) ) ; return output ; } // [[Rcpp::export]] List runit_lang_binarycall(IntegerVector x1, IntegerVector x2 ){ Language call( "seq", Named("from", 10 ), Named("to", 0 ) ) ; List output( x1.size() ) ; std::transform( x1.begin(), x1.end(), x2.begin(), output.begin(), binary_call(call) ) ; return output ; } // [[Rcpp::export]] SEXP runit_lang_fixedcall(){ Language call( Function("rnorm"), 10 ) ; std::vector< std::vector > result(10) ; std::generate( result.begin(), result.end(), fixed_call< std::vector >(call) ) ; return wrap( result ); } // [[Rcpp::export]] SEXP runit_lang_inenv( Environment env){ Language call( "sum", Symbol("y") ) ; return call.eval( env ) ; } // [[Rcpp::export]] Pairlist runit_pairlist(SEXP x){ return Pairlist(x) ; } // [[Rcpp::export]] Pairlist runit_pl_variadic_1(){ return Pairlist( "rnorm", 10, 0.0, 2.0 ) ; } // [[Rcpp::export]] Pairlist runit_pl_variadic_2(){ return Pairlist( "rnorm", 10, Named("mean",0.0), 2.0 ) ; } // [[Rcpp::export]] Pairlist runit_pl_push_front(){ Pairlist p ; p.push_front( 1 ) ; p.push_front( 10.0 ) ; p.push_front( "foo" ) ; p.push_front( Named( "foobar", 10) ) ; return p ; } // [[Rcpp::export]] Pairlist runit_pl_push_back(){ Pairlist p ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( "foo" ) ; p.push_back( Named( "foobar", 10) ) ; return p ; } // [[Rcpp::export]] Pairlist runit_pl_insert(){ Pairlist p ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; /* insert in 2nd position */ p.insert( 1, Named( "bla", "bla" ) ) ; /* insert in front */ p.insert( 0, 30.0 ) ; /* insert in back */ p.insert( 5, "foobar" ) ; return p ; } // [[Rcpp::export]] Pairlist runit_pl_replace(){ Pairlist p ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; p.replace( 0, Named( "first", 1 ) ) ; p.replace( 1, 20.0 ) ; p.replace( 2, false ) ; return p ; } // [[Rcpp::export]] int runit_pl_size(){ Pairlist p ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; return p.size() ; } // [[Rcpp::export]] Pairlist runit_pl_remove_1(){ Pairlist p ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; p.remove( 0 ) ; return p ; } // [[Rcpp::export]] Pairlist runit_pl_remove_2(){ Pairlist p ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; p.remove( 2 ) ; return p ; } // [[Rcpp::export]] Pairlist runit_pl_remove_3(){ Pairlist p ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; p.remove( 1 ) ; return p ; } // [[Rcpp::export]] double runit_pl_square_1(){ Pairlist p ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; return p[1] ; } // [[Rcpp::export]] Pairlist runit_pl_square_2(){ Pairlist p ; p.push_back( 1 ) ; p.push_back( 10.0 ) ; p.push_back( 20.0 ) ; p[1] = "foobar" ; p[2] = p[0] ; return p ; } // [[Rcpp::export]] Formula runit_formula_(){ Formula f( "x ~ y + z" ) ; return f; } // [[Rcpp::export]] Formula runit_formula_SEXP(SEXP form){ Formula f(form) ; return f; } rcpp-0.11.0/inst/unitTests/cpp/as.cpp0000644000000000000000000000370012253723677014311 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // as.cpp: Rcpp R/C++ interface class library -- as<> unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; // [[Rcpp::export]] int as_int( SEXP x){ return as( x ); } // [[Rcpp::export]] double as_double( SEXP x){ return as( x ); } // [[Rcpp::export]] Rbyte as_raw( SEXP x){ return as( x ); } // [[Rcpp::export]] bool as_bool( SEXP x){ return as( x ); } // [[Rcpp::export]] std::string as_string( SEXP x){ return as( x ); } // [[Rcpp::export]] std::vector as_vector_int( SEXP x){ return as< std::vector >(x) ; } // [[Rcpp::export]] std::vector as_vector_double( SEXP x){ return as< std::vector >(x) ; } // [[Rcpp::export]] std::vector as_vector_raw( SEXP x){ return as< std::vector >(x) ; } // [[Rcpp::export]] std::vector as_vector_bool( SEXP x){ return as< std::vector >(x) ; } // [[Rcpp::export]] std::vector as_vector_string( SEXP x){ return as< std::vector >(x) ; } // [[Rcpp::export]] std::deque as_deque_int( SEXP x){ return as< std::deque >(x) ; } // [[Rcpp::export]] std::list as_list_int( SEXP x){ return as< std::list >(x) ; } rcpp-0.11.0/inst/unitTests/cpp/Environment.cpp0000644000000000000000000000707412253723677016222 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // Environment.cpp: Rcpp R/C++ interface class library -- Environment unit tests // // Copyright (C) 2012 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 . #include using namespace Rcpp ; // [[Rcpp::export]] SEXP runit_ls( Environment env ){ return env.ls(true) ; } // [[Rcpp::export]] SEXP runit_ls2( Rcpp::Environment env){ return env.ls(false) ; } // [[Rcpp::export]] SEXP runit_get( Environment env, std::string name){ return env.get( name ) ; } // [[Rcpp::export]] bool runit_exists( Environment env, std::string st){ return env.exists( st ) ; } // [[Rcpp::export]] bool runit_assign( Environment env, std::string st, SEXP object ){ return env.assign(st, object) ; } // [[Rcpp::export]] void runit_islocked( Environment env ){ env.assign( "x1", 1 ) ; env.assign( "x2", 10.0 ) ; env.assign( "x3", std::string( "foobar" ) ) ; env.assign( "x4", "foobar" ) ; std::vector< std::string > aa(2) ; aa[0] = "foo" ; aa[1] = "bar" ; env.assign( "x5", aa ) ; } // [[Rcpp::export]] bool runit_bindingIsActive( Environment env, std::string st ){ return env.bindingIsActive(st) ; } // [[Rcpp::export]] bool runit_bindingIsLocked( Environment env, std::string st ){ return env.bindingIsLocked(st) ; } // [[Rcpp::export]] void runit_notanenv( SEXP x){ Environment env(x) ; } // [[Rcpp::export]] void runit_lockbinding( Environment env, std::string st){ env.lockBinding( st ) ; } // [[Rcpp::export]] void runit_unlockbinding( Environment env, std::string st){ env.unlockBinding( st ) ; } // [[Rcpp::export]] Environment runit_globenv(){ return Rcpp::Environment::global_env(); } // [[Rcpp::export]] Environment runit_emptyenv(){ return Rcpp::Environment::empty_env(); } // [[Rcpp::export]] Environment runit_baseenv(){ return Rcpp::Environment::base_env(); } // [[Rcpp::export]] Environment runit_namespace( std::string st){ return Environment::namespace_env(st); } // [[Rcpp::export]] Environment runit_env_SEXP(SEXP env){ return Environment( env ) ; } // [[Rcpp::export]] Environment runit_env_string( std::string st ){ return Environment( st ) ; } // [[Rcpp::export]] Environment runit_env_int( int pos ){ return Environment( pos ) ; } // [[Rcpp::export]] Environment runit_parent( Environment env ){ return env.parent() ; } // [[Rcpp::export]] bool runit_remove(Environment env, std::string name ){ bool res = env.remove( name ) ; return wrap( res ) ; } // [[Rcpp::export]] List runit_square( Environment e ){ List out(3) ; out[0] = e["x"] ; e["y"] = 2 ; out[1] = e["y"] ; e["x"] = "foo"; out[2] = e["x"] ; return out ; } // [[Rcpp::export]] Environment runit_Rcpp(){ return Environment::Rcpp_namespace() ; } // [[Rcpp::export]] Environment runit_child(){ Environment global_env = Environment::global_env() ; return global_env.new_child(false) ; } rcpp-0.11.0/inst/unitTests/cpp/table.cpp0000644000000000000000000000240712255076341014767 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // table.cpp: Rcpp R/C++ interface class library -- table<> unit tests // // Copyright (C) 2013 Dirk Eddelbuettel, Romain Francois, and Kevin Ushey // // 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 . #include using namespace Rcpp ; // [[Rcpp::export]] IntegerVector RcppTable(SEXP x) { switch (TYPEOF(x)) { case INTSXP: return table(as(x)); case REALSXP: return table(as(x)); case STRSXP: return table(as(x)); case LGLSXP: return table(as(x)); default: { stop("untested SEXP type"); return R_NilValue; } } } rcpp-0.11.0/inst/unitTests/cpp/Vector.cpp0000644000000000000000000003762512253723677015165 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // Vector.cpp: Rcpp R/C++ interface class library -- Vector unit tests // // Copyright (C) 2012 - 2013 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 . #include using namespace Rcpp ; inline double square( double x){ return x*x; } // [[Rcpp::export]] RawVector raw_(){ RawVector x(10) ; for( int i=0; i<10; i++) x[i] = (Rbyte)i ; return x ; } // [[Rcpp::export]] RawVector raw_REALSXP( RawVector x ){ for( int i=0; i vec(4) ; for( size_t i = 0; i<4; i++) vec[i] = i; IntegerVector y( vec.begin(), vec.end() ) ; return y; } // [[Rcpp::export]] IntegerVector integer_names_set(){ IntegerVector y(2) ; std::vector names(2) ; names[0] = "foo" ; names[1] = "bar" ; y.names() = names ; return y ; } // [[Rcpp::export]] CharacterVector integer_names_get( IntegerVector y ){ return y.names() ; } // [[Rcpp::export]] int integer_names_indexing( IntegerVector y ){ return y["foo"] ; } // [[Rcpp::export]] IntegerVector integer_comma(){ IntegerVector x(4) ; x = 0, 1, 2, 3 ; return x ; } // [[Rcpp::export]] IntegerVector integer_push_back( IntegerVector y ){ y.push_back( 5 ) ; return y ; } // [[Rcpp::export]] IntegerVector integer_push_front( IntegerVector y ){ y.push_front( 5 ) ; return y ; } // [[Rcpp::export]] IntegerVector integer_insert( IntegerVector y){ y.insert( 0, 5 ) ; y.insert( 2, 7 ) ; return y ; } // [[Rcpp::export]] IntegerVector integer_erase( IntegerVector y ){ y.erase(2) ; return y ; } // [[Rcpp::export]] List integer_erase_range( IntegerVector x, IntegerVector y ){ x.erase(x.begin()+5, x.end()-1 ); y.erase(y.begin()+5, y.end()-1 ); return List::create( x, y ) ; } // [[Rcpp::export]] List integer_erase_range_2( IntegerVector x, IntegerVector y ){ IntegerVector::iterator it = x.begin()+1 ; while( it != x.end() ){ it = x.erase(it) ; } it = y.begin() + 1 ; while( it != y.end() ){ it = y.erase(it) ; } return List::create( x, y ) ; } // [[Rcpp::export]] List List_erase_range_2( List x, List y ){ List::iterator it = x.begin()+1 ; while( it != x.end() ){ it = x.erase(it) ; } it = y.begin() + 1 ; while( it != y.end() ){ it = y.erase(it) ; } return List::create( x, y ) ; } // [[Rcpp::export]] IntegerVector integer_erase2( IntegerVector y ){ y.erase(1,2) ; return y ; } // [[Rcpp::export]] IntegerVector integer_fill( IntegerVector y ){ y.fill(10) ; return y ; } // [[Rcpp::export]] IntegerVector integer_zero(){ return IntegerVector(0); } // [[Rcpp::export]] IntegerVector integer_create_zero(){ return IntegerVector::create(); } // [[Rcpp::export]] List integer_create_(){ List output(2); output[0] = IntegerVector::create( 10, 20 ) ; output[1] = IntegerVector::create( _["foo"] = 20, _["bar"] = 30 ) ; return output ; } // [[Rcpp::export]] IntegerVector integer_clone_( IntegerVector vec ){ IntegerVector dolly = clone( vec ) ; for( size_t i=0; i<10; i++){ dolly[i] = 10 - i ; } return dolly ; } // [[Rcpp::export]] NumericVector numeric_(){ NumericVector x(10) ; for( int i=0; i<10; i++) x[i] = i ; return x ; } // [[Rcpp::export]] NumericVector numeric_REALSXP( SEXP vec){ NumericVector x(vec) ; for( int i=0; i v(10) ; for( int i=0; i<10; i++) v[i] = i ; return IntegerVector::import( v.begin(), v.end() ) ; } // [[Rcpp::export]] NumericVector numeric_importtransform(){ std::vector v(10) ; for( int i=0; i<10; i++) v[i] = i ; return NumericVector::import_transform( v.begin(), v.end(), square ) ; } // [[Rcpp::export]] List list_ctor(){ List x(10) ; for( int i=0; i<10; i++) x[i] = Rf_ScalarInteger( i * 2) ; return x ; } // [[Rcpp::export]] List list_template_(){ List x(4) ; x[0] = "foo" ; x[1] = 10 ; x[2] = 10.2 ; x[3] = false; return x ; } // [[Rcpp::export]] List list_VECSXP_( SEXP vec){ List x(vec) ; return x ; } // [[Rcpp::export]] List list_matrix_indexing_1( List m ){ List out(4) ; for( size_t i=0 ; i<4; i++){ out[i] = m(i,i) ; } return out ; } // [[Rcpp::export]] List list_matrix_indexing_2( GenericVector m ){ for(size_t i=0 ; i<4; i++){ m(i,i) = "foo" ; } return m ; } // [[Rcpp::export]] List list_Dimension_constructor_1(){ return List( Dimension( 5 ) ) ; } // [[Rcpp::export]] List list_Dimension_constructor_2(){ return List( Dimension( 5, 5 ) ); } // [[Rcpp::export]] List list_Dimension_constructor_3(){ return List( Dimension( 2, 3, 4) ) ; } // [[Rcpp::export]] List list_iterator_( List input, Function fun){ List output( input.size() ) ; std::transform( input.begin(), input.end(), output.begin(), fun ) ; output.names() = input.names() ; return output ; } // [[Rcpp::export]] int list_name_indexing( List df ){ IntegerVector df_x = df["x"] ; int res = std::accumulate( df_x.begin(), df_x.end(), 0 ) ; return res ; } // [[Rcpp::export]] List list_push_back(List list){ list.push_back( 10 ) ; list.push_back( "bar", "foo" ) ; return list ; } // [[Rcpp::export]] List list_push_front( List list ){ list.push_front( 10 ) ; list.push_front( "bar", "foo" ) ; return list ; } // [[Rcpp::export]] List list_erase( List list ){ list.erase( list.begin() ) ; return list ; } // [[Rcpp::export]] List list_erase_range( List list ){ list.erase( 0, 2 ) ; return list ; } // [[Rcpp::export]] List list_implicit_push_back(){ List list ; list["foo"] = 10 ; list["bar" ] = "foobar" ; return list ; } // [[Rcpp::export]] List list_create_(){ List output(2); output[0] = List::create( 10, "foo" ) ; output[1] = List::create( _["foo"] = 10, _["bar"] = true ) ; return output ; } // [[Rcpp::export]] List list_stdcomplex(){ std::vector< std::complex > v_double(10) ; std::vector< std::complex > v_float(10) ; return List::create( _["float"] = v_float, _["double"] = v_double ) ; } // [[Rcpp::export]] CharacterVector character_ctor(){ CharacterVector x(10) ; for( int i=0; i<10; i++) x[i] = "foo" ; return x ; } // [[Rcpp::export]] std::string character_STRSXP_( SEXP vec ){ CharacterVector x(vec) ; std::string st = "" ; for( int i=0; i vec(4) ; vec[0] = "foo"; vec[1] = "bar"; vec[2] = "bling"; vec[3] = "boom" ; CharacterVector y ; y.assign( vec.begin(), vec.end() ) ; return y; } // [[Rcpp::export]] CharacterVector character_range_ctor1(){ const char* x[] = { "foo", "bar", "bling", "boom" } ; CharacterVector y( x, x+4 ) ; return y; } // [[Rcpp::export]] CharacterVector character_range_ctor2(){ std::vector vec(4) ; vec[0] = "foo"; vec[1] = "bar"; vec[2] = "bling"; vec[3] = "boom" ; CharacterVector y( vec.begin(), vec.end() ) ; return y; } // [[Rcpp::export]] CharacterVector character_dimension_ctor1(){ return CharacterVector( Dimension( 5 ) ) ; } // [[Rcpp::export]] CharacterVector character_dimension_ctor2(){ return CharacterVector( Dimension( 5, 5 ) ) ; } // [[Rcpp::export]] CharacterVector character_dimension_ctor3(){ return CharacterVector( Dimension( 2, 3, 4) ) ; } // [[Rcpp::export]] std::string character_iterator1( CharacterVector letters ){ std::string res ; CharacterVector::iterator first = letters.begin() ; CharacterVector::iterator last = letters.end() ; while( first != last ){ res += *first ; ++first ; } return res ; } // [[Rcpp::export]] std::string character_iterator2( CharacterVector letters ){ std::string res(std::accumulate(letters.begin(), letters.end(), std::string())); return res ; } // [[Rcpp::export]] CharacterVector character_reverse( CharacterVector y ){ std::reverse( y.begin(), y.end() ) ; return y ; } // [[Rcpp::export]] std::string character_names_indexing( CharacterVector y ){ std::string foo( y["foo"] ) ; return foo ; } // [[Rcpp::export]] CharacterVector character_comma(){ CharacterVector x(3) ; x = "foo", "bar", "bling" ; return x ; } // [[Rcpp::export]] List character_listOf( List ll ){ CharacterVector cv1 = ll["foo"]; CharacterVector cv2 = ll["bar"]; std::string rv1 = std::string(cv1[0]) + cv1[1] + cv1[2]; std::string rv2 = std::string(cv2[0]) + cv2[1] + cv2[2]; return List::create(_["foo"] = rv1, _["bar"] = rv2); } // [[Rcpp::export]] int character_find_(CharacterVector y){ CharacterVector::iterator it = std::find( y.begin(), y.end(), "foo" ) ; return std::distance( y.begin(), it ); } // [[Rcpp::export]] List character_create_(){ List output(2); output[0] = CharacterVector::create( "foo", "bar" ) ; output[1] = CharacterVector::create( _["foo"] = "bar", _["bar"] = "foo" ) ; return output ; } // [[Rcpp::export]] List complex_binary_sugar(ComplexVector xx, ComplexVector yy){ return List::create( _["+"] = xx + yy, _["-"] = xx - yy, _["*"] = xx * yy, _["/"] = xx / yy ) ; } // [[Rcpp::export]] List List_extract( List input ){ bool a = input[0] ; int b = input[1] ; return List::create(a, b) ; } // [[Rcpp::export]] CharacterVector factors( CharacterVector s){ return s; } // [[Rcpp::export]] IntegerVector IntegerVector_int_init(){ IntegerVector x(2,4) ; return x ; } // [[Rcpp::export]] bool containsElementNamed( List l, CharacterVector n){ return l.containsElementNamed(n[0]); } // [[Rcpp::export]] List CharacterVectorEqualityOperator( CharacterVector x, CharacterVector y){ int n = x.size() ; LogicalVector eq(n), neq(n); for( int i=0; i x) { return x.size(); } // [[Rcpp::export]] int stdVectorDoubleConst(const std::vector x) { return x.size(); } // [[Rcpp::export]] int stdVectorDoubleRef(std::vector & x) { return x.size(); } // [[Rcpp::export]] int stdVectorDoubleConstRef(const std::vector & x) { return x.size(); } // [[Rcpp::export]] int stdVectorInt(std::vector x) { return x.size(); } // [[Rcpp::export]] int stdVectorIntConst(const std::vector x) { return x.size(); } // [[Rcpp::export]] int stdVectorIntRef(std::vector & x) { return x.size(); } // [[Rcpp::export]] int stdVectorIntConstRef(const std::vector & x) { return x.size(); } // [[Rcpp::export]] std::string character_vector_const_proxy(const CharacterVector& str){ char* cstr = (char*) str[0] ; std::string res ; res += cstr ; return cstr ; } // [[Rcpp::export]] CharacterVector CharacterVector_test_const_proxy(const CharacterVector x){ CharacterVector out( x.size() ) ; for( int i=0; i. #include using namespace Rcpp ; // [[Rcpp::export]] List runit_dbeta(NumericVector xx, double aa, double bb){ return List::create( _["NoLog"] = dbeta( xx, aa, bb), _["Log"] = dbeta( xx, aa, bb, true ) ); } // [[Rcpp::export]] List runit_dbinom( IntegerVector xx ){ return List::create( _["false"] = dbinom( xx, 10, .5), _["true"] = dbinom( xx, 10, .5, true ) ); } // [[Rcpp::export]] List runit_dunif( NumericVector xx){ return List::create( _["NoLog_noMin_noMax"] = dunif( xx ), _["NoLog_noMax"] = dunif( xx, 0.0 ), _["NoLog"] = dunif( xx, 0.0 , 1.0 ), _["Log"] = dunif( xx, 0.0, 1.0 , true ), _["Log_noMax"] = dunif( xx, 0.0, true ) //,_["Log_noMin_noMax"] = dunif( xx, true ) ); } // [[Rcpp::export]] List runit_dgamma( NumericVector xx ){ return List::create( _["NoLog"] = dgamma( xx, 1.0, 1.0), _["Log"] = dgamma( xx, 1.0, 1.0, true ), _["Log_noRate"] = dgamma( xx, 1.0, true ) ); } // [[Rcpp::export]] List runit_dpois( IntegerVector xx ){ return List::create( _["false"] = dpois( xx, .5 ), _["true"] = dpois( xx, .5 , true) ); } // [[Rcpp::export]] List runit_dnorm( NumericVector xx ){ return List::create( _["false_noMean_noSd"] = dnorm( xx ), _["false_noSd"] = dnorm( xx, 0.0 ), _["false"] = dnorm( xx, 0.0, 1.0 ), _["true"] = dnorm( xx, 0.0, 1.0, true ), _["true_noSd"] = dnorm( xx, 0.0, true ), _["true_noMean_noSd"] = dnorm( xx, true ) ); } // [[Rcpp::export]] List runit_dt( NumericVector xx){ return List::create( _["false"] = dt( xx, 5), _["true"] = dt( xx, 5, true )); } // [[Rcpp::export]] List runit_pbeta( NumericVector xx, double aa, double bb ){ return List::create( _["lowerNoLog"] = pbeta( xx, aa, bb), _["lowerLog"] = pbeta( xx, aa, bb, true, true), _["upperNoLog"] = pbeta( xx, aa, bb, false), _["upperLog"] = pbeta( xx, aa, bb, false, true) ); } // [[Rcpp::export]] List runit_pbinom( NumericVector xx, int n, double p){ return List::create( _["lowerNoLog"] = pbinom(xx, n, p ), _["lowerLog"] = pbinom(xx, n, p, true, true ), _["upperNoLog"] = pbinom(xx, n, p, false ), _["upperLog"] = pbinom(xx, n, p, false, true ) ); } // [[Rcpp::export]] List runit_pcauchy( NumericVector xx, double loc, double scl){ return List::create( _["lowerNoLog"] = pcauchy(xx, loc, scl ), _["lowerLog"] = pcauchy(xx, loc, scl, true, true ), _["upperNoLog"] = pcauchy(xx, loc, scl, false ), _["upperLog"] = pcauchy(xx, loc, scl, false, true ) ); } // [[Rcpp::export]] List runit_punif( NumericVector xx ){ return List::create( _["lowerNoLog"] = punif( xx, 0.0, 1.0 ), _["lowerLog"] = punif( xx, 0.0, 1.0, true, true ), _["upperNoLog"] = punif( xx, 0.0, 1.0, false ), _["upperLog"] = punif( xx, 0.0, 1.0, false, true ) ); } // [[Rcpp::export]] List runit_pgamma( NumericVector xx ){ return List::create( _["lowerNoLog"] = pgamma( xx, 2.0, 1.0 ), _["lowerLog"] = pgamma( xx, 2.0, 1.0, true, true ), _["upperNoLog"] = pgamma( xx, 2.0, 1.0, false ), _["upperLog"] = pgamma( xx, 2.0, 1.0, false, true ) ); } // [[Rcpp::export]] List runit_pnf( NumericVector xx ){ return List::create( _["lowerNoLog"] = pnf( xx, 6.0, 8.0, 2.5, true ), _["lowerLog"] = pnf( xx, 6.0, 8.0, 2.5, true, true ), _["upperNoLog"] = pnf( xx, 6.0, 8.0, 2.5, false ), _["upperLog"] = pnf( xx, 6.0, 8.0, 2.5, false, true ) ); } // [[Rcpp::export]] List runit_pf( NumericVector xx ){ return List::create( _["lowerNoLog"] = pf( xx, 6.0, 8.0 ), _["lowerLog"] = pf( xx, 6.0, 8.0, true, true ), _["upperNoLog"] = pf( xx, 6.0, 8.0, false ), _["upperLog"] = pf( xx, 6.0, 8.0, false, true ) ); } // [[Rcpp::export]] List runit_pnchisq( NumericVector xx ){ return List::create( _["lowerNoLog"] = pnchisq( xx, 6.0, 2.5, true ), _["lowerLog"] = pnchisq( xx, 6.0, 2.5, true, true ), _["upperNoLog"] = pnchisq( xx, 6.0, 2.5, false ), _["upperLog"] = pnchisq( xx, 6.0, 2.5, false, true ) ); } // [[Rcpp::export]] List runit_pchisq( NumericVector xx){ return List::create( _["lowerNoLog"] = pchisq( xx, 6.0 ), _["lowerLog"] = pchisq( xx, 6.0, true, true ), _["upperNoLog"] = pchisq( xx, 6.0, false ), _["upperLog"] = pchisq( xx, 6.0, false, true ) ); } // [[Rcpp::export]] List runit_pnorm( NumericVector xx ){ return List::create( _["lowerNoLog"] = pnorm( xx, 0.0, 1.0 ), _["lowerLog"] = pnorm( xx, 0.0, 1.0, true, true ), _["upperNoLog"] = pnorm( xx, 0.0, 1.0, false ), _["upperLog"] = pnorm( xx, 0.0, 1.0, false, true ) ); } // [[Rcpp::export]] List runit_ppois( NumericVector xx){ return List::create( _["lowerNoLog"] = ppois( xx, 0.5 ), _["lowerLog"] = ppois( xx, 0.5, true, true ), _["upperNoLog"] = ppois( xx, 0.5, false ), _["upperLog"] = ppois( xx, 0.5, false, true ) ); } // [[Rcpp::export]] List runit_pt(NumericVector xx){ return List::create(_["lowerNoLog"] = pt( xx, 5 /*true, false*/), _["lowerLog"] = pt( xx, 5, true, true), _["upperNoLog"] = pt( xx, 5, false /*,false*/), _["upperLog"] = pt( xx, 5, false, true) ); } // [[Rcpp::export]] List runit_pnt(NumericVector xx){ return List::create(_["lowerNoLog"] = pnt( xx, 5, 7 /*true, false*/), _["lowerLog"] = pnt( xx, 5, 7, true, true), _["upperNoLog"] = pnt( xx, 5, 7, false /*,false*/), _["upperLog"] = pnt( xx, 5, 7, false, true) ); } // [[Rcpp::export]] List runit_qbinom_prob( NumericVector xx, int n, double p){ return List::create( _["lower"] = qbinom( xx, n, p ), _["upper"] = qbinom( xx, n, p, false) ); } // [[Rcpp::export]] List runit_qunif_prob( NumericVector xx ){ return List::create( _["lower"] = qunif( xx, 0.0, 1.0 ), _["upper"] = qunif( xx, 0.0, 1.0, false) ); } // [[Rcpp::export]] List runit_qnorm_prob( NumericVector xx ){ return List::create( _["lower"] = qnorm( xx, 0.0, 1.0 ), _["upper"] = qnorm( xx, 0.0, 1.0, false)); } // [[Rcpp::export]] List runit_qnorm_log( NumericVector xx ){ return List::create( _["lower"] = qnorm( xx, 0.0, 1.0, true, true), _["upper"] = qnorm( xx, 0.0, 1.0, false, true)); } // [[Rcpp::export]] List runit_qpois_prob( NumericVector xx ){ return List::create( _["lower"] = qpois( xx, 0.5 ), _["upper"] = qpois( xx, 0.5, false)); } // [[Rcpp::export]] NumericVector runit_qt( NumericVector xx, double d, bool lt, bool lg ){ return qt( xx, d, lt, lg); } rcpp-0.11.0/inst/unitTests/cpp/Reference.cpp0000644000000000000000000000202612253723677015604 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // Reference.cpp: Rcpp R/C++ interface class library -- Reference unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; // [[Rcpp::export]] std::string runit_Reference_getId(Reference obj) { std::string txt = obj.field("id"); return txt; } rcpp-0.11.0/inst/unitTests/cpp/wstring.cpp0000644000000000000000000000156712253723677015414 0ustar #include using namespace Rcpp ; // [[Rcpp::export]] CharacterVector CharacterVector_wstring( ){ CharacterVector res(2) ; res[0] = L"foo" ; res[0] += L"bar" ; res[1] = std::wstring( L"foo" ) ; res[1] += std::wstring( L"bar" ) ; return res ; } // [[Rcpp::export]] std::wstring wstring_return(){ return L"foo" ; } // [[Rcpp::export]] String wstring_param(std::wstring s1, std::wstring s2){ String s = s1 ; s += s2 ; return s ; } // [[Rcpp::export]] std::vector wrap_vector_wstring(){ std::vector res(2 ); res[0] = L"foo" ; res[1] = L"bar" ; return res; } // [[Rcpp::export]] std::vector as_vector_wstring( std::vector x){ for( size_t i=0; i. #include using namespace Rcpp ; // [[Rcpp::export]] double matrix_numeric( NumericMatrix m){ double trace = 0.0 ; for( size_t i=0 ; i<4; i++){ trace += m(i,i) ; } return trace ; } // [[Rcpp::export]] std::string matrix_character( CharacterMatrix m){ std::string trace ; for( size_t i=0 ; i<4; i++){ trace += m(i,i) ; } return trace; } // [[Rcpp::export]] List matrix_generic( GenericMatrix m){ List output( m.ncol() ) ; for( size_t i=0 ; i<4; i++){ output[i] = m(i,i) ; } return output ; } // [[Rcpp::export]] NumericMatrix matrix_opequals(SEXP x) { NumericMatrix xx; xx = NumericMatrix(x); return xx; } // [[Rcpp::export]] IntegerMatrix matrix_integer_diag(){ return IntegerMatrix::diag( 5, 1 ) ; } // [[Rcpp::export]] CharacterMatrix matrix_character_diag(){ return CharacterMatrix::diag( 5, "foo" ) ; } // [[Rcpp::export]] NumericMatrix matrix_numeric_ctor1(){ return NumericMatrix(3); } // [[Rcpp::export]] NumericMatrix matrix_numeric_ctor2(){ return NumericMatrix(3,3); } // [[Rcpp::export]] int integer_matrix_indexing( IntegerMatrix m){ int trace = 0.0 ; for( size_t i=0 ; i<4; i++){ trace += m(i,i) ; } return trace ; } // [[Rcpp::export]] IntegerVector integer_matrix_indexing_lhs( IntegerVector m ){ for( size_t i=0 ; i<4; i++){ m(i,i) = 2 * i ; } return m ; } // [[Rcpp::export]] double runit_NumericMatrix_row( NumericMatrix m){ NumericMatrix::Row first_row = m.row(0) ; return std::accumulate( first_row.begin(), first_row.end(), 0.0 ) ; } // [[Rcpp::export]] std::string runit_CharacterMatrix_row( CharacterMatrix m ){ CharacterMatrix::Row first_row = m.row(0) ; std::string res( std::accumulate( first_row.begin(), first_row.end(), std::string() ) ) ; return res ; } // [[Rcpp::export]] IntegerVector runit_GenericMatrix_row( GenericMatrix m ){ GenericMatrix::Row first_row = m.row(0) ; IntegerVector out( first_row.size() ) ; std::transform( first_row.begin(), first_row.end(), out.begin(), unary_call( Function("length" ) ) ) ; return out ; } // [[Rcpp::export]] double runit_NumericMatrix_column( NumericMatrix m ){ NumericMatrix::Column col = m.column(0) ; return std::accumulate( col.begin(), col.end(), 0.0 ) ; } // [[Rcpp::export]] NumericMatrix runit_NumericMatrix_cumsum( NumericMatrix input ){ int nr = input.nrow(), nc = input.ncol() ; NumericMatrix output(nr, nc) ; NumericVector tmp( nr ); for( int i=0; i( Function("length" ) ) ) ; return wrap(out) ; } // [[Rcpp::export]] List runit_Row_Column_sugar( NumericMatrix x){ NumericVector r0 = x.row(0) ; NumericVector c0 = x.column(0) ; return List::create( r0, c0, x.row(1), x.column(1), x.row(1) + x.column(1) ) ; } // [[Rcpp::export]] NumericMatrix runit_NumericMatrix_colsum( NumericMatrix input ){ int nc = input.ncol() ; NumericMatrix output = clone( input ) ; for( int i=1; i( input ) ; for( int i=1; i yy = xx( Range(0,2), Range(0,3) ) ; NumericMatrix res = yy ; return res; } rcpp-0.11.0/inst/unitTests/cpp/Module.cpp0000644000000000000000000001142312266564762015136 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // Module.cpp: Rcpp R/C++ interface class library -- module unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; std::string hello(){ return "hello" ; } int bar( int x){ return x*2 ; } double foo( int x, double y){ return x * y ; } void bla( ){ Rprintf( "hello\\n" ) ; } void bla1( int x){ Rprintf( "hello (x = %d)\\n", x ) ; } void bla2( int x, double y){ Rprintf( "hello (x = %d, y = %5.2f)\\n", x, y ) ; } int test_reference( std::vector& ref ){ return ref.size() ; } int test_const_reference( const std::vector& ref ){ return ref.size() ; } int test_const( const std::vector ref ){ return ref.size() ; } class World { public: World() : msg("hello"){} void set(std::string msg_) { this->msg = msg_; } void set_ref(std::string& msg_) { this->msg = msg_; } void set_const_ref(const std::string& msg_) { this->msg = msg_; } std::string greet() { return msg; } private: std::string msg; }; void clearWorld( World* w ){ w->set( "" ); } class Num{ public: Num() : x(0.0), y(0){} ; double getX() const { return x ; } void setX(double value){ x = value ; } int getY() { return y ; } private: double x ; int y ; }; class Number{ public: Number() : x(0.0), y(0){} ; double x ; int y ; }; class Randomizer { public: // Randomizer() : min(0), max(1){} Randomizer( double min_, double max_) : min(min_), max(max_){} NumericVector get( int n ){ RNGScope scope ; return runif( n, min, max ); } private: double min, max ; } ; RCPP_EXPOSED_CLASS(Test) class Test{ public: double value ; Test(double v) : value(v){} private: // hiding those on purpose // we work by reference or pointers here. Not by copy. Test( const Test& other) ; Test& operator=( const Test& ) ; } ; double Test_get_x_const_ref( const Test& x){ return x.value ; } double Test_get_x_ref( Test& x){ return x.value; } double Test_get_x_const_pointer( const Test* x){ return x->value ; } double Test_get_x_pointer( Test* x){ return x->value ; } RCPP_MODULE(yada){ function( "hello" , &hello ) ; function( "bar" , &bar ) ; function( "foo" , &foo ) ; function( "bla" , &bla ) ; function( "bla1" , &bla1 ) ; function( "bla2" , &bla2 ) ; function( "test_reference", test_reference ); function( "test_const_reference", test_const_reference ) ; function( "test_const", test_const ) ; class_("Test") .constructor() ; class_( "World" ) .constructor() .method( "greet", &World::greet ) .method( "set", &World::set ) .method( "set_ref", &World::set_ref ) .method( "set_const_ref", &World::set_const_ref ) .method( "clear", &clearWorld ) ; class_( "Num" ) .constructor() // read and write property .property( "x", &Num::getX, &Num::setX ) // read-only property .property( "y", &Num::getY ) ; class_( "Number" ) .constructor() // read and write data member .field( "x", &Number::x ) // read only data member .field_readonly( "y", &Number::y ) ; function( "Test_get_x_const_ref", Test_get_x_const_ref ); function( "Test_get_x_ref", Test_get_x_ref ); function( "Test_get_x_const_pointer", Test_get_x_const_pointer ); function( "Test_get_x_pointer", Test_get_x_pointer ); class_( "Randomizer" ) // No default: .default_constructor() .constructor() .method( "get" , &Randomizer::get ) ; } // [[Rcpp::export]] double attr_Test_get_x_const_ref( const Test& x){ return x.value ; } // [[Rcpp::export]] double attr_Test_get_x_ref( Test& x){ return x.value; } // [[Rcpp::export]] double attr_Test_get_x_const_pointer( const Test* x){ return x->value ; } // [[Rcpp::export]] double attr_Test_get_x_pointer( Test* x){ return x->value ; } rcpp-0.11.0/inst/unitTests/cpp/modref.cpp0000644000000000000000000000272112253723677015164 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // modref.cpp: Rcpp R/C++ interface class library -- module unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; class World { public: World() : foo(1), msg("hello") {} void set(std::string msg_) { this->msg = msg_; } std::string greet() { return msg; } int foo ; double bar ; private: std::string msg; }; void clearWorld( World* w ){ w->set( "" ); } RCPP_MODULE(yada){ class_( "World" ) .default_constructor() .method( "greet", &World::greet ) .method( "set", &World::set ) .method( "clear", &clearWorld ) .field( "foo", &World::foo ) .field_readonly( "bar", &World::bar ) ; } rcpp-0.11.0/inst/unitTests/cpp/RObject.cpp0000644000000000000000000000700312253723677015236 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // RObject.cpp: Rcpp R/C++ interface class library -- RObject unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; // [[Rcpp::export]] double asDouble(double d){ return 2*d ; } // [[Rcpp::export]] int asInt(int i){ return 2*i; } // [[Rcpp::export]] std::string asStdString(std::string s){ return s+s ; } // [[Rcpp::export]] Rbyte asRaw( Rbyte i ){ return (Rbyte)(2*i) ; } // [[Rcpp::export]] bool asLogical( bool b){ return !b ; } // [[Rcpp::export]] std::vector asStdVectorInt( SEXP x){ std::vector iv = as< std::vector >(x); for (size_t i=0; i asStdVectorDouble(SEXP x){ std::vector iv = as< std::vector >( x ); for (size_t i=0; i asStdVectorRaw( SEXP x){ std::vector iv = as< std::vector >( x ); for (size_t i=0; i asStdVectorBool( SEXP x ){ std::vector bv = as< std::vector >( x ); for (size_t i=0; i asStdVectorString( SEXP x){ std::vector iv = as< std::vector >( x ); for (size_t i=0; i stdsetint(){ std::set iv ; iv.insert( 0 ) ; iv.insert( 1 ) ; iv.insert( 0 ) ; return iv ; } // [[Rcpp::export]] std::set stdsetdouble(){ std::set ds; ds.insert( 0.0 ); ds.insert( 1.0 ); ds.insert( 0.0 ); return ds ; } // [[Rcpp::export]] std::set stdsetraw(){ std::set bs ; bs.insert( (Rbyte)0 ) ; bs.insert( (Rbyte)1 ) ; bs.insert( (Rbyte)0 ) ; return bs ; } // [[Rcpp::export]] std::set stdsetstring(){ std::set ss ; ss.insert( "foo" ) ; ss.insert( "bar" ) ; ss.insert( "foo" ) ; return ss ; } // [[Rcpp::export]] std::vector attributeNames(DataFrame x){ return x.attributeNames() ; } // [[Rcpp::export]] bool hasAttribute( DataFrame x){ bool has_class = x.hasAttribute( "class" ) ; return has_class ; } // [[Rcpp::export]] SEXP attr_( DataFrame x){ return x.attr( "row.names" ) ; } // [[Rcpp::export]] RObject attr_set(){ RObject y = wrap("blabla") ; y.attr("foo") = 10 ; return y ; } // [[Rcpp::export]] bool isNULL(RObject x){ return x.isNULL() ; } // [[Rcpp::export]] bool inherits_( RObject xx){ return xx.inherits( "foo" ) ; } rcpp-0.11.0/inst/unitTests/cpp/String.cpp0000644000000000000000000000253612253723677015162 0ustar // #define RCPP_STRING_DEBUG_LEVEL 0 // #define RCPP_DEBUG_LEVEL 0 #include using namespace Rcpp ; // [[Rcpp::export]] String String_replace_all( String z, String x, String y){ z.replace_all( x, y ) ; return z ; } // [[Rcpp::export]] String String_replace_first( String z, String x, String y){ z.replace_first( x, y ) ; return z ; } // [[Rcpp::export]] String String_replace_last( String z, String x, String y){ z.replace_last( x, y ) ; return z ; } class StringConv{ public: typedef String result_type ; StringConv( CharacterVector old_, CharacterVector new__): nr(old_.size()), old(old_), new_(new__){} String operator()(String text) const { for( int i=0; i b" ] = aa > bb, _["a == b"] = aa == bb, _["a == a"] = aa == aa ) ; } rcpp-0.11.0/inst/unitTests/cpp/Function.cpp0000644000000000000000000000400012253723677015465 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // Function.cpp: Rcpp R/C++ interface class library -- Rcpp::Function unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; // [[Rcpp::export]] Function function_(SEXP x){ return Function(x) ; } // [[Rcpp::export]] NumericVector function_variadic(Function sort, NumericVector y){ return sort( y, Named("decreasing", true) ) ; } // [[Rcpp::export]] Environment function_env(Function fun){ return fun.environment() ; } // [[Rcpp::export]] IntegerVector function_unarycall(List x){ Function len( "length" ) ; IntegerVector output( x.size() ) ; std::transform( x.begin(), x.end(), output.begin(), unary_call(len) ) ; return output ; } // [[Rcpp::export]] List function_binarycall(List list,IntegerVector vec){ Function pmin( "pmin" ) ; List output( list.size() ) ; std::transform( list.begin(), list.end(), vec.begin(), output.begin(), binary_call(pmin) ) ; return output ; } // [[Rcpp::export]] Function function_namespace_env(){ Environment ns = Environment::namespace_env( "stats" ) ; Function fun = ns[".asSparse"] ; // accesses a non-exported function return fun; } rcpp-0.11.0/inst/unitTests/cpp/DataFrame.cpp0000644000000000000000000000432212253723677015533 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // DataFrame.cpp: Rcpp R/C++ interface class library -- DataFrame unit tests // // Copyright (C) 2012 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 . #include using namespace Rcpp ; // [[Rcpp::export]] DataFrame FromSEXP( SEXP x){ DataFrame df(x) ; return df; } // [[Rcpp::export]] SEXP index_byName( DataFrame df, std::string s ){ return df[s]; } // [[Rcpp::export]] SEXP index_byPosition( DataFrame df, int i ){ return df[i]; } // [[Rcpp::export]] std::string string_element( DataFrame df ){ CharacterVector b = df[1]; std::string s; s = b[1]; return s; } // [[Rcpp::export]] DataFrame createOne(){ IntegerVector v = IntegerVector::create(1,2,3); return DataFrame::create(Named("a")=v); } // [[Rcpp::export]] DataFrame createTwo(){ IntegerVector v = IntegerVector::create(1,2,3); std::vector s(3); s[0] = "a"; s[1] = "b"; s[2] = "c"; return DataFrame::create(Named("a")=v, Named("b")=s); } // [[Rcpp::export]] DataFrame SlotProxy( S4 o, std::string yy ){ return DataFrame( o.slot( yy ) ) ; } // [[Rcpp::export]] DataFrame AttributeProxy( List o, std::string y ){ return DataFrame( o.attr( y )) ; } // [[Rcpp::export]] DataFrame createTwoStringsAsFactors(){ IntegerVector v = IntegerVector::create(1,2,3); std::vector s(3); s[0] = "a"; s[1] = "b"; s[2] = "c"; return DataFrame::create( _["a"] = v, _["b"] = s, _["stringsAsFactors"] = false ); } // [[Rcpp::export]] int DataFrame_nrows( DataFrame df){ return df.nrows() ; } rcpp-0.11.0/inst/unitTests/cpp/dates.cpp0000644000000000000000000001061212253723677015006 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // dates.cpp: Rcpp R/C++ interface class library -- Date + Datetime tests // // Copyright (C) 2010 - 2013 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 . #include using namespace Rcpp; // [[Rcpp::export]] Date ctor_sexp(SEXP d) { Date dt = Date(d); return dt; } // [[Rcpp::export]] SEXP ctor_mdy() { Date dt = Date(12,31,2005); return wrap(dt); } // [[Rcpp::export]] SEXP ctor_ymd() { Date dt = Date(2005,12,31); return wrap(dt); } // [[Rcpp::export]] SEXP ctor_int(int d) { Date dt = Date(d); return wrap(dt); } // [[Rcpp::export]] SEXP ctor_string(std::string x) { Date dt(x); return wrap(dt); } // [[Rcpp::export]] List operators() { Date d1 = Date(2005,12,31); Date d2 = d1 + 1; return List::create(Named("diff") = d1 - d2, Named("bigger") = d2 > d1, Named("smaller") = d2 < d1, Named("equal") = d2 == d1, Named("ge") = d2 >= d1, Named("le") = d2 <= d1, Named("ne") = d2 != d1); } // [[Rcpp::export]] List components() { Date d = Date(2005,12,31); return List::create(Named("day") = d.getDay(), Named("month") = d.getMonth(), Named("year") = d.getYear(), Named("weekday") = d.getWeekday(), Named("yearday") = d.getYearday()); } // [[Rcpp::export]] SEXP vector_Date() { std::vector v(2) ; v[0] = Date(2005,12,31) ; v[1] = Date(12,31,2005) ; return wrap( v ); } // [[Rcpp::export]] SEXP Datevector_wrap() { DateVector v(2) ; v[0] = Date(2005,12,31) ; v[1] = Date(12,31,2005) ; return wrap( v ); } // [[Rcpp::export]] SEXP Datevector_sexp() { DateVector v(2) ; v[0] = Date(2005,12,31) ; v[1] = Date(12,31,2005) ; return wrap( v ); } // [[Rcpp::export]] List Date_get_functions(Date x) { Date d = Date(x); return List::create(Named("year") = d.getYear(), Named("month") = d.getMonth(), Named("day") = d.getDay(), Named("wday") = d.getWeekday(), Named("yday") = d.getYearday()); } // [[Rcpp::export]] List Datetime_get_functions(Datetime x) { Datetime dt = Datetime(x); return List::create(Named("year") = dt.getYear(), Named("month") = dt.getMonth(), Named("day") = dt.getDay(), Named("wday") = dt.getWeekday(), Named("hour") = dt.getHours(), Named("minute") = dt.getMinutes(), Named("second") = dt.getSeconds(), Named("microsec") = dt.getMicroSeconds()); } // [[Rcpp::export]] List Datetime_operators() { Datetime d1 = Datetime(946774923.123456); Datetime d2 = d1 + 60*60; return List::create(Named("diff") = d1 - d2, Named("bigger") = d2 > d1, Named("smaller") = d2 < d1, Named("equal") = d2 == d1, Named("ge") = d2 >= d1, Named("le") = d2 <= d1, Named("ne") = d2 != d1); } // [[Rcpp::export]] SEXP Datetime_wrap() { Datetime dt = Datetime(981162123.123456); return wrap(dt); } // [[Rcpp::export]] SEXP Datetime_from_string(std::string x) { Datetime dt(x); return wrap(dt); } // [[Rcpp::export]] SEXP Datetime_ctor_sexp(Datetime d) { Datetime dt = Datetime(d); return wrap(dt); } // [[Rcpp::export]] SEXP DatetimeVector_ctor(DatetimeVector d) { DatetimeVector dt = DatetimeVector(d); return wrap(dt); } rcpp-0.11.0/inst/unitTests/cpp/rmath.cpp0000644000000000000000000003770412253723677015034 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // rmath.cpp: Rcpp R/C++ interface class library -- rmath unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; // [[Rcpp::export]] NumericVector runit_dnorm( double x, double a, double b ){ return NumericVector::create(R::dnorm(x, a, b, 0), R::dnorm(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pnorm( double x, double a, double b ){ return NumericVector::create(R::pnorm(x, a, b, 1, 0), R::pnorm(log(x), a, b, 1, 1), R::pnorm(x, a, b, 0, 0), R::pnorm(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qnorm( double x, double a, double b ){ return NumericVector::create(R::qnorm(x, a, b, 1, 0), R::qnorm(log(x), a, b, 1, 1), R::qnorm(x, a, b, 0, 0), R::qnorm(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dunif( double x, double a, double b ){ return NumericVector::create(R::dunif(x, a, b, 0), R::dunif(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_punif( double x, double a, double b ){ return NumericVector::create(R::punif(x, a, b, 1, 0), R::punif(log(x), a, b, 1, 1), R::punif(x, a, b, 0, 0), R::punif(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qunif( double x, double a, double b ){ return NumericVector::create(R::qunif(x, a, b, 1, 0), R::qunif(log(x), a, b, 1, 1), R::qunif(x, a, b, 0, 0), R::qunif(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dgamma( double x, double a, double b ){ return NumericVector::create(R::dgamma(x, a, b, 0), R::dgamma(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pgamma( double x, double a, double b ){ return NumericVector::create(R::pgamma(x, a, b, 1, 0), R::pgamma(log(x), a, b, 1, 1), R::pgamma(x, a, b, 0, 0), R::pgamma(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qgamma( double x, double a, double b ){ return NumericVector::create(R::qgamma(x, a, b, 1, 0), R::qgamma(log(x), a, b, 1, 1), R::qgamma(x, a, b, 0, 0), R::qgamma(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dbeta( double x, double a, double b ){ return NumericVector::create(R::dbeta(x, a, b, 0), R::dbeta(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pbeta( double x, double a, double b ){ return NumericVector::create(R::pbeta(x, a, b, 1, 0), R::pbeta(log(x), a, b, 1, 1), R::pbeta(x, a, b, 0, 0), R::pbeta(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qbeta( double x, double a, double b ){ return NumericVector::create(R::qbeta(x, a, b, 1, 0), R::qbeta(log(x), a, b, 1, 1), R::qbeta(x, a, b, 0, 0), R::qbeta(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dlnorm( double x, double a, double b ){ return NumericVector::create(R::dlnorm(x, a, b, 0), R::dlnorm(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_plnorm( double x, double a, double b ){ return NumericVector::create(R::plnorm(x, a, b, 1, 0), R::plnorm(log(x), a, b, 1, 1), R::plnorm(x, a, b, 0, 0), R::plnorm(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qlnorm( double x, double a, double b ){ return NumericVector::create(R::qlnorm(x, a, b, 1, 0), R::qlnorm(log(x), a, b, 1, 1), R::qlnorm(x, a, b, 0, 0), R::qlnorm(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dchisq( double x, double a ){ return NumericVector::create(R::dchisq(x, a, 0), R::dchisq(x, a, 1)); } // [[Rcpp::export]] NumericVector runit_pchisq( double x, double a ){ return NumericVector::create(R::pchisq(x, a, 1, 0), R::pchisq(log(x), a, 1, 1), R::pchisq(x, a, 0, 0), R::pchisq(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qchisq( double x, double a ){ return NumericVector::create(R::qchisq(x, a, 1, 0), R::qchisq(log(x), a, 1, 1), R::qchisq(x, a, 0, 0), R::qchisq(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dnchisq( double x, double a, double b ){ return NumericVector::create(R::dnchisq(x, a, b, 0), R::dnchisq(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pnchisq( double x, double a, double b ){ return NumericVector::create(R::pnchisq(x, a, b, 1, 0), R::pnchisq(log(x), a, b, 1, 1), R::pnchisq(x, a, b, 0, 0), R::pnchisq(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qnchisq( double x, double a, double b ){ return NumericVector::create(R::qnchisq(x, a, b, 1, 0), R::qnchisq(log(x), a, b, 1, 1), R::qnchisq(x, a, b, 0, 0), R::qnchisq(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_df( double x, double a, double b ){ return NumericVector::create(R::df(x, a, b, 0), R::df(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pf( double x, double a, double b ){ return NumericVector::create(R::pf(x, a, b, 1, 0), R::pf(log(x), a, b, 1, 1), R::pf(x, a, b, 0, 0), R::pf(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qf( double x, double a, double b ){ return NumericVector::create(R::qf(x, a, b, 1, 0), R::qf(log(x), a, b, 1, 1), R::qf(x, a, b, 0, 0), R::qf(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dt( double x, double a ){ return NumericVector::create(R::dt(x, a, 0), R::dt(x, a, 1)); } // [[Rcpp::export]] NumericVector runit_pt( double x, double a ){ return NumericVector::create(R::pt(x, a, 1, 0), R::pt(log(x), a, 1, 1), R::pt(x, a, 0, 0), R::pt(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qt( double x, double a ){ return NumericVector::create(R::qt(x, a, 1, 0), R::qt(log(x), a, 1, 1), R::qt(x, a, 0, 0), R::qt(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dbinom( double x, double a, double b ){ return NumericVector::create(R::dbinom(x, a, b, 0), R::dbinom(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pbinom( double x, double a, double b ){ return NumericVector::create(R::pbinom(x, a, b, 1, 0), R::pbinom(log(x), a, b, 1, 1), R::pbinom(x, a, b, 0, 0), R::pbinom(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qbinom( double x, double a, double b ){ return NumericVector::create(R::qbinom(x, a, b, 1, 0), R::qbinom(log(x), a, b, 1, 1), R::qbinom(x, a, b, 0, 0), R::qbinom(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dcauchy( double x, double a, double b ){ return NumericVector::create(R::dcauchy(x, a, b, 0), R::dcauchy(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pcauchy( double x, double a, double b ){ return NumericVector::create(R::pcauchy(x, a, b, 1, 0), R::pcauchy(log(x), a, b, 1, 1), R::pcauchy(x, a, b, 0, 0), R::pcauchy(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qcauchy( double x, double a, double b ){ return NumericVector::create(R::qcauchy(x, a, b, 1, 0), R::qcauchy(log(x), a, b, 1, 1), R::qcauchy(x, a, b, 0, 0), R::qcauchy(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dexp( double x, double a ){ return NumericVector::create(R::dexp(x, a, 0), R::dexp(x, a, 1)); } // [[Rcpp::export]] NumericVector runit_pexp( double x, double a ){ return NumericVector::create(R::pexp(x, a, 1, 0), R::pexp(log(x), a, 1, 1), R::pexp(x, a, 0, 0), R::pexp(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qexp( double x, double a ){ return NumericVector::create(R::qexp(x, a, 1, 0), R::qexp(log(x), a, 1, 1), R::qexp(x, a, 0, 0), R::qexp(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dgeom( double x, double a ){ return NumericVector::create(R::dgeom(x, a, 0), R::dgeom(x, a, 1)); } // [[Rcpp::export]] NumericVector runit_pgeom( double x, double a ){ return NumericVector::create(R::pgeom(x, a, 1, 0), R::pgeom(log(x), a, 1, 1), R::pgeom(x, a, 0, 0), R::pgeom(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qgeom( double x, double a ){ return NumericVector::create(R::qgeom(x, a, 1, 0), R::qgeom(log(x), a, 1, 1), R::qgeom(x, a, 0, 0), R::qgeom(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dhyper( double x, double a, double b, double c ){ return NumericVector::create(R::dhyper(x, a, b, c, 0), R::dhyper(x, a, b, c, 1)); } // [[Rcpp::export]] NumericVector runit_phyper( double x, double a, double b, double c ){ return NumericVector::create(R::phyper(x, a, b, c, 1, 0), R::phyper(log(x), a, b, c, 1, 1), R::phyper(x, a, b, c, 0, 0), R::phyper(log(x), a, b, c, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qhyper( double x, double a, double b, double c ){ return NumericVector::create(R::qhyper(x, a, b, c, 1, 0), R::qhyper(log(x), a, b, c, 1, 1), R::qhyper(x, a, b, c, 0, 0), R::qhyper(log(x), a, b, c, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dnbinom( double x, double a, double b ){ return NumericVector::create(R::dnbinom(x, a, b, 0), R::dnbinom(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pnbinom( double x, double a, double b ){ return NumericVector::create(R::pnbinom(x, a, b, 1, 0), R::pnbinom(log(x), a, b, 1, 1), R::pnbinom(x, a, b, 0, 0), R::pnbinom(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qnbinom( double x, double a, double b ){ return NumericVector::create(R::qnbinom(x, a, b, 1, 0), R::qnbinom(log(x), a, b, 1, 1), R::qnbinom(x, a, b, 0, 0), R::qnbinom(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dpois( double x, double a ){ return NumericVector::create(R::dpois(x, a, 0), R::dpois(x, a, 1)); } // [[Rcpp::export]] NumericVector runit_ppois( double x, double a ){ return NumericVector::create(R::ppois(x, a, 1, 0), R::ppois(log(x), a, 1, 1), R::ppois(x, a, 0, 0), R::ppois(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qpois( double x, double a ){ return NumericVector::create(R::qpois(x, a, 1, 0), R::qpois(log(x), a, 1, 1), R::qpois(x, a, 0, 0), R::qpois(log(x), a, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dweibull( double x, double a, double b ){ return NumericVector::create(R::dweibull(x, a, b, 0), R::dweibull(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pweibull( double x, double a, double b ){ return NumericVector::create(R::pweibull(x, a, b, 1, 0), R::pweibull(log(x), a, b, 1, 1), R::pweibull(x, a, b, 0, 0), R::pweibull(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qweibull( double x, double a, double b ){ return NumericVector::create(R::qweibull(x, a, b, 1, 0), R::qweibull(log(x), a, b, 1, 1), R::qweibull(x, a, b, 0, 0), R::qweibull(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dlogis( double x, double a, double b ){ return NumericVector::create(R::dlogis(x, a, b, 0), R::dlogis(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_plogis( double x, double a, double b ){ return NumericVector::create(R::plogis(x, a, b, 1, 0), R::plogis(log(x), a, b, 1, 1), R::plogis(x, a, b, 0, 0), R::plogis(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qlogis( double x, double a, double b ){ return NumericVector::create(R::qlogis(x, a, b, 1, 0), R::qlogis(log(x), a, b, 1, 1), R::qlogis(x, a, b, 0, 0), R::qlogis(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dnbeta( double x, double a, double b, double c ){ return NumericVector::create(R::dnbeta(x, a, b, c, 0), R::dnbeta(x, a, b, c, 1)); } // [[Rcpp::export]] NumericVector runit_pnbeta( double x, double a, double b, double c ){ return NumericVector::create(R::pnbeta(x, a, b, c, 1, 0), R::pnbeta(log(x), a, b, c, 1, 1), R::pnbeta(x, a, b, c, 0, 0), R::pnbeta(log(x), a, b, c, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qnbeta( double x, double a, double b, double c ){ return NumericVector::create(R::qnbeta(x, a, b, c, 1, 0), R::qnbeta(log(x), a, b, c, 1, 1), R::qnbeta(x, a, b, c, 0, 0), R::qnbeta(log(x), a, b, c, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dnf( double x, double a, double b, double c ){ return NumericVector::create(R::dnf(x, a, b, c, 0), R::dnf(x, a, b, c, 1)); } // [[Rcpp::export]] NumericVector runit_pnf( double x, double a, double b, double c ){ return NumericVector::create(R::pnf(x, a, b, c, 1, 0), R::pnf(log(x), a, b, c, 1, 1), R::pnf(x, a, b, c, 0, 0), R::pnf(log(x), a, b, c, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qnf( double x, double a, double b, double c ){ return NumericVector::create(R::qnf(x, a, b, c, 1, 0), R::qnf(log(x), a, b, c, 1, 1), R::qnf(x, a, b, c, 0, 0), R::qnf(log(x), a, b, c, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dnt( double x, double a, double b ){ return NumericVector::create(R::dnt(x, a, b, 0), R::dnt(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pnt( double x, double a, double b ){ return NumericVector::create(R::pnt(x, a, b, 1, 0), R::pnt(log(x), a, b, 1, 1), R::pnt(x, a, b, 0, 0), R::pnt(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qnt( double x, double a, double b ){ return NumericVector::create(R::qnt(x, a, b, 1, 0), R::qnt(log(x), a, b, 1, 1), R::qnt(x, a, b, 0, 0), R::qnt(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_dwilcox( double x, double a, double b ){ return NumericVector::create(R::dwilcox(x, a, b, 0), R::dwilcox(x, a, b, 1)); } // [[Rcpp::export]] NumericVector runit_pwilcox( double x, double a, double b ){ return NumericVector::create(R::pwilcox(x, a, b, 1, 0), R::pwilcox(log(x), a, b, 1, 1), R::pwilcox(x, a, b, 0, 0), R::pwilcox(log(x), a, b, 0, 1)); } // [[Rcpp::export]] NumericVector runit_qwilcox( double x, double a, double b ){ return NumericVector::create(R::qwilcox(x, a, b, 1, 0), R::qwilcox(log(x), a, b, 1, 1), R::qwilcox(x, a, b, 0, 0), R::qwilcox(log(x), a, b, 0, 1)); } rcpp-0.11.0/inst/unitTests/cpp/misc.cpp0000644000000000000000000001020012253723677014632 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // misc.cpp: Rcpp R/C++ interface class library -- misc unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; using namespace std; #include #include class simple { Rcpp::Dimension dd; public: simple(SEXP xp) : dd(xp) {} int nrow() const { return dd[0]; } int ncol() const { return dd[1]; } }; // [[Rcpp::export]] SEXP symbol_(){ return LogicalVector::create( Symbol( Rf_install("foobar") ) == Rf_install("foobar"), Symbol( Rf_mkChar("foobar") ) == Rf_install("foobar"), Symbol( Rf_mkString("foobar") ) == Rf_install("foobar"), Symbol( "foobar" ) == Rf_install("foobar") ) ; } // [[Rcpp::export]] Symbol symbol_ctor(SEXP x){ return Symbol(x); } // [[Rcpp::export]] List Argument_(){ Argument x("x"), y("y"); return List::create( x = 2, y = 3 ); } // [[Rcpp::export]] int Dimension_const( SEXP ia ){ simple ss(ia); return ss.nrow(); } // [[Rcpp::export]] SEXP evaluator_error(){ return Rcpp_eval( Rf_lang2( Rf_install("stop"), Rf_mkString( "boom" ) ) ) ; } // [[Rcpp::export]] SEXP evaluator_ok(SEXP x){ return Rcpp_eval( Rf_lang2( Rf_install("sample"), x ) ) ; } // [[Rcpp::export]] void exceptions_(){ throw std::range_error("boom") ; } // [[Rcpp::export]] LogicalVector has_iterator_( ){ return LogicalVector::create( (bool)Rcpp::traits::has_iterator< std::vector >::value, (bool)Rcpp::traits::has_iterator< std::list >::value, (bool)Rcpp::traits::has_iterator< std::deque >::value, (bool)Rcpp::traits::has_iterator< std::set >::value, (bool)Rcpp::traits::has_iterator< std::map >::value, (bool)Rcpp::traits::has_iterator< std::pair >::value, (bool)Rcpp::traits::has_iterator< Rcpp::Symbol >::value ); } // [[Rcpp::export]] void test_rcout(std::string tfile, std::string teststring){ // define and open testfile std::ofstream testfile(tfile.c_str()); // save output buffer of the Rcout stream std::streambuf* Rcout_buffer = Rcout.rdbuf(); // redirect ouput into testfile Rcout.rdbuf( testfile.rdbuf() ); // write a test string to the file Rcout << teststring << std::endl; // restore old output buffer Rcout.rdbuf(Rcout_buffer); // close testfile testfile.close(); } // [[Rcpp::export]] LogicalVector na_proxy(){ CharacterVector s("foo") ; return LogicalVector::create( NA_REAL == NA, NA_INTEGER == NA, NA_STRING == NA, true == NA, false == NA, 1.2 == NA, 12 == NA, "foo" == NA, s[0] == NA, NA == NA_REAL, NA == NA_INTEGER, NA == NA_STRING, NA == true, NA == false, NA == 1.2 , NA == 12 , NA == "foo", NA == s[0] ) ; } // [[Rcpp::export]] StretchyList stretchy_list(){ StretchyList out ; out.push_back( 1 ) ; out.push_front( "foo" ) ; out.push_back( 3.2 ) ; return out; } // [[Rcpp::export]] StretchyList named_stretchy_list(){ StretchyList out ; out.push_back( _["b"] = 1 ) ; out.push_front( _["a"] = "foo" ) ; out.push_back( _["c"] = 3.2 ) ; return out; } rcpp-0.11.0/inst/unitTests/cpp/XPtr.cpp0000644000000000000000000000326312253723677014607 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // XPtr.cpp: Rcpp R/C++ interface class library -- external pointer unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; // [[Rcpp::export]] XPtr< std::vector > xptr_1(){ /* 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. */ 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 ) ; } // [[Rcpp::export]] int xptr_2( XPtr< std::vector > p){ /* just return the front of the vector as a SEXP */ return p->front() ; } rcpp-0.11.0/inst/unitTests/cpp/wrap.cpp0000644000000000000000000001514512253723677014665 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // wrap.cpp: Rcpp R/C++ interface class library -- wrap unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; // [[Rcpp::export]] IntegerVector map_string_int(){ std::map< std::string, int > m ; m["b"] = 100; m["a"] = 200; m["c"] = 300; return wrap(m); } // [[Rcpp::export]] NumericVector map_string_double(){ std::map m ; m["b"] = 100; m["a"] = 200; m["c"] = 300; return wrap(m); } // [[Rcpp::export]] LogicalVector map_string_bool(){ std::map m ; m["b"] = true; m["a"] = false; m["c"] = true; return wrap(m); } // [[Rcpp::export]] RawVector map_string_Rbyte(){ std::map m ; m["b"] = (Rbyte)0; m["a"] = (Rbyte)1; m["c"] = (Rbyte)2; return wrap(m); } // [[Rcpp::export]] CharacterVector map_string_string(){ std::map m ; m["b"] = "foo" ; m["a"] = "bar" ; m["c"] = "bling" ; return wrap(m); } // [[Rcpp::export]] List map_string_generic(){ std::map< std::string,std::vector > m ; std::vector b; b.push_back(1); b.push_back(2); m["b"] = b; std::vector a; a.push_back(1); a.push_back(2); a.push_back(2); m["a"] = a; std::vector c; c.push_back(1); c.push_back(2); c.push_back(2); c.push_back(2); m["c"] = c; return wrap(m); } // [[Rcpp::export]] IntegerVector multimap_string_int(){ std::multimap< std::string, int > m; m.insert( std::pair("b", 100)); m.insert( std::pair("a", 200)); m.insert( std::pair("c", 300)); return wrap(m); } // [[Rcpp::export]] NumericVector multimap_string_double(){ std::multimap m ; m.insert( std::pair("b", 100) ); m.insert( std::pair("a", 200) ); m.insert( std::pair("c", 300) ); return wrap(m); } // [[Rcpp::export]] LogicalVector multimap_string_bool(){ std::multimap m ; m.insert( std::pair("b", true ) ) ; m.insert( std::pair("a", false) ) ; m.insert( std::pair("c", true ) ) ; return wrap(m); } // [[Rcpp::export]] RawVector multimap_string_Rbyte(){ std::multimap m ; m.insert( std::pair("b", (Rbyte)0) ); m.insert( std::pair("a", (Rbyte)1) ); m.insert( std::pair("c", (Rbyte)2) ); return wrap(m); } // [[Rcpp::export]] CharacterVector multimap_string_string(){ std::multimap m ; m.insert( std::pair( "b", "foo" ) ) ; m.insert( std::pair( "a", "bar" ) ) ; m.insert( std::pair( "c", "bling") ) ; return wrap(m); } // [[Rcpp::export]] List multimap_string_generic(){ typedef std::pair > _pair ; std::multimap< std::string,std::vector > m ; std::vector b ; b.push_back(1) ; b.push_back(2) ; m.insert( _pair("b", b) ); std::vector a ; a.push_back(1) ; a.push_back(2) ; a.push_back(2) ; m.insert( _pair("a", a) ); std::vector c ; c.push_back(1) ; c.push_back(2) ; c.push_back(2) ; c.push_back(2) ; m.insert( _pair("c", c) ); return wrap(m); } // [[Rcpp::export]] SEXP nonnull_const_char(){ const char *p = "foo"; return wrap(p) ; } // [[Rcpp::export]] IntegerVector unordered_map_string_int(){ RCPP_UNORDERED_MAP< std::string, int > m ; m["b"] = 100; m["a"] = 200; m["c"] = 300; return wrap(m); } // [[Rcpp::export]] NumericVector unordered_map_string_double(){ RCPP_UNORDERED_MAP m ; m["b"] = 100; m["a"] = 200; m["c"] = 300; return wrap(m); } // [[Rcpp::export]] LogicalVector unordered_map_string_bool(){ RCPP_UNORDERED_MAP m ; m["b"] = true; m["a"] = false; m["c"] = true; return wrap(m) ; } // [[Rcpp::export]] RawVector unordered_map_string_Rbyte(){ RCPP_UNORDERED_MAP m ; m["b"] = (Rbyte)0; m["a"] = (Rbyte)1; m["c"] = (Rbyte)2; return wrap(m); } // [[Rcpp::export]] CharacterVector unordered_map_string_string(){ RCPP_UNORDERED_MAP m ; m["b"] = "foo" ; m["a"] = "bar" ; m["c"] = "bling" ; return wrap(m) ; } // [[Rcpp::export]] List unordered_map_string_generic(){ RCPP_UNORDERED_MAP< std::string,std::vector > m ; std::vector b; b.push_back(1); b.push_back(2); m["b"] = b ; std::vector a; a.push_back(1); a.push_back(2); a.push_back(2); m["a"] = a; std::vector c; c.push_back(1); c.push_back(2); c.push_back(2); c.push_back(2); m["c"] = c; return wrap(m); } // [[Rcpp::export]] SEXP map_int_double(){ std::map map ; map[0] = 2.0 ; map[-1] = 3.0 ; return wrap( map ) ; } // [[Rcpp::export]] SEXP map_double_double(){ std::map map ; map[0.0] = 2.0 ; map[1.2] = 3.0 ; return wrap( map ) ; } // [[Rcpp::export]] SEXP map_int_vector_double(){ std::map > map ; map[0].push_back( 1.0 ) ; map[0].push_back( 2.0 ) ; map[1].push_back( 2.0 ) ; map[1].push_back( 3.0 ) ; return wrap( map ) ; } RCPP_EXPOSED_CLASS(Foo) class Foo{ public: Foo() : x(0.0){} Foo( double x_ ) : x(x_){} double get() { return x ; } private: double x ; } ; RCPP_MODULE(mod){ class_("Foo") .constructor() .method( "get", &Foo::get ) ; } // [[Rcpp::export]] SEXP map_int_Foo(){ std::map map ; map[0] = Foo( 2 ) ; map[1] = Foo( 3 ) ; return wrap( map ) ; } // [[Rcpp::export]] SEXP vector_Foo(){ std::vector vec(2) ; vec[0] = Foo( 2 ) ; vec[1] = Foo( 3 ) ; return wrap(vec) ; } rcpp-0.11.0/inst/unitTests/cpp/sugar.cpp0000644000000000000000000003545212253723677015040 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // sugar.cpp: Rcpp R/C++ interface class library -- sugar unit tests // // Copyright (C) 2012 - 2013 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 . #include using namespace Rcpp ; template class square : public std::unary_function { public: T operator()( T t) const { return t*t ; } } ; double raw_square( double x){ return x*x; } // [[Rcpp::export]] List runit_abs( NumericVector xx, IntegerVector yy ){ return List::create( abs(xx), abs(yy) ) ; } // [[Rcpp::export]] LogicalVector runit_all_one_less( NumericVector xx ){ return all( xx < 5.0 ) ; } // [[Rcpp::export]] LogicalVector runit_all_one_greater( NumericVector xx ){ return all( xx > 5.0 ) ; } // [[Rcpp::export]] LogicalVector runit_all_one_less_or_equal( NumericVector xx ){ return all( xx <= 5.0 ) ; } // [[Rcpp::export]] LogicalVector runit_all_one_greater_or_equal( NumericVector xx ){ return all( xx >= 5.0 ) ; } // [[Rcpp::export]] LogicalVector runit_all_one_equal( NumericVector xx ){ return all( xx == 5.0 ) ; } // [[Rcpp::export]] LogicalVector runit_all_not_equal_one( NumericVector xx ){ return all( xx != 5.0 ) ; } // [[Rcpp::export]] LogicalVector runit_all_less( NumericVector xx, NumericVector yy){ return all( xx < yy ) ; } // [[Rcpp::export]] LogicalVector runit_all_greater( NumericVector xx, NumericVector yy ){ return all( xx > yy ) ; } // [[Rcpp::export]] LogicalVector runit_all_less_or_equal( NumericVector xx, NumericVector yy){ return all( xx <= yy ) ; } // [[Rcpp::export]] LogicalVector runit_all_greater_or_equal( NumericVector xx, NumericVector yy){ return all( xx >= yy ) ; } // [[Rcpp::export]] LogicalVector runit_all_equal( NumericVector xx, NumericVector yy){ return all( xx == yy ) ; } // [[Rcpp::export]] LogicalVector runit_all_not_equal( NumericVector xx, NumericVector yy){ return all( xx != yy ) ; } // [[Rcpp::export]] LogicalVector runit_any_less( NumericVector xx, NumericVector yy){ return any( xx < yy ) ; } // [[Rcpp::export]] LogicalVector runit_any_greater( NumericVector xx, NumericVector yy ){ return any( xx > yy ) ; } // [[Rcpp::export]] LogicalVector runit_any_less_or_equal( NumericVector xx, NumericVector yy ){ return any( xx <= yy ) ; } // [[Rcpp::export]] LogicalVector runit_any_greater_or_equal( NumericVector xx, NumericVector yy){ return any( xx >= yy ) ; } // [[Rcpp::export]] LogicalVector runit_any_equal( NumericVector xx, NumericVector yy){ return any( xx == yy ) ; } // [[Rcpp::export]] LogicalVector runit_any_not_equal( NumericVector xx, NumericVector yy){ return any( xx != yy ) ; } // [[Rcpp::export]] LogicalVector runit_constructor( NumericVector xx, NumericVector yy ){ LogicalVector res( xx < yy ) ; return res ; } // [[Rcpp::export]] LogicalVector runit_assignment( NumericVector xx, NumericVector yy ){ LogicalVector res; res = xx < yy ; return res ; } // [[Rcpp::export]] NumericVector runit_diff( NumericVector xx){ NumericVector res = diff( xx ); return res ; } // [[Rcpp::export]] IntegerVector runit_diff_int(IntegerVector xx) { IntegerVector res = diff(xx); return res; } // [[Rcpp::export]] NumericVector runit_diff_ifelse( LogicalVector pred, NumericVector xx, NumericVector yy){ NumericVector res = ifelse( pred, diff(xx), diff(yy) ); return res ; } // [[Rcpp::export]] List runit_exp( NumericVector xx, IntegerVector yy ){ return List::create( exp(xx), exp(yy) ) ; } // [[Rcpp::export]] List runit_floor( NumericVector xx, IntegerVector yy ){ return List::create( floor(xx), floor(yy) ) ; } // [[Rcpp::export]] List runit_ceil( NumericVector xx, IntegerVector yy){ return List::create( ceil(xx), ceil(yy) ) ; } // [[Rcpp::export]] List runit_pow( NumericVector xx, IntegerVector yy){ return List::create( pow(xx, 3), pow(yy, 2.3) ) ; } // [[Rcpp::export]] List runit_ifelse( NumericVector xx, NumericVector yy){ return List::create( _["vec_vec" ] = ifelse( xx < yy, xx*xx, -(yy*yy) ), _["vec_prim"] = ifelse( xx < yy, 1.0 , -(yy*yy) ), _["prim_vec"] = ifelse( xx < yy, xx*xx, 1.0 ), _["prim_prim"] = ifelse( xx < yy, 1.0, 2.0 ) ) ; } // [[Rcpp::export]] LogicalVector runit_isna( NumericVector xx){ return wrap( is_na( xx ) ) ; } // [[Rcpp::export]] LogicalVector runit_isfinite( NumericVector xx){ return is_finite(xx) ; } // [[Rcpp::export]] LogicalVector runit_isinfinite( NumericVector xx){ return is_infinite(xx) ; } // [[Rcpp::export]] LogicalVector runit_isnan( NumericVector xx){ return is_nan(xx) ; } // [[Rcpp::export]] LogicalVector runit_isna_isna( NumericVector xx ){ return is_na( is_na( xx ) ) ; } // [[Rcpp::export]] LogicalVector runit_any_isna( NumericVector xx){ return any( is_na( xx ) ) ; } // [[Rcpp::export]] List runit_lapply( IntegerVector xx){ List res = lapply( xx, seq_len ); return res ; } // [[Rcpp::export]] List runit_minus( IntegerVector xx ){ return List::create( xx - 10, 10 - xx, xx - xx, noNA( xx ) - 10, 10 - noNA( xx ) ) ; } // [[Rcpp::export]] LogicalVector runit_any_equal_not( NumericVector xx, NumericVector yy){ return any( !( xx == yy) ) ; } // [[Rcpp::export]] List runit_plus( IntegerVector xx ){ return List::create( xx + 10, 10 + xx, xx + xx, xx + xx + xx ) ; } // [[Rcpp::export]] List runit_plus_seqlen(){ return List::create( seq_len(10) + 10, 10 + seq_len(10), seq_len(10) + seq_len(10) ) ; } // [[Rcpp::export]] LogicalVector runit_plus_all( IntegerVector xx ){ return all( (xx+xx) < 10 ) ; } // [[Rcpp::export]] NumericVector runit_pmin( NumericVector xx, NumericVector yy ){ NumericVector res = pmin( xx, yy ); return res ; } // [[Rcpp::export]] List runit_pmin_one( NumericVector xx ){ return List::create( pmin( xx, 5), pmin( 5, xx) ) ; } // [[Rcpp::export]] NumericVector runit_pmax( NumericVector xx, NumericVector yy ){ NumericVector res = pmax( xx, yy ); return res ; } // [[Rcpp::export]] List runit_pmax_one( NumericVector xx ){ return List::create( pmax( xx, 5), pmax( 5, xx) ) ; } // [[Rcpp::export]] NumericVector runit_Range(){ NumericVector xx(8) ; xx[ Range(0,3) ] = exp( seq_len(4) ) ; xx[ Range(4,7) ] = exp( - seq_len(4) ) ; return xx ; } // [[Rcpp::export]] NumericVector runit_sapply( NumericVector xx ){ NumericVector res = sapply( xx, square() ); return res ; } // [[Rcpp::export]] NumericVector runit_sapply_rawfun( NumericVector xx){ NumericVector res = sapply( xx, raw_square ); return res ; } // [[Rcpp::export]] LogicalVector runit_sapply_square( NumericVector xx){ return all( sapply( xx * xx , square() ) < 10.0 ); } // [[Rcpp::export]] List runit_sapply_list( IntegerVector xx){ List res = sapply( xx, seq_len ); return res ; } // [[Rcpp::export]] IntegerVector runit_seqalong( NumericVector xx ){ IntegerVector res = seq_along( xx ); return res ; } // [[Rcpp::export]] IntegerVector runit_seqlen(){ IntegerVector res = seq_len( 10 ); return res ; } // [[Rcpp::export]] List runit_sign( NumericVector xx, IntegerVector yy ){ return List::create( sign( xx ), sign( yy ) ) ; } // [[Rcpp::export]] List runit_times( IntegerVector xx ){ IntegerVector yy = clone( xx ) ; yy[0] = NA_INTEGER ; return List::create( xx * 10, 10 * xx, xx * xx, xx * xx * xx, xx * yy, yy * 10, 10 * yy, NA_INTEGER * xx ) ; } // [[Rcpp::export]] List runit_divides( NumericVector xx ){ return List::create( xx / 10, 10 / xx, xx / xx ) ; } // [[Rcpp::export]] NumericVector runit_unary_minus( NumericVector xx){ NumericVector yy = - xx ; return yy ; } // [[Rcpp::export]] void runit_wrap( NumericVector xx, NumericVector yy, Environment e ){ e["foo"] = xx < yy ; } // [[Rcpp::export]] List runit_complex( ComplexVector cx ){ return List::create( _["Re"] = Re( cx ), _["Im"] = Im( cx ), _["Conj"] = Conj( cx ), _["Mod"] = Mod( cx ), _["exp"] = exp( cx ), _["log"] = log( cx ), _["sqrt"] = sqrt( cx ), _["cos"] = cos( cx ), _["sin"] = sin( cx ), _["tan"] = tan( cx ), _["acos"] = acos( cx ), _["asin"] = asin( cx ), _["atan"] = atan( cx ), // _["acosh"] = acosh( cx ), _["asinh"] = asinh( cx ), _["atanh"] = atanh( cx ), _["cosh"] = cosh( cx ), _["sinh"] = sinh( cx ), _["tanh"] = tanh( cx ) ) ; } // [[Rcpp::export]] List runit_rep( IntegerVector xx ){ List res = List::create( _["rep"] = rep( xx, 3 ), _["rep_each"] = rep_each( xx, 3 ), _["rep_len"] = rep_len( xx, 12 ), _["rep_prim_double"] = rep( 0.0, 10 ) ) ; return res ; } // [[Rcpp::export]] IntegerVector runit_rev( IntegerVector xx ){ IntegerVector yy = rev( xx * xx ); return yy ; } // [[Rcpp::export]] NumericMatrix runit_outer( NumericVector xx, NumericVector yy){ NumericMatrix m = outer( xx, yy, std::plus() ) ; return m ; } // [[Rcpp::export]] List runit_row( NumericMatrix xx ){ return List::create( _["row"] = row( xx ), _["col"] = col( xx ) ) ; } // [[Rcpp::export]] List runit_head( NumericVector xx ){ return List::create( _["pos"] = head( xx, 5 ), _["neg"] = head( xx, -5 ) ) ; } // [[Rcpp::export]] List runit_tail( NumericVector xx ){ return List::create( _["pos"] = tail( xx, 5 ), _["neg"] = tail( xx, -5 ) ) ; } // [[Rcpp::export]] List runit_diag( NumericVector xx, NumericMatrix mm ){ return List::create( diag( xx ) , diag( mm ), diag( outer( xx, xx, std::plus() ) ) ) ; } // [[Rcpp::export]] List runit_gamma( NumericVector xx ){ return List::create( _["gamma"] = gamma(xx), _["lgamma"] = lgamma(xx), _["digamma"] = digamma(xx), _["trigamma"] = trigamma(xx), _["tetragamma"] = tetragamma(xx), _["pentagamma"] = pentagamma(xx), _["factorial"] = factorial(xx), _["lfactorial"] = lfactorial(xx) ) ; } // [[Rcpp::export]] List runit_choose( NumericVector nn, NumericVector kk ){ return List::create( _["VV"] = choose(nn,kk), _["PV"] = choose(10.0, kk ), _["VP"] = choose(nn, 5.0 ) ) ; } // [[Rcpp::export]] List runit_lchoose( NumericVector nn, NumericVector kk){ return List::create( _["VV"] = lchoose(nn,kk), _["PV"] = lchoose(10.0, kk ), _["VP"] = lchoose(nn, 5.0 ) ) ; } // [[Rcpp::export]] List runit_beta( NumericVector nn, NumericVector kk){ return List::create( _["VV"] = beta(nn,kk), _["PV"] = beta(10.0, kk ), _["VP"] = beta(nn, 5.0 ) ) ; } // [[Rcpp::export]] List runit_psigamma( NumericVector nn, NumericVector kk){ return List::create( _["VV"] = psigamma(nn,kk), _["PV"] = psigamma(10.0, kk ), _["VP"] = psigamma(nn, 5.0 ) ) ; } // [[Rcpp::export]] List runit_lbeta( NumericVector nn, NumericVector kk){ return List::create( _["VV"] = lbeta(nn,kk), _["PV"] = lbeta(10.0, kk ), _["VP"] = lbeta(nn, 5.0 ) ) ; } // [[Rcpp::export]] List runit_log1p( NumericVector xx){ return List::create( _["log1p"] = log1p(xx), _["expm1"] = expm1(xx) ) ; } // [[Rcpp::export]] double runit_sum( NumericVector xx){ return sum( xx ) ; } // [[Rcpp::export]] NumericVector runit_cumsum( NumericVector xx ){ NumericVector res = cumsum( xx ) ; return res ; } // [[Rcpp::export]] List runit_asvector( NumericMatrix z, NumericVector x, NumericVector y){ return List::create( as_vector( z ), as_vector( outer( x , y , std::plus() ) ) ) ; } // [[Rcpp::export]] NumericVector runit_diff_REALSXP_NA( NumericVector x ){ NumericVector res= diff(x) ; return res ; } // [[Rcpp::export]] List runit_trunc( NumericVector xx, IntegerVector yy){ return List::create(trunc(xx), trunc(yy)) ; } // [[Rcpp::export]] NumericVector runit_round( NumericVector xx, int d ){ NumericVector res = round(xx, d); return res ; } // [[Rcpp::export]] NumericVector runit_signif( NumericVector xx, int d ){ NumericVector res = signif(xx, d); return res ; } // [[Rcpp::export]] double runit_RangeIndexer( NumericVector x ){ return max( x[ seq(0, 4) ] ) ; } // [[Rcpp::export]] IntegerVector runit_self_match( CharacterVector x){ return self_match( x ) ; } // [[Rcpp::export]] IntegerVector runit_table( CharacterVector x){ return table( x ) ; } // [[Rcpp::export]] LogicalVector runit_duplicated( CharacterVector x){ return duplicated( x ) ; } // [[Rcpp::export]] IntegerVector runit_union( IntegerVector x, IntegerVector y){ return union_( x, y) ; } // [[Rcpp::export]] IntegerVector runit_setdiff( IntegerVector x, IntegerVector y){ return setdiff( x, y) ; } // [[Rcpp::export]] IntegerVector runit_intersect( IntegerVector x, IntegerVector y){ return intersect( x, y ) ; } // [[Rcpp::export]] NumericVector runit_clamp( double a, NumericVector x, double b){ return clamp( a, x, b ) ; } // [[Rcpp::export]] List vector_scalar_ops( NumericVector xx ){ NumericVector y1 = xx + 2.0; // NB does not work with ints as eg "+ 2L" NumericVector y2 = 2 - xx; NumericVector y3 = xx * 2.0; NumericVector y4 = 2.0 / xx; return List::create(y1, y2, y3, y4); } // [[Rcpp::export]] List vector_scalar_logical( NumericVector xx ){ LogicalVector y1 = xx < 2; LogicalVector y2 = 2 > xx; LogicalVector y3 = xx <= 2; LogicalVector y4 = 2 != xx; return List::create(y1, y2, y3, y4); } // [[Rcpp::export]] List vector_vector_ops( NumericVector xx, NumericVector yy){ NumericVector y1 = xx + yy; NumericVector y2 = yy - xx; NumericVector y3 = xx * yy; NumericVector y4 = yy / xx; return List::create(y1, y2, y3, y4); } // [[Rcpp::export]] List vector_vector_logical( NumericVector xx, NumericVector yy){ LogicalVector y1 = xx < yy; LogicalVector y2 = xx > yy; LogicalVector y3 = xx <= yy; LogicalVector y4 = xx >= yy; LogicalVector y5 = xx == yy; LogicalVector y6 = xx != yy; return List::create(y1, y2, y3, y4, y5, y6); } rcpp-0.11.0/inst/unitTests/cpp/S4.cpp0000644000000000000000000000417312266757337014205 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // S4.cpp: Rcpp R/C++ interface class library -- S4 unit tests // // Copyright (C) 2013 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 . #include using namespace Rcpp ; // [[Rcpp::export]] List S4_methods( RObject y ){ List res(5) ; res[0] = y.isS4() ; res[1] = y.hasSlot("x") ; res[2] = y.hasSlot("z") ; res[3] = y.slot("x") ; res[4] = y.slot("y") ; return res ; } // [[Rcpp::export]] void S4_getslots( S4 y){ y.slot( "x" ) = 10.0 ; y.slot( "y" ) = 20.0 ; } // [[Rcpp::export]] void S4_setslots( S4 y ){ y.slot( "foo" ) = 10.0 ; } // [[Rcpp::export]] void S4_setslots_2( S4 y){ y.slot( "foo" ) ; } // [[Rcpp::export]] S4 S4_ctor( std::string cl){ return S4( cl ); } // [[Rcpp::export]] bool S4_is_track(S4 tr){ return tr.is("track") ; } // [[Rcpp::export]] bool S4_is_trackCurve(S4 tr){ return tr.is("trackCurve") ; } // [[Rcpp::export]] NumericVector S4_get_slot_x(S4 o){ NumericVector res( o.slot("x") ); return res ; } // [[Rcpp::export]] CharacterVector S4_get_attr_x(IntegerVector o){ CharacterVector res( o.attr("foo") ) ; return res ; } // [[Rcpp::export]] S4 S4_dotdata(S4 foo){ foo.slot( ".Data" ) = "foooo" ; return foo ; } // [[Rcpp::export]] std::vector S4_proxycoerce(S4 x_) { NumericVector x(x_.slot("data")); std::vector xx( x.size() ); for (int i=0; i < x.size(); ++i) { xx[i] = x[i]; } return xx; } rcpp-0.11.0/inst/unitTests/testRcppModule/0000755000000000000000000000000012253723677015372 5ustar rcpp-0.11.0/inst/unitTests/testRcppModule/R/0000755000000000000000000000000012253723677015573 5ustar rcpp-0.11.0/inst/unitTests/testRcppModule/R/zzz.R0000644000000000000000000000053012253723677016551 0ustar NAMESPACE <- environment() .onLoad <- function(libname, pkgname){ loadRcppModules() } ## For R 2.15.1 and later this also works. Note that calling loadModule() triggers ## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad(). #loadModule("NumEx", TRUE) #loadModule("yada", TRUE) #loadModule("stdVector", TRUE) rcpp-0.11.0/inst/unitTests/testRcppModule/R/rcpp_hello_world.R0000644000000000000000000000013512253723677021253 0ustar rcpp_hello_world <- function(){ .Call( "rcpp_hello_world", PACKAGE = "testRcppModule" ) } rcpp-0.11.0/inst/unitTests/testRcppModule/man/0000755000000000000000000000000012253723677016145 5ustar rcpp-0.11.0/inst/unitTests/testRcppModule/man/testRcppModule-package.Rd0000644000000000000000000000062612253723677023003 0ustar \name{testRcppModule-package} \alias{testRcppModule-package} \alias{testRcppModule} \docType{package} \title{ Dummy package part of Rcpp unit testing } \description{ Dummy package part of Rcpp unit testing } \details{ \tabular{ll}{ Package: \tab testRcppModule\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2010-09-06\cr License: \tab GPL (>=2)\cr LazyLoad: \tab yes\cr } } \keyword{ package } rcpp-0.11.0/inst/unitTests/testRcppModule/man/rcpp_hello_world.Rd0000644000000000000000000000033512253723677021773 0ustar \name{rcpp_hello_world} \alias{rcpp_hello_world} \docType{package} \title{ Simple function using Rcpp } \description{ Simple function using Rcpp } \usage{ rcpp_hello_world() } \examples{ \dontrun{ rcpp_hello_world() } } rcpp-0.11.0/inst/unitTests/testRcppModule/NAMESPACE0000644000000000000000000000010712253723677016607 0ustar useDynLib(testRcppModule) exportPattern("^[[:alpha:]]+") import(Rcpp) rcpp-0.11.0/inst/unitTests/testRcppModule/src/0000755000000000000000000000000012253723677016161 5ustar rcpp-0.11.0/inst/unitTests/testRcppModule/src/stdVector.cpp0000644000000000000000000000602412253723677020644 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // stdVector.cpp: Rcpp R/C++ interface class library -- Rcpp Module class example // // Copyright (C) 2010 - 2012 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 . #include // need to include the main Rcpp header file only // convenience typedef typedef std::vector vec; // helpers void vec_assign( vec* obj, Rcpp::NumericVector data) { obj->assign( data.begin(), data.end() ) ; } void vec_insert( vec* obj, int position, Rcpp::NumericVector data) { vec::iterator it = obj->begin() + position; obj->insert( it, data.begin(), data.end() ); } Rcpp::NumericVector vec_asR( vec* obj) { return Rcpp::wrap( *obj ); } void vec_set( vec* obj, int i, double value) { obj->at( i ) = value; } void vec_resize( vec* obj, int n) { obj->resize( n ); } void vec_push_back( vec* obj, double x ) { obj->push_back( x ); } // Wrappers for member functions that return a reference // Required on Solaris double vec_back(vec *obj){ return obj->back() ; } double vec_front(vec *obj){ return obj->front() ; } double vec_at(vec *obj, int i){ return obj->at(i) ; } RCPP_MODULE(stdVector){ using namespace Rcpp ; // we expose the class std::vector as "vec" on the R side class_("vec") // exposing the default constructor .constructor() // exposing member functions -- taken directly from std::vector .method( "size", &vec::size) .method( "max_size", &vec::max_size) .method( "capacity", &vec::capacity) .method( "empty", &vec::empty) .method( "reserve", &vec::reserve) .method( "pop_back", &vec::pop_back ) .method( "clear", &vec::clear ) // specifically exposing const member functions defined above .method( "back", &vec_back ) .method( "front", &vec_front ) .method( "at", &vec_at ) // exposing free functions taking a std::vector* // as their first argument .method( "assign", &vec_assign ) .method( "insert", &vec_insert ) .method( "as.vector",&vec_asR ) .method( "push_back",&vec_push_back ) .method( "resize", &vec_resize) // special methods for indexing .method( "[[", &vec_at ) .method( "[[<-", &vec_set ) ; } rcpp-0.11.0/inst/unitTests/testRcppModule/src/rcpp_hello_world.cpp0000644000000000000000000000043412253723677022224 0ustar #include "rcpp_hello_world.h" 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-0.11.0/inst/unitTests/testRcppModule/src/rcpp_module.cpp0000644000000000000000000000415512253723677021203 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // rcpp_module.cpp: Rcpp R/C++ interface class library -- Rcpp Module examples // // Copyright (C) 2010 - 2012 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 . #include // need to include the main Rcpp header file only int bar(int x) { // simple free function returning an int return x*2; } double foo(int x, double y) { // simple free function returning a double return x * y; } void bla( ) { // no input or return but output side effect Rprintf( "hello\n" ); } void bla1(int x) { // output reflecting a single input Rprintf( "hello (x = %d)\n", x); } void bla2(int x, double y) { // output reflecting two inputs Rprintf( "hello (x = %d, y = %5.2f)\n", x, y); } class World { // a simple class with a setter and getter public: World() : msg("hello"){} void set(std::string msg) { this->msg = msg; } std::string greet() { return msg; } private: std::string msg; }; RCPP_MODULE(yada){ using namespace Rcpp; function( "bar" , &bar ); function( "foo" , &foo ); function( "bla" , &bla ); function( "bla1" , &bla1 ); function( "bla2" , &bla2 ); class_( "World" ) .default_constructor() .method( "greet", &World::greet ) .method( "set", &World::set ) ; } rcpp-0.11.0/inst/unitTests/testRcppModule/src/rcpp_hello_world.h0000644000000000000000000000022712253723677021671 0ustar #ifndef _testRcppModule_RCPP_HELLO_WORLD_H #define _testRcppModule_RCPP_HELLO_WORLD_H #include RcppExport SEXP rcpp_hello_world() ; #endif rcpp-0.11.0/inst/unitTests/testRcppModule/src/Num.cpp0000644000000000000000000000273312253723677017431 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // Num.cpp: Rcpp R/C++ interface class library -- Rcpp Module example // // Copyright (C) 2010 - 2012 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 . #include class Num { // simple class with two private variables public: // which have a getter/setter and getter Num() : x(0.0), y(0){} ; double getX() { return x ; } void setX(double value){ x = value ; } int getY() { return y ; } private: double x ; int y ; }; RCPP_MODULE(NumEx){ using namespace Rcpp ; class_( "Num" ) .default_constructor() // read and write property .property( "x", &Num::getX, &Num::setX ) // read-only property .property( "y", &Num::getY ) ; } rcpp-0.11.0/inst/unitTests/testRcppModule/DESCRIPTION0000644000000000000000000000065512253723677017106 0ustar Package: testRcppModule Type: Package Title: Some test examples using Rcpp with the Module feature Version: 0.1 Date: 2010-09-06 Author: JMC Maintainer: Description: Some examples taken (and perhaps modified) from the Rcpp Modules documentation. License: GPL(>=2) LazyLoad: yes Depends: methods, Rcpp (>= 0.8.5) LinkingTo: Rcpp RcppModules: yada, stdVector, NumEx Packaged: 2010-09-09 18:42:28 UTC; jmc rcpp-0.11.0/inst/unitTests/testRcppModule/tests/0000755000000000000000000000000012253723677016534 5ustar rcpp-0.11.0/inst/unitTests/testRcppModule/tests/modules.R0000644000000000000000000000060012253723677020323 0ustar library(testRcppModule) v <- new(vec) data <- 1:10 v$assign(data) v[[3]] <- v[[3]] + 1 data[[4]] <- data[[4]] +1 stopifnot(identical(all.equal(v$as.vector(), data), TRUE)) ## a few function calls stopifnot(all.equal(bar(2), 4)) stopifnot(all.equal(foo(2,3), 6)) ## properties (at one stage this seqfaulted, so beware) nn <- new(Num) nn$x <- pi stopifnot(all.equal(nn$x, pi)) rcpp-0.11.0/inst/unitTests/runit.wrap.R0000644000000000000000000001572212273214237014650 0ustar #!/usr/bin/r -t # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("wrap.cpp") test.wrap.map.string.int <- function(){ checkEquals(map_string_int(), c( a = 200L, b = 100L, c = 300L), msg = "wrap( map) " ) } test.wrap.map.string.double <- function(){ checkEquals(map_string_double(), c( a = 200, b = 100, c = 300), msg = "wrap( map) " ) } test.wrap.map.string.bool <- function(){ checkEquals(map_string_bool(), c( a = FALSE, b = TRUE, c = TRUE ), msg = "wrap( map) " ) } test.wrap.map.string.Rbyte <- function(){ checkEquals(map_string_Rbyte(), c( a = as.raw(1), b = as.raw(0), c = as.raw(2) ), msg = "wrap( map) " ) } test.wrap.map.string.string <- function(){ checkEquals(map_string_string(), c( a = "bar", b = "foo", c = "bling" ), msg = "wrap( map) " ) } test.wrap.map.string.generic <- function(){ checkEquals(map_string_generic(), list( a = c(1L, 2L, 2L), b = c(1L, 2L), c = c(1L,2L,2L,2L) ) , msg = "wrap( map>) " ) } test.wrap.multimap.string.int <- function(){ checkEquals(multimap_string_int(), c( a = 200L, b = 100L, c = 300L), msg = "wrap( multimap) ") } test.wrap.multimap.string.double <- function(){ checkEquals(multimap_string_double(), c( a = 200, b = 100, c = 300), msg = "wrap( multimap) " ) } test.wrap.multimap.string.bool <- function(){ checkEquals(multimap_string_bool(), c( a = FALSE, b = TRUE, c = TRUE ), msg = "wrap( multimap)") } test.wrap.multimap.string.Rbyte <- function(){ checkEquals(multimap_string_Rbyte(), c( a = as.raw(1), b = as.raw(0), c = as.raw(2) ), msg = "wrap( multimap) " ) } test.wrap.multimap.string.string <- function(){ checkEquals(multimap_string_string(), c( a = "bar", b = "foo", c = "bling" ), msg = "wrap( multimap) " ) } test.wrap.multimap.string.generic <- function(){ checkEquals(multimap_string_generic(), list( a = c(1L, 2L, 2L), b = c(1L, 2L), c = c(1L,2L,2L,2L) ) , msg = "wrap( multimap>) " ) } test.nonnull.const.char <- function() { checkEquals(nonnull_const_char(), "foo", msg = "null const char*") } test.wrap.unordered.map.string.int <- function(){ res <- unordered_map_string_int() checkEquals( res[["a"]], 200L, msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["b"]], 100L, msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["c"]], 300L, msg = "wrap( tr1::unordered_map) " ) } test.wrap.unordered.map.string.double <- function(){ res <- unordered_map_string_double() checkEquals( res[["a"]], 200, msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["b"]], 100, msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["c"]], 300, msg = "wrap( tr1::unordered_map) " ) } test.wrap.unordered.map.string.bool <- function(){ res <- unordered_map_string_bool() checkEquals( res[["a"]], FALSE, msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["b"]], TRUE , msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["c"]], TRUE , msg = "wrap( tr1::unordered_map) " ) } test.wrap.unordered.map.string.Rbyte <- function(){ res <- unordered_map_string_Rbyte() checkEquals( res[["a"]], as.raw(1), msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["b"]], as.raw(0), msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["c"]], as.raw(2), msg = "wrap( tr1::unordered_map) " ) } test.wrap.unordered.map.string.string <- function(){ res <- unordered_map_string_string() checkEquals( res[["a"]], "bar" , msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["b"]], "foo" , msg = "wrap( tr1::unordered_map) " ) checkEquals( res[["c"]], "bling" , msg = "wrap( tr1::unordered_map) " ) } test.wrap.unordered.map.string.generic <- function(){ res <- unordered_map_string_generic() checkEquals( res[["a"]], c(1L,2L,2L) , msg = "wrap( tr1::unordered_map>) " ) checkEquals( res[["b"]], c(1L,2L) , msg = "wrap( tr1::unordered_map>) " ) checkEquals( res[["c"]], c(1L,2L,2L,2L) , msg = "wrap( tr1::unordered_map>) " ) } test.wrap.map.int.double <- function(){ checkEquals( map_int_double(), c("-1" = 3, "0" = 2 ), msg = "std::map" ) } test.wrap.map.double.double <- function(){ checkEquals( map_double_double(), c("0" = 2, "1.2" = 3 ), msg = "std::map" ) } test.wrap.map.int.vector_double <- function(){ checkEquals( map_int_vector_double(), list("0" = c(1,2), "1" = c(2,3) ), msg = "std::map >" ) } test.wrap.map.int.Foo <- function(){ checkEquals( sapply( map_int_Foo(), function(.) .$get() ), c("0" = 2, "1" = 3 ), msg = "std::map" ) } test.wrap.vector.Foo <- function(){ checkEquals( sapply( vector_Foo(), function(.) .$get() ), c(2, 3), msg = "std::vector< MODULE EXPOSED CLASS >" ) } } rcpp-0.11.0/inst/unitTests/runit.Module.R0000644000000000000000000000572312273213674015130 0ustar #!/usr/bin/r -t # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if( .runThisTest && Rcpp:::capabilities()[["Rcpp modules"]] ) { .tearDown <- function(){ gc() } .setUp <- Rcpp:::unitTestSetup("Module.cpp") test.Module <- function(){ checkEquals( bar( 2L ), 4L ) checkEquals( foo( 2L, 10.0 ), 20.0 ) checkEquals( hello(), "hello" ) w <- new( World ) checkEquals( w$greet(), "hello" ) w$set( "hello world" ) checkEquals( w$greet(), "hello world" ) w$set_ref( "hello world ref" ) checkEquals( w$greet(), "hello world ref" ) w$set_const_ref( "hello world const ref" ) checkEquals( w$greet(), "hello world const ref" ) w$clear( ) checkEquals( w$greet(), "" ) } test.Module.exposed.class <- function(){ test <- new( Test, 3.0 ) checkEquals( Test_get_x_const_ref(test), 3.0 ) checkEquals( Test_get_x_const_pointer(test), 3.0 ) checkEquals( Test_get_x_ref(test), 3.0 ) checkEquals( Test_get_x_pointer(test), 3.0 ) checkEquals( attr_Test_get_x_const_ref(test), 3.0 ) checkEquals( attr_Test_get_x_const_pointer(test), 3.0 ) checkEquals( attr_Test_get_x_ref(test), 3.0 ) checkEquals( attr_Test_get_x_pointer(test), 3.0 ) } test.Module.property <- function(){ w <- new( Num ) checkEquals( w$x, 0.0 ) checkEquals( w$y, 0L ) w$x <- 2.0 checkEquals( w$x, 2.0 ) checkException( { w$y <- 3 } ) } test.Module.member <- function(){ w <- new( Number ) checkEquals( w$x, 0.0 ) checkEquals( w$y, 0L ) w$x <- 2.0 checkEquals( w$x, 2.0 ) checkException( { w$y <- 3 } ) } test.Module.Constructor <- function() { r <- new( Randomizer, 10.0, 20.0 ) set.seed(123) x10 <- runif(10, 10.0, 20.0) set.seed(123) checkEquals(r$get(10), x10) } test.Module.flexible.semantics <- function( ){ checkEquals( test_reference( seq(0,10) ), 11L ) checkEquals( test_const_reference( seq(0,10) ), 11L ) checkEquals( test_const( seq(0,10) ), 11L ) } } rcpp-0.11.0/inst/unitTests/testRcppClass/0000755000000000000000000000000012253723677015212 5ustar rcpp-0.11.0/inst/unitTests/testRcppClass/R/0000755000000000000000000000000012253723677015413 5ustar rcpp-0.11.0/inst/unitTests/testRcppClass/R/rcpp_hello_world.R0000644000000000000000000000013512253723677021073 0ustar rcpp_hello_world <- function(){ .Call( "rcpp_hello_world", PACKAGE = "testLoadModule" ) } rcpp-0.11.0/inst/unitTests/testRcppClass/R/load.R0000644000000000000000000000266112253723677016462 0ustar setRcppClass("World", module = "yada", fields = list(more = "character"), methods = list(test = function(what) message("Testing: ", what, "; ", more)), saveAs = "genWorld" ) setRcppClass("stdNumeric", "vec", "stdVector") ## some methods that use C++ methods evalqOnLoad({ ##library(methods) stdNumeric$methods( getEl = function(i) { i <- as.integer(i) if(i < 1 || i > size()) NA_real_ else at(i-1L) }, setEl = function(i, value) { value <- as.numeric(value) if(length(value) != 1) stop("Only assigns single values") i <- as.integer(i) if(i < 1 || i > size()) stop("index out of bounds") else set(i-1L, value) }, initialize = function(data = numeric()) { callSuper() data <- as.double(data) n <- as.integer(max(50, length(data) * 2)) reserve(n) assign(data) } ) }) ## loadModule("NumEx") ## loading the module should have defined the C++ class ## setRcppClass("NumEx", "Num") ## For R 2.15.1 and later this also works. Note that calling loadModule() triggers ## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad(). #loadModule("NumEx", TRUE) #loadModule("yada", TRUE) #loadModule("stdVector", TRUE) rcpp-0.11.0/inst/unitTests/testRcppClass/R/yada.R0000644000000000000000000000010012253723677016443 0ustar loadModule("yada", c("bar", baz = "bla", baz1 = "bla1", "foo")) rcpp-0.11.0/inst/unitTests/testRcppClass/man/0000755000000000000000000000000012253723677015765 5ustar rcpp-0.11.0/inst/unitTests/testRcppClass/man/testRcppClass-package.Rd0000644000000000000000000000062212253723677022437 0ustar \name{testRcppClass-package} \alias{testRcppClass-package} \alias{testRcppClass} \docType{package} \title{ Dummy package part of Rcpp unit testing } \description{ Dummy package part of Rcpp unit testing } \details{ \tabular{ll}{ Package: \tab testRcppClass\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2010-09-06\cr License: \tab GPL (>=2)\cr LazyLoad: \tab yes\cr } } \keyword{ package } rcpp-0.11.0/inst/unitTests/testRcppClass/man/rcpp_hello_world.Rd0000644000000000000000000000033512253723677021613 0ustar \name{rcpp_hello_world} \alias{rcpp_hello_world} \docType{package} \title{ Simple function using Rcpp } \description{ Simple function using Rcpp } \usage{ rcpp_hello_world() } \examples{ \dontrun{ rcpp_hello_world() } } rcpp-0.11.0/inst/unitTests/testRcppClass/NAMESPACE0000644000000000000000000000040412253723677016427 0ustar useDynLib(testRcppClass) ## until 2.15.1 the namespace load fails to find patterns at load time ## exportPattern("^[[:alpha:]]+") import(Rcpp) export(genWorld, stdNumeric, rcpp_hello_world, bar, foo, baz, baz1) exportClass(World, stdNumeric)#, NumEx) rcpp-0.11.0/inst/unitTests/testRcppClass/src/0000755000000000000000000000000012253723677016001 5ustar rcpp-0.11.0/inst/unitTests/testRcppClass/src/stdVector.cpp0000644000000000000000000000366312253723677020472 0ustar #include "rcpp_hello_world.h" // convenience typedef typedef std::vector vec ; // helpers void vec_assign( vec* obj, Rcpp::NumericVector data ){ obj->assign( data.begin(), data.end() ) ; } void vec_insert( vec* obj, int position, Rcpp::NumericVector data){ vec::iterator it = obj->begin() + position ; obj->insert( it, data.begin(), data.end() ) ; } Rcpp::NumericVector vec_asR( vec* obj ){ return Rcpp::wrap( *obj ) ; } void vec_set( vec* obj, int i, double value ){ obj->at( i ) = value ; } void vec_resize( vec* obj, int n){ obj->resize( n ) ; } void vec_push_back( vec* obj, double x ){ obj->push_back( x ); } // Wrappers for member functions that return a reference // Required on Solaris double vec_back(vec *obj){ return obj->back() ; } double vec_front(vec *obj){ return obj->front() ; } double vec_at(vec *obj, int i){ return obj->at(i) ; } RCPP_MODULE(stdVector){ using namespace Rcpp ; // we expose the class std::vector as "vec" on the R side class_( "vec") // exposing the default constructor .constructor() // exposing member functions .method( "size", &vec::size) .method( "max_size", &vec::max_size) .method( "capacity", &vec::capacity) .method( "empty", &vec::empty) .method( "reserve", &vec::reserve) .method( "pop_back", &vec::pop_back ) .method( "clear", &vec::clear ) // specifically exposing const member functions .method( "back", &vec_back ) .method( "front", &vec_front ) .method( "at", &vec_at ) .method( "set", &vec_set ) // exposing free functions taking a std::vector* // as their first argument .method( "assign", &vec_assign ) .method( "insert", &vec_insert ) .method( "as.vector", &vec_asR ) .method( "push_back", &vec_push_back ) .method( "resize", &vec_resize) // special methods for indexing // .method( "[[", &vec_at ) // .method( "[[<-", &vec_set ) ; } rcpp-0.11.0/inst/unitTests/testRcppClass/src/rcpp_hello_world.cpp0000644000000000000000000000043412253723677022044 0ustar #include "rcpp_hello_world.h" 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-0.11.0/inst/unitTests/testRcppClass/src/rcpp_module.cpp0000644000000000000000000000174012253723677021020 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- #include int bar( int x){ return x*2 ; } double foo( int x, double y){ return x * y ; } void bla( ){ Rprintf( "hello\\n" ) ; } void bla1( int x){ Rprintf( "hello (x = %d)\\n", x ) ; } void bla2( int x, double y){ Rprintf( "hello (x = %d, y = %5.2f)\\n", x, y ) ; } class World { public: World() : msg("hello"){} void set(std::string msg) { this->msg = msg; } std::string greet() { return msg; } private: std::string msg; }; RCPP_MODULE(yada){ using namespace Rcpp ; function( "bar" , &bar ) ; function( "foo" , &foo ) ; function( "bla" , &bla ) ; function( "bla1" , &bla1 ) ; function( "bla2" , &bla2 ) ; class_( "World" ) .default_constructor() .method( "greet", &World::greet ) .method( "set", &World::set ) ; } rcpp-0.11.0/inst/unitTests/testRcppClass/src/rcpp_hello_world.h0000644000000000000000000000022712253723677021511 0ustar #ifndef _testRcppModule_RCPP_HELLO_WORLD_H #define _testRcppModule_RCPP_HELLO_WORLD_H #include RcppExport SEXP rcpp_hello_world() ; #endif rcpp-0.11.0/inst/unitTests/testRcppClass/src/Num.cpp0000644000000000000000000000110012253723677017234 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- #include "rcpp_hello_world.h" class Num{ public: Num() : x(0.0), y(0){} ; double getX() { return x ; } void setX(double value){ x = value ; } int getY() { return y ; } private: double x ; int y ; }; RCPP_MODULE(NumEx){ using namespace Rcpp ; class_( "Num" ) .default_constructor() // read and write property .property( "x", &Num::getX, &Num::setX ) // read-only property .property( "y", &Num::getY ) ; } rcpp-0.11.0/inst/unitTests/testRcppClass/DESCRIPTION0000644000000000000000000000076512253723677016730 0ustar Package: testRcppClass Type: Package Title: Some examples using Rcpp classes and loadModule() Version: 0.1 Date: 2012-04-06 Author: JMC Maintainer: Description: Some examples from the Rcpp Modules documentation, with load-time creation of classes that extend C++ classes and with explicit loading of some objects. License: GPL(>=2) LazyLoad: yes Depends: R (>= 2.15.0), Rcpp, methods Imports: Rcpp (>= 0.8.5), methods LinkingTo: Rcpp Packaged: 2012-04-14 18:42:28 UTC; jmc rcpp-0.11.0/inst/unitTests/testRcppClass/tests/0000755000000000000000000000000012253723677016354 5ustar rcpp-0.11.0/inst/unitTests/testRcppClass/tests/classes.R0000644000000000000000000000071612253723677020140 0ustar library(testRcppClass) v <- stdNumeric$new() data <- 1:10 v$assign(data) v$set(3L, v$at(3L) + 1) data[[4]] <- data[[4]] +1 stopifnot(identical(all.equal(v$as.vector(), data), TRUE)) ## a few function calls stopifnot(all.equal(bar(2), 4)) stopifnot(all.equal(foo(2,3), 6)) ## Uncomment this when a C++Class can be found w/o extracting from module ## as in commented code in R/load.R ## nn <- new("NumEx") ## nn$x <- pi ## stopifnot(all.equal(nn$x, pi)) rcpp-0.11.0/inst/unitTests/runit.as.R0000644000000000000000000001077412273213202014273 0ustar #!/usr/bin/r -t # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("as.cpp") test.as.int <- function(){ checkEquals( as_int(10), 10L, msg = "as( REALSXP ) " ) checkEquals( as_int(10L), 10L, msg = "as( INTSXP ) " ) checkEquals( as_int(as.raw(10L)), 10L, msg = "as( RAWSXP ) " ) checkEquals( as_int(TRUE), 1L, msg = "as( LGLSXP ) " ) } test.as.double <- function(){ checkEquals( as_double(10), 10.0, msg = "as( REALSXP ) " ) checkEquals( as_double(10L), 10.0, msg = "as( INTSXP ) " ) checkEquals( as_double(as.raw(10L)), 10.0, msg = "as( RAWSXP ) " ) checkEquals( as_double(TRUE), 1.0, msg = "as( LGLSXP ) " ) } test.as.raw <- function(){ checkEquals( as_raw(10), as.raw(10), msg = "as( REALSXP ) " ) checkEquals( as_raw(10L), as.raw(10), msg = "as( INTSXP ) " ) checkEquals( as_raw(as.raw(10L)), as.raw(10), msg = "as( RAWSXP ) " ) checkEquals( as_raw(TRUE), as.raw(1), msg = "as( LGLSXP ) " ) } test.as.bool <- function(){ checkEquals( as_bool(10), as.logical(10), msg = "as( REALSXP ) " ) checkEquals( as_bool(10L), as.logical(10), msg = "as( INTSXP ) " ) checkEquals( as_bool(as.raw(10L)), as.logical(10), msg = "as( RAWSXP ) " ) checkEquals( as_bool(TRUE), as.logical(1), msg = "as( LGLSXP ) " ) } test.as.string <- function(){ checkEquals( as_string("foo"), "foo", msg = "as( STRSXP ) " ) } test.as.vector.int <- function(){ checkEquals( as_vector_int(1:10), 1:10 , msg = "as>( INTSXP ) " ) checkEquals( as_vector_int(as.numeric(1:10)), 1:10 , msg = "as>( REALSXP ) " ) checkEquals( as_vector_int(as.raw(1:10)), 1:10 , msg = "as>( RAWSXP ) " ) checkEquals( as_vector_int(c(TRUE,FALSE)), 1:0 , msg = "as>( LGLSXP ) " ) } test.as.vector.double <- function(){ checkEquals( as_vector_double(1:10), as.numeric(1:10) , msg = "as>( INTSXP ) " ) checkEquals( as_vector_double(as.numeric(1:10)), as.numeric(1:10) , msg = "as>( REALSXP ) " ) checkEquals( as_vector_double(as.raw(1:10)), as.numeric(1:10), msg = "as>( RAWSXP ) " ) checkEquals( as_vector_double(c(TRUE,FALSE)), c(1.0, 0.0) , msg = "as>( LGLSXP ) " ) } test.as.vector.raw <- function(){ checkEquals( as_vector_raw(1:10), as.raw(1:10) , msg = "as>( INTSXP ) " ) checkEquals( as_vector_raw(as.numeric(1:10)), as.raw(1:10) , msg = "as>( REALSXP ) " ) checkEquals( as_vector_raw(as.raw(1:10)), as.raw(1:10) , msg = "as>( RAWSXP ) " ) checkEquals( as_vector_raw(c(TRUE,FALSE)), as.raw(1:0) , msg = "as>( LGLSXP ) " ) } test.as.vector.bool <- function(){ checkEquals( as_vector_bool(0:10), as.logical(0:10) , msg = "as>( INTSXP ) " ) checkEquals( as_vector_bool(as.numeric(0:10)), as.logical(0:10) , msg = "as>( REALSXP ) " ) checkEquals( as_vector_bool(as.raw(0:10)), as.logical(0:10) , msg = "as>( RAWSXP ) " ) checkEquals( as_vector_bool(c(TRUE,FALSE)), as.logical(1:0) , msg = "as>( LGLSXP ) " ) } test.as.vector.string <- function(){ checkEquals( as_vector_string(letters), letters , msg = "as>( STRSXP ) " ) } test.as.deque.int <- function(){ checkEquals( as_deque_int(1:10), 1:10 , msg = "as>( INTSXP ) " ) } test.as.list.int <- function(){ checkEquals( as_list_int(1:10), 1:10 , msg = "as>( INTSXP ) " ) } } rcpp-0.11.0/inst/unitTests/runit.environments.R0000644000000000000000000002661712273213361016430 0ustar #!/usr/bin/r -t # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2009 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("Environment.cpp") test.environment.ls <- function(){ e <- new.env( ) e$a <- 1:10 e$b <- "foo" e$.c <- "hidden" checkEquals( sort(runit_ls(e)), sort(c("a","b", ".c")), msg = "Environment::ls(true)" ) checkEquals( runit_ls(asNamespace("Rcpp")), ls(envir=asNamespace("Rcpp"), all = TRUE), msg = "Environment(namespace)::ls()" ) checkEquals( runit_ls2(e), c("a","b"), msg = "Environment::ls(false)" ) checkEquals( runit_ls2(asNamespace("Rcpp")), ls(envir=asNamespace("Rcpp"), all = FALSE), msg = "Environment(namespace)::ls()" ) } test.environment.get <- function(){ e <- new.env( ) e$a <- 1:10 e$b <- "foo" checkEquals( runit_get( e, "a" ), e$a, msg = "Environment::get()" ) checkEquals( runit_get( e, "foobar" ), NULL, msg = "Environment::get()" ) checkEquals( runit_get( asNamespace("Rcpp"), "CxxFlags"), Rcpp:::CxxFlags, msg = "Environment(namespace)::get() " ) } test.environment.exists <- function(){ e <- new.env( ) e$a <- 1:10 e$b <- "foo" checkTrue( runit_exists( e, "a" ), msg = "Environment::get()" ) checkTrue( !runit_exists( e, "foobar" ), msg = "Environment::get()" ) checkTrue( runit_exists( asNamespace("Rcpp"), "CxxFlags"), msg = "Environment(namespace)::get() " ) } test.environment.assign <- function(){ e <- new.env( ) checkTrue( runit_assign(e, "a", 1:10 ), msg = "Environment::assign" ) checkTrue( runit_assign(e, "b", Rcpp:::CxxFlags ), msg = "Environment::assign" ) checkEquals( ls(e), c("a", "b"), msg = "Environment::assign, checking names" ) checkEquals( e$a, 1:10, msg = "Environment::assign, checking value 1" ) checkEquals( e$b, Rcpp:::CxxFlags, msg = "Environment::assign, checking value 2" ) lockBinding( "a", e ) can.demangle <- Rcpp:::capabilities()[["demangling"]] if( can.demangle ){ checkTrue( tryCatch( { runit_assign(e, "a", letters ) ; FALSE}, "Rcpp::binding_is_locked" = function(e) TRUE ), msg = "cannot assign to locked binding (catch exception)" ) } else { checkTrue( tryCatch( { runit_assign(e, "a", letters ) ; FALSE}, "error" = function(e) TRUE ), msg = "cannot assign to locked binding (catch exception)" ) } } test.environment.isLocked <- function(){ e <- new.env() runit_islocked(e) checkEquals( e[["x1"]], 1L , msg = "Environment::assign( int ) " ) checkEquals( e[["x2"]], 10.0, msg = "Environment::assign( double ) " ) checkEquals( e[["x3"]], "foobar", msg = "Environment::assign( char* ) " ) checkEquals( e[["x4"]], "foobar", msg = "Environment::assign( std::string ) " ) checkEquals( e[["x5"]], c("foo", "bar" ), msg = "Environment::assign( vector ) " ) } test.environment.bindingIsActive <- function(){ e <- new.env() e$a <- 1:10 makeActiveBinding( "b", function(x) 10, e ) checkTrue( !runit_bindingIsActive(e, "a" ), msg = "Environment::bindingIsActive( non active ) -> false" ) checkTrue( runit_bindingIsActive(e, "b" ), msg = "Environment::bindingIsActive( active ) -> true" ) can.demangle <- Rcpp:::capabilities()[["demangling"]] if( can.demangle ){ checkTrue( tryCatch( { runit_bindingIsActive(e, "xx" ) ; FALSE}, "Rcpp::no_such_binding" = function(e) TRUE ), msg = "Environment::bindingIsActive(no binding) -> exception)" ) } else { checkTrue( tryCatch( { runit_bindingIsActive(e, "xx" ) ; FALSE}, error = function(e) TRUE ), msg = "Environment::bindingIsActive(no binding) -> exception)" ) } } test.environment.bindingIsLocked <- function(){ e <- new.env() e$a <- 1:10 e$b <- letters lockBinding( "b", e ) checkTrue( !runit_bindingIsLocked(e, "a" ), msg = "Environment::bindingIsActive( non active ) -> false" ) checkTrue( runit_bindingIsLocked(e, "b" ), msg = "Environment::bindingIsActive( active ) -> true" ) can.demangle <- Rcpp:::capabilities()[["demangling"]] if( can.demangle ){ checkTrue( tryCatch( { runit_bindingIsLocked(e, "xx" ) ; FALSE}, "Rcpp::no_such_binding" = function(e) TRUE ), msg = "Environment::bindingIsLocked(no binding) -> exception)" ) } else { checkTrue( tryCatch( { runit_bindingIsLocked(e, "xx" ) ; FALSE}, error = function(e) TRUE ), msg = "Environment::bindingIsLocked(no binding) -> exception)" ) } } test.environment.NotAnEnvironment <- function(){ checkException( runit_notanenv( runit_notanenv ), msg = "not an environment" ) checkException( runit_notanenv( letters ), msg = "not an environment" ) checkException( runit_notanenv( NULL ), msg = "not an environment" ) } test.environment.lockBinding <- function(){ e <- new.env() e$a <- 1:10 e$b <- letters runit_lockbinding(e, "b") checkTrue( bindingIsLocked("b", e ), msg = "Environment::lockBinding()" ) can.demangle <- Rcpp:::capabilities()[["demangling"]] if( can.demangle ){ checkTrue( tryCatch( { runit_lockbinding(e, "xx" ) ; FALSE}, "Rcpp::no_such_binding" = function(e) TRUE ), msg = "Environment::lockBinding(no binding) -> exception)" ) } else { checkTrue( tryCatch( { runit_lockbinding(e, "xx" ) ; FALSE}, error = function(e) TRUE ), msg = "Environment::lockBinding(no binding) -> exception)" ) } } test.environment.unlockBinding <- function(){ e <- new.env() e$a <- 1:10 e$b <- letters lockBinding( "b", e ) runit_unlockbinding(e, "b") checkTrue( !bindingIsLocked("b", e ), msg = "Environment::lockBinding()" ) can.demangle <- Rcpp:::capabilities()[["demangling"]] if( can.demangle ){ checkTrue( tryCatch( { runit_unlockbinding(e, "xx" ) ; FALSE}, "Rcpp::no_such_binding" = function(e) TRUE ), msg = "Environment::unlockBinding(no binding) -> exception)" ) } else { checkTrue( tryCatch( { runit_unlockbinding(e, "xx" ) ; FALSE}, error = function(e) TRUE ), msg = "Environment::unlockBinding(no binding) -> exception)" ) } } test.environment.global.env <- function(){ checkEquals( runit_globenv(), globalenv(), msg = "Environment::global_env" ) } test.environment.empty.env <- function(){ checkEquals( runit_emptyenv(), emptyenv(), msg = "Environment::empty_env" ) } test.environment.base.env <- function(){ checkEquals( runit_baseenv(), baseenv(), msg = "Environment::base_env" ) } test.environment.empty.env <- function(){ checkEquals( runit_emptyenv(), .BaseNamespaceEnv, msg = "Environment::base_namespace" ) } test.environment.namespace.env <- function(){ checkEquals( runit_namespace("Rcpp"), asNamespace("Rcpp"), msg = "Environment::base_namespace" ) can.demangle <- Rcpp:::capabilities()[["demangling"]] if( can.demangle ){ checkTrue( tryCatch( { runit_namespace("----" ) ; FALSE}, "Rcpp::no_such_namespace" = function(e) TRUE ), msg = "Environment::namespace_env(no namespace) -> exception)" ) } else { checkTrue( tryCatch( { runit_namespace("----" ) ; FALSE}, error = function(e) TRUE ), msg = "Environment::namespace_env(no namespace) -> exception)" ) } } test.environment.constructor.SEXP <- function(){ checkEquals( runit_env_SEXP( globalenv() ), globalenv(), msg = "Environment( environment ) - 1" ) checkEquals( runit_env_SEXP( baseenv() ), baseenv(), msg = "Environment( environment ) - 2" ) checkEquals( runit_env_SEXP( asNamespace("Rcpp") ), asNamespace("Rcpp"), msg = "Environment( environment ) - 3" ) checkEquals( runit_env_SEXP( ".GlobalEnv" ), globalenv(), msg = "Environment( character ) - 1" ) checkEquals( runit_env_SEXP( "package:base" ), baseenv(), msg = "Environment( character ) - 2" ) checkEquals( runit_env_SEXP( "package:Rcpp" ), as.environment("package:Rcpp") , msg = 'Environment( "package:Rcpp") ' ) checkEquals( runit_env_SEXP(1L), globalenv(), msg = "Environment( SEXP{integer} )" ) } test.environment.constructor.stdstring <- function(){ checkEquals( runit_env_string( ".GlobalEnv" ), globalenv(), msg = "Environment( std::string ) - 1" ) checkEquals( runit_env_string( "package:base" ), baseenv(), msg = "Environment( std::string ) - 2" ) checkEquals( runit_env_string( "package:Rcpp" ), as.environment("package:Rcpp") , msg = 'Environment( std::string ) - 3' ) } test.environment.constructor.int <- function(){ for( i in 1:length(search())){ checkEquals( runit_env_int(i), as.environment(i), msg = sprintf("Environment(int) - %d", i) ) } } test.environment.remove <- function(){ e <- new.env( ) e$a <- 1 e$b <- 2 checkTrue( runit_remove( e, "a" ), msg = "Environment::remove" ) checkEquals( ls(envir=e), "b", msg = "check that the element was removed" ) checkException( runit_remove(e, "xx"), msg = "Environment::remove no such binding" ) lockBinding( "b", e ) checkException( runit_remove(e, "b"), msg = "Environment::remove binding is locked" ) checkEquals( ls(envir=e), "b", msg = "check that the element was not removed" ) } test.environment.parent <- function(){ e <- new.env( parent = emptyenv() ) f <- new.env( parent = e ) checkEquals( runit_parent(f), e, msg = "Environment::parent" ) checkEquals( runit_parent(e), emptyenv() , msg = "Environment::parent" ) } test.environment.square <- function(){ env <- new.env( ) env[["x"]] <- 10L checkEquals( runit_square(env), list( 10L, 2L, "foo") ) } test.environment.Rcpp <- function(){ checkEquals( runit_Rcpp(), asNamespace("Rcpp") , msg = "cached Rcpp namespace" ) } test.environment.child <- function(){ checkEquals( parent.env(runit_child()), globalenv(), msg = "child environment" ) } } rcpp-0.11.0/inst/unitTests/runit.rmath.R0000644000000000000000000004642612273214007015012 0ustar #!/usr/bin/r -t # -*- mode: R; ess-indent-level: 4; tab-width: 4; indent-tabs-mode: nil; -* # # Copyright (C) 2012 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("rmath.cpp") test.rmath.norm <- function() { x <- 0.25 a <- 1.25 b <- 2.50 checkEquals(runit_dnorm(x, a, b), c(dnorm(x, a, b, log=FALSE), dnorm(x, a, b, log=TRUE)), msg = " rmath.dnorm") checkEquals(runit_pnorm(x, a, b), c(pnorm(x, a, b, lower=TRUE, log=FALSE), pnorm(log(x), a, b, lower=TRUE, log=TRUE), pnorm(x, a, b, lower=FALSE, log=FALSE), pnorm(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pnorm") checkEquals(runit_qnorm(x, a, b), c(qnorm(x, a, b, lower=TRUE, log=FALSE), qnorm(log(x), a, b, lower=TRUE, log=TRUE), qnorm(x, a, b, lower=FALSE, log=FALSE), qnorm(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qnorm") } test.rmath.unif <- function() { x <- 0.25 a <- 1.25 b <- 2.50 checkEquals(runit_dunif(x, a, b), c(dunif(x, a, b, log=FALSE), dunif(x, a, b, log=TRUE)), msg = " rmath.dunif") checkEquals(runit_punif(x, a, b), c(punif(x, a, b, lower=TRUE, log=FALSE), punif(log(x), a, b, lower=TRUE, log=TRUE), punif(x, a, b, lower=FALSE, log=FALSE), punif(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.punif") checkEquals(runit_qunif(x, a, b), c(qunif(x, a, b, lower=TRUE, log=FALSE), qunif(log(x), a, b, lower=TRUE, log=TRUE), qunif(x, a, b, lower=FALSE, log=FALSE), qunif(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qunif") } test.rmath.gamma <- function() { x <- 0.25 a <- 1.0 b <- 1.0 checkEquals(runit_dgamma(x, a, b), c(dgamma(x, a, b, log=FALSE), dgamma(x, a, b, log=TRUE)), msg = " rmath.dgamma") checkEquals(runit_pgamma(x, a, b), c(pgamma(x, a, b, lower=TRUE, log=FALSE), pgamma(log(x), a, b, lower=TRUE, log=TRUE), pgamma(x, a, b, lower=FALSE, log=FALSE), pgamma(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pgamma") checkEquals(runit_qgamma(x, a, b), c(qgamma(x, a, b, lower=TRUE, log=FALSE), qgamma(log(x), a, b, lower=TRUE, log=TRUE), qgamma(x, a, b, lower=FALSE, log=FALSE), qgamma(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qgamma") } test.rmath.beta <- function() { x <- 0.25 a <- 0.8 b <- 2.5 checkEquals(runit_dbeta(x, a, b), c(dbeta(x, a, b, log=FALSE), dbeta(x, a, b, log=TRUE)), msg = " rmath.dbeta") checkEquals(runit_pbeta(x, a, b), c(pbeta(x, a, b, lower=TRUE, log=FALSE), pbeta(log(x), a, b, lower=TRUE, log=TRUE), pbeta(x, a, b, lower=FALSE, log=FALSE), pbeta(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pbeta") checkEquals(runit_qbeta(x, a, b), c(qbeta(x, a, b, lower=TRUE, log=FALSE), qbeta(log(x), a, b, lower=TRUE, log=TRUE), qbeta(x, a, b, lower=FALSE, log=FALSE), qbeta(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qbeta") } test.rmath.lnorm <- function() { x <- 0.25 a <- 0.8 b <- 2.5 checkEquals(runit_dlnorm(x, a, b), c(dlnorm(x, a, b, log=FALSE), dlnorm(x, a, b, log=TRUE)), msg = " rmath.dlnorm") checkEquals(runit_plnorm(x, a, b), c(plnorm(x, a, b, lower=TRUE, log=FALSE), plnorm(log(x), a, b, lower=TRUE, log=TRUE), plnorm(x, a, b, lower=FALSE, log=FALSE), plnorm(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.plnorm") checkEquals(runit_qlnorm(x, a, b), c(qlnorm(x, a, b, lower=TRUE, log=FALSE), qlnorm(log(x), a, b, lower=TRUE, log=TRUE), qlnorm(x, a, b, lower=FALSE, log=FALSE), qlnorm(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qlnorm") } test.rmath.chisq <- function() { x <- 0.25 a <- 0.8 checkEquals(runit_dchisq(x, a), c(dchisq(x, a, log=FALSE), dchisq(x, a, log=TRUE)), msg = " rmath.dchisq") checkEquals(runit_pchisq(x, a), c(pchisq(x, a, lower=TRUE, log=FALSE), pchisq(log(x), a, lower=TRUE, log=TRUE), pchisq(x, a, lower=FALSE, log=FALSE), pchisq(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.pchisq") checkEquals(runit_qchisq(x, a), c(qchisq(x, a, lower=TRUE, log=FALSE), qchisq(log(x), a, lower=TRUE, log=TRUE), qchisq(x, a, lower=FALSE, log=FALSE), qchisq(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.qchisq") } test.rmath.nchisq <- function() { x <- 0.25 a <- 0.8 b <- 2.5 checkEquals(runit_dnchisq(x, a, b), c(dchisq(x, a, b, log=FALSE), dchisq(x, a, b, log=TRUE)), msg = " rmath.dnchisq") checkEquals(runit_pnchisq(x, a, b), c(pchisq(x, a, b, lower=TRUE, log=FALSE), pchisq(log(x), a, b, lower=TRUE, log=TRUE), pchisq(x, a, b, lower=FALSE, log=FALSE), pchisq(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pnchisq") checkEquals(runit_qnchisq(x, a, b), c(qchisq(x, a, b, lower=TRUE, log=FALSE), qchisq(log(x), a, b, lower=TRUE, log=TRUE), qchisq(x, a, b, lower=FALSE, log=FALSE), qchisq(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qnchisq") } test.rmath.f <- function() { x <- 0.25 a <- 0.8 b <- 2.5 checkEquals(runit_df(x, a, b), c(df(x, a, b, log=FALSE), df(x, a, b, log=TRUE)), msg = " rmath.df") checkEquals(runit_pf(x, a, b), c(pf(x, a, b, lower=TRUE, log=FALSE), pf(log(x), a, b, lower=TRUE, log=TRUE), pf(x, a, b, lower=FALSE, log=FALSE), pf(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pf") checkEquals(runit_qf(x, a, b), c(qf(x, a, b, lower=TRUE, log=FALSE), qf(log(x), a, b, lower=TRUE, log=TRUE), qf(x, a, b, lower=FALSE, log=FALSE), qf(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qf") } test.rmath.t <- function() { x <- 0.25 a <- 0.8 checkEquals(runit_dt(x, a), c(dt(x, a, log=FALSE), dt(x, a, log=TRUE)), msg = " rmath.dt") checkEquals(runit_pt(x, a), c(pt(x, a, lower=TRUE, log=FALSE), pt(log(x), a, lower=TRUE, log=TRUE), pt(x, a, lower=FALSE, log=FALSE), pt(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.pt") checkEquals(runit_qt(x, a), c(qt(x, a, lower=TRUE, log=FALSE), qt(log(x), a, lower=TRUE, log=TRUE), qt(x, a, lower=FALSE, log=FALSE), qt(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.qt") } test.rmath.binom <- function() { x <- 5 a <- 10 b <- 0.5 checkEquals(runit_dbinom(x, a, b), c(dbinom(x, a, b, log=FALSE), dbinom(x, a, b, log=TRUE)), msg = " rmath.dbinom") checkEquals(runit_pbinom(x, a, b), c(pbinom(x, a, b, lower=TRUE, log=FALSE), pbinom(log(x), a, b, lower=TRUE, log=TRUE), pbinom(x, a, b, lower=FALSE, log=FALSE), pbinom(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pbinom") x <- x/a checkEquals(runit_qbinom(x, a, b), c(qbinom(x, a, b, lower=TRUE, log=FALSE), qbinom(log(x), a, b, lower=TRUE, log=TRUE), qbinom(x, a, b, lower=FALSE, log=FALSE), qbinom(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qbinom") } test.rmath.cauchy <- function() { x <- 0.25 a <- 0.8 b <- 2.5 checkEquals(runit_dcauchy(x, a, b), c(dcauchy(x, a, b, log=FALSE), dcauchy(x, a, b, log=TRUE)), msg = " rmath.dcauchy") checkEquals(runit_pcauchy(x, a, b), c(pcauchy(x, a, b, lower=TRUE, log=FALSE), pcauchy(log(x), a, b, lower=TRUE, log=TRUE), pcauchy(x, a, b, lower=FALSE, log=FALSE), pcauchy(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pcauchy") checkEquals(runit_qcauchy(x, a, b), c(qcauchy(x, a, b, lower=TRUE, log=FALSE), qcauchy(log(x), a, b, lower=TRUE, log=TRUE), qcauchy(x, a, b, lower=FALSE, log=FALSE), qcauchy(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qcauchy") } test.rmath.exp <- function() { x <- 0.25 a <- 1.0 checkEquals(runit_dexp(x, a), c(dexp(x, a, log=FALSE), dexp(x, a, log=TRUE)), msg = " rmath.dexp") checkEquals(runit_pexp(x, a), c(pexp(x, a, lower=TRUE, log=FALSE), pexp(log(x), a, lower=TRUE, log=TRUE), pexp(x, a, lower=FALSE, log=FALSE), pexp(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.pexp") checkEquals(runit_qexp(x, a), c(qexp(x, a, lower=TRUE, log=FALSE), qexp(log(x), a, lower=TRUE, log=TRUE), qexp(x, a, lower=FALSE, log=FALSE), qexp(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.qexp") } test.rmath.geom <- function() { x <- 1 a <- 0.75 checkEquals(runit_dgeom(x, a), c(dgeom(x, a, log=FALSE), dgeom(x, a, log=TRUE)), msg = " rmath.dgeom") checkEquals(runit_pgeom(x, a), c(pgeom(x, a, lower=TRUE, log=FALSE), pgeom(log(x), a, lower=TRUE, log=TRUE), pgeom(x, a, lower=FALSE, log=FALSE), pgeom(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.pgeom") checkEquals(runit_qgeom(x, a), c(qgeom(x, a, lower=TRUE, log=FALSE), qgeom(log(x), a, lower=TRUE, log=TRUE), qgeom(x, a, lower=FALSE, log=FALSE), qgeom(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.qgeom") } test.rmath.hyper <- function() { x <- 5 a <- 10 b <- 7 c <- 8 checkEquals(runit_dhyper(x, a, b, c), c(dhyper(x, a, b, c, log=FALSE), dhyper(x, a, b, c, log=TRUE)), msg = " rmath.dhyper") checkEquals(runit_phyper(x, a, b, c), c(phyper(x, a, b, c, lower=TRUE, log=FALSE), phyper(log(x), a, b, c, lower=TRUE, log=TRUE), phyper(x, a, b, c, lower=FALSE, log=FALSE), phyper(log(x), a, b, c, lower=FALSE, log=TRUE)), msg = " rmath.phyper") x <- x/a checkEquals(runit_qhyper(x, a, b, c), c(qhyper(x, a, b, c, lower=TRUE, log=FALSE), qhyper(log(x), a, b, c, lower=TRUE, log=TRUE), qhyper(x, a, b, c, lower=FALSE, log=FALSE), qhyper(log(x), a, b, c, lower=FALSE, log=TRUE)), msg = " rmath.qhyper") } test.rmath.nbinom <- function() { x <- 2 a <- 8 b <- 0.25 checkEquals(runit_dnbinom(x, a, b), c(dnbinom(x, a, b, log=FALSE), dnbinom(x, a, b, log=TRUE)), msg = " rmath.dnbinom") checkEquals(runit_pnbinom(x, a, b), c(pnbinom(x, a, b, lower=TRUE, log=FALSE), pnbinom(log(x), a, b, lower=TRUE, log=TRUE), pnbinom(x, a, b, lower=FALSE, log=FALSE), pnbinom(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pnbinom") x <- x/a checkEquals(runit_qnbinom(x, a, b), c(qnbinom(x, a, b, lower=TRUE, log=FALSE), qnbinom(log(x), a, b, lower=TRUE, log=TRUE), qnbinom(x, a, b, lower=FALSE, log=FALSE), qnbinom(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qnbinom") } test.rmath.pois <- function() { x <- 2 a <- 1.0 checkEquals(runit_dpois(x, a), c(dpois(x, a, log=FALSE), dpois(x, a, log=TRUE)), msg = " rmath.dpois") checkEquals(runit_ppois(x, a), c(ppois(x, a, lower=TRUE, log=FALSE), ppois(log(x), a, lower=TRUE, log=TRUE), ppois(x, a, lower=FALSE, log=FALSE), ppois(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.ppois") x <- 1/x checkEquals(runit_qpois(x, a), c(qpois(x, a, lower=TRUE, log=FALSE), qpois(log(x), a, lower=TRUE, log=TRUE), qpois(x, a, lower=FALSE, log=FALSE), qpois(log(x), a, lower=FALSE, log=TRUE)), msg = " rmath.qpois") } test.rmath.weibull <- function() { x <- 2 a <- 8 b <- 0.25 checkEquals(runit_dweibull(x, a, b), c(dweibull(x, a, b, log=FALSE), dweibull(x, a, b, log=TRUE)), msg = " rmath.dweibull") checkEquals(runit_pweibull(x, a, b), c(pweibull(x, a, b, lower=TRUE, log=FALSE), pweibull(log(x), a, b, lower=TRUE, log=TRUE), pweibull(x, a, b, lower=FALSE, log=FALSE), pweibull(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pweibull") x <- x/a checkEquals(runit_qweibull(x, a, b), c(qweibull(x, a, b, lower=TRUE, log=FALSE), qweibull(log(x), a, b, lower=TRUE, log=TRUE), qweibull(x, a, b, lower=FALSE, log=FALSE), qweibull(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qweibull") } test.rmath.logis <- function() { x <- 2 a <- 8 b <- 0.25 checkEquals(runit_dlogis(x, a, b), c(dlogis(x, a, b, log=FALSE), dlogis(x, a, b, log=TRUE)), msg = " rmath.dlogis") checkEquals(runit_plogis(x, a, b), c(plogis(x, a, b, lower=TRUE, log=FALSE), plogis(log(x), a, b, lower=TRUE, log=TRUE), plogis(x, a, b, lower=FALSE, log=FALSE), plogis(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.plogis") x <- x/a checkEquals(runit_qlogis(x, a, b), c(qlogis(x, a, b, lower=TRUE, log=FALSE), qlogis(log(x), a, b, lower=TRUE, log=TRUE), qlogis(x, a, b, lower=FALSE, log=FALSE), qlogis(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qlogis") } test.rmath.nbeta <- function() { x <- 5 a <- 10 b <- 7 c <- 8 checkEquals(runit_dnbeta(x, a, b, c), c(dbeta(x, a, b, c, log=FALSE), dbeta(x, a, b, c, log=TRUE)), msg = " rmath.dnbeta") checkEquals(runit_pnbeta(x, a, b, c), c(pbeta(x, a, b, c, lower=TRUE, log=FALSE), pbeta(log(x), a, b, c, lower=TRUE, log=TRUE), pbeta(x, a, b, c, lower=FALSE, log=FALSE), pbeta(log(x), a, b, c, lower=FALSE, log=TRUE)), msg = " rmath.pnbeta") x <- x/a checkEquals(runit_qnbeta(x, a, b, c), c(qbeta(x, a, b, c, lower=TRUE, log=FALSE), qbeta(log(x), a, b, c, lower=TRUE, log=TRUE), qbeta(x, a, b, c, lower=FALSE, log=FALSE), qbeta(log(x), a, b, c, lower=FALSE, log=TRUE)), msg = " rmath.qnbeta") } test.rmath.nf <- function() { x <- 5 a <- 10 b <- 7 c <- 8 checkEquals(runit_dnf(x, a, b, c), c(df(x, a, b, c, log=FALSE), df(x, a, b, c, log=TRUE)), msg = " rmath.dnf") checkEquals(runit_pnf(x, a, b, c), c(pf(x, a, b, c, lower=TRUE, log=FALSE), pf(log(x), a, b, c, lower=TRUE, log=TRUE), pf(x, a, b, c, lower=FALSE, log=FALSE), pf(log(x), a, b, c, lower=FALSE, log=TRUE)), msg = " rmath.pnf") x <- x/a checkEquals(runit_qnf(x, a, b, c), c(qf(x, a, b, c, lower=TRUE, log=FALSE), qf(log(x), a, b, c, lower=TRUE, log=TRUE), qf(x, a, b, c, lower=FALSE, log=FALSE), qf(log(x), a, b, c, lower=FALSE, log=TRUE)), msg = " rmath.qnf") } test.rmath.nt <- function() { x <- 5 a <- 10 b <- 7 checkEquals(runit_dnt(x, a, b), c(dt(x, a, b, log=FALSE), dt(x, a, b, log=TRUE)), msg = " rmath.dnt") checkEquals(runit_pnt(x, a, b), c(pt(x, a, b, lower=TRUE, log=FALSE), pt(log(x), a, b, lower=TRUE, log=TRUE), pt(x, a, b, lower=FALSE, log=FALSE), pt(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pnt") x <- x/a checkEquals(runit_qnt(x, a, b), c(qt(x, a, b, lower=TRUE, log=FALSE), qt(log(x), a, b, lower=TRUE, log=TRUE), qt(x, a, b, lower=FALSE, log=FALSE), qt(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qnt") } test.rmath.wilcox <- function() { x <- 2 a <- 4 b <- 6 checkEquals(runit_dwilcox(x, a, b), c(dwilcox(x, a, b, log=FALSE), dwilcox(x, a, b, log=TRUE)), msg = " rmath.dwilcox") checkEquals(runit_pwilcox(x, a, b), c(pwilcox(x, a, b, lower=TRUE, log=FALSE), pwilcox(log(x), a, b, lower=TRUE, log=TRUE), pwilcox(x, a, b, lower=FALSE, log=FALSE), pwilcox(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.pwilcox") x <- x/a checkEquals(runit_qwilcox(x, a, b), c(qwilcox(x, a, b, lower=TRUE, log=FALSE), qwilcox(log(x), a, b, lower=TRUE, log=TRUE), qwilcox(x, a, b, lower=FALSE, log=FALSE), qwilcox(log(x), a, b, lower=FALSE, log=TRUE)), msg = " rmath.qwilcox") } } rcpp-0.11.0/inst/unitTests/runit.modref.R0000644000000000000000000000251412273213622015143 0ustar #!/usr/bin/r -t # # Copyright (C) 2010 - 2014 John Chambers, 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("modref.cpp") test.modRef <- function() { ww = new(World) wg = World$new() checkEquals(ww$greet(), wg$greet()) wgg <- wg$greet() ww$set("Other") ## test independence of ww, wg checkEquals(ww$greet(), "Other") checkEquals(wg$greet(), wgg) World$methods(twice = function() paste(greet(), greet())) checkEquals(ww$twice(), paste(ww$greet(), ww$greet())) } } rcpp-0.11.0/inst/unitTests/runit.support.R0000644000000000000000000000340412273214163015403 0ustar #!/usr/bin/r -t # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("support.cpp") test.plus.REALSXP <- function(){ checkEquals( plus_REALSXP(), list(NA_real_,NA_real_,NA_real_) , msg = " REALSXP + REALSXP" ) } test.times.REALSXP <- function(){ checkEquals( times_REALSXP(), list(NA_real_,NA_real_,NA_real_) , msg = " REALSXP * REALSXP" ) } test.divides.REALSXP <- function(){ checkEquals( divides_REALSXP(), list(NA_real_,NA_real_,NA_real_) , msg = " REALSXP / REALSXP" ) } test.minus.REALSXP <- function(){ checkEquals( minus_REALSXP(), list(NA_real_,NA_real_,NA_real_) , msg = " REALSXP - REALSXP" ) } test.functions.REALSXP <- function(){ checkEquals( functions_REALSXP(), list( rep(NA_real_, 20L), rep(NA_real_, 6L) ) , msg = "function(NA_REAL)" ) } } rcpp-0.11.0/inst/unitTests/runit.XPTr.R0000644000000000000000000000224212273213101014512 0ustar #!/usr/bin/r -t # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2009 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("XPtr.cpp") test.XPtr <- function(){ xp <- xptr_1() checkEquals(typeof( xp ), "externalptr", msg = "checking external pointer creation" ) front <- xptr_2(xp) checkEquals( front, 1L, msg = "check usage of external pointer" ) } } rcpp-0.11.0/inst/unitTests/runit.Date.R0000644000000000000000000001642712273213317014555 0ustar #!/usr/bin/r -t # -*- mode: R; tab-width: 4; -*- # # Copyright (C) 2010 - 2013 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("dates.cpp") test.Date.ctor.sexp <- function() { fun <- ctor_sexp d <- as.Date("2005-12-31"); checkEquals(fun(d), d, msg = "Date.ctor.sexp.1") d <- as.Date("1970-01-01"); checkEquals(fun(d), d, msg = "Date.ctor.sexp.2") d <- as.Date("1969-12-31"); checkEquals(fun(d), d, msg = "Date.ctor.sexp.3") d <- as.Date("1954-07-04"); checkEquals(fun(d), d, msg = "Date.ctor.sexp.4") # cf 'Miracle of Berne' ;-) d <- as.Date("1789-07-14"); checkEquals(fun(d), d, msg = "Date.ctor.sexp.5") # cf 'Quatorze Juillet' ;-) } test.Date.ctor.notFinite <- function() { fun <- ctor_sexp checkEquals(fun(NA), as.Date(NA, origin="1970-01-01"), msg = "Date.ctor.na") checkEquals(fun(NaN), as.Date(NaN, origin="1970-01-01"), msg = "Date.ctor.nan") checkEquals(fun(Inf), as.Date(Inf, origin="1970-01-01"), msg = "Date.ctor.inf") } test.Date.ctor.diffs <- function() { fun <- ctor_sexp now <- Sys.Date() checkEquals(as.numeric(difftime(fun(now+0.025), fun(now), units="days")), 0.025, msg = "Date.ctor.diff.0025") checkEquals(as.numeric(difftime(fun(now+0.250), fun(now), units="days")), 0.250, msg = "Date.ctor.diff.0250") checkEquals(as.numeric(difftime(fun(now+2.500), fun(now), units="days")), 2.500, msg = "Date.ctor.diff.2500") } test.Date.ctor.mdy <- function() { checkEquals(ctor_mdy(), as.Date("2005-12-31"), msg = "Date.ctor.mdy") } test.Date.ctor.ymd <- function() { checkEquals(ctor_ymd(), as.Date("2005-12-31"), msg = "Date.ctor.ymd") } test.Date.ctor.int <- function() { fun <- ctor_int d <- as.Date("2005-12-31") checkEquals(fun(as.numeric(d)), d, msg = "Date.ctor.int") checkEquals(fun(-1), as.Date("1970-01-01")-1, msg = "Date.ctor.int") checkException(fun("foo"), msg = "Date.ctor -> exception" ) } test.Date.ctor.string <- function() { fun <- ctor_string dtstr <- "1991-02-03" dtfun <- fun(dtstr) dtstr <- as.Date(strptime(dtstr, "%Y-%m-%d")) ddstr <- as.Date(dtstr, "%Y-%m-%d") checkEquals(dtfun, dtstr, msg = "Date.fromString.strptime") checkEquals(dtfun, ddstr, msg = "Date.fromString.asDate") } test.Date.operators <- function() { checkEquals(operators(), list(diff=-1, bigger=TRUE, smaller=FALSE, equal=FALSE, ge=TRUE, le=FALSE, ne=TRUE), msg = "Date.operators") } test.Date.components <- function() { checkEquals(components(), list(day=31, month=12, year=2005, weekday=7, yearday=365), msg = "Date.components") } test.vector.Date <- function(){ checkEquals(vector_Date(), rep(as.Date("2005-12-31"),2), msg = "Date.vector.wrap") } test.DateVector.wrap <- function(){ checkEquals(Datevector_wrap(), rep(as.Date("2005-12-31"),2), msg = "DateVector.wrap") } test.DateVector.operator.SEXP <- function(){ checkEquals(Datevector_sexp(), rep(as.Date("2005-12-31"),2), msg = "DateVector.SEXP") } test.Date.getFunctions <- function(){ fun <- Date_get_functions checkEquals(fun(as.Date("2010-12-04")), list(year=2010, month=12, day=4, wday=7, yday=338), msg = "Date.get.functions.1") checkEquals(fun(as.Date("2010-01-01")), list(year=2010, month=1, day=1, wday=6, yday=1), msg = "Date.get.functions.2") checkEquals(fun(as.Date("2009-12-31")), list(year=2009, month=12, day=31, wday=5, yday=365), msg = "Date.get.functions.3") } test.Datetime.get.functions <- function() { fun <- Datetime_get_functions checkEquals(fun(as.numeric(as.POSIXct("2001-02-03 01:02:03.123456", tz="UTC"))), list(year=2001, month=2, day=3, wday=7, hour=1, minute=2, second=3, microsec=123456), msg = "Datetime.get.functions") } test.Datetime.operators <- function() { checkEquals(Datetime_operators(), list(diff=-60*60, bigger=TRUE, smaller=FALSE, equal=FALSE, ge=TRUE, le=FALSE, ne=TRUE), msg = "Datetime.operators") } test.Datetime.wrap <- function() { checkEquals(as.numeric(Datetime_wrap()), as.numeric(as.POSIXct("2001-02-03 01:02:03.123456", tz="UTC")), msg = "Datetime.wrap") } test.Datetime.fromString <- function() { fun <- Datetime_from_string dtstr <- "1991-02-03 04:05:06.789" dtfun <- fun(dtstr) dtstr <- as.POSIXct(strptime(dtstr, "%Y-%m-%d %H:%M:%OS")) checkEquals(as.numeric(dtfun), as.numeric(dtstr), msg = "Datetime.fromString") } ## TZ difference ... ##test.Datetime.ctor <- function() { ## fun <- .Rcpp.Date$Datetime_ctor_sexp ## checkEquals(fun(1234567), as.POSIXct(1234567, origin="1970-01-01"), msg = "Datetime.ctor.1") ## checkEquals(fun(-120.25), as.POSIXct(-120.5, origin="1970-01-01"), msg = "Datetime.ctor.2") ## checkEquals(fun( 120.25), as.POSIXct( 120.25, origin="1970-01-01"), msg = "Datetime.ctor.3") ##} test.Datetime.ctor.notFinite <- function() { fun <- Datetime_ctor_sexp posixtNA <- as.POSIXct(NA, origin="1970-01-01") checkEquals(fun(NA), posixtNA, msg = "Datetime.ctor.na") checkEquals(fun(NaN), posixtNA, msg = "Datetime.ctor.nan") checkEquals(fun(Inf), posixtNA, msg = "Datetime.ctor.inf") } test.Datetime.ctor.diffs <- function() { fun <- Datetime_ctor_sexp now <- Sys.time() ## first one is Ripley's fault as he decreed that difftime of POSIXct should stop at milliseconds checkEquals(round(as.numeric(difftime(fun(now+0.025), fun(now), units="sec")), digits=4), 0.025, msg = "Datetime.ctor.diff.0025") checkEquals(as.numeric(difftime(fun(now+0.250), fun(now), units="sec")), 0.250, msg = "Datetime.ctor.diff.0250") checkEquals(as.numeric(difftime(fun(now+2.500), fun(now), units="sec")), 2.500, msg = "Datetime.ctor.diff.2500") } test.DatetimeVector.ctor <- function() { fun <- DatetimeVector_ctor now <- Sys.time() checkEquals(fun(now + (0:4)*60), now+(0:4)*60, msg = "Datetime.ctor.sequence") vec <- c(now, NA, NaN, Inf, now+2.345) posixtNA <- as.POSIXct(NA, origin="1970-01-01") checkEquals(fun(vec), c(now, rep(posixtNA, 3), now+2.345), msg = "Datetime.ctor.set") } } rcpp-0.11.0/inst/unitTests/runit.misc.R0000644000000000000000000001164412273213603014625 0ustar #!/usr/bin/r -t # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("misc.cpp") test.Symbol <- function(){ res <- symbol_() checkTrue( res[1L], msg = "Symbol creation - SYMSXP " ) checkTrue( res[2L], msg = "Symbol creation - CHARSXP " ) checkTrue( res[3L], msg = "Symbol creation - STRSXP " ) checkTrue( res[4L], msg = "Symbol creation - std::string " ) } test.Symbol.notcompatible <- function(){ checkException( symbol_ctor(symbol_ctor), msg = "Symbol not compatible with function" ) checkException( symbol_ctor(asNamespace("Rcpp")), msg = "Symbol not compatible with environment" ) checkException( symbol_ctor(1:10), msg = "Symbol not compatible with integer" ) checkException( symbol_ctor(TRUE), msg = "Symbol not compatible with logical" ) checkException( symbol_ctor(1.3), msg = "Symbol not compatible with numeric" ) checkException( symbol_ctor(as.raw(1) ), msg = "Symbol not compatible with raw" ) } test.Argument <- function(){ checkEquals( Argument_(), list( x = 2L, y = 3L ) , msg = "Argument") } test.Dimension.const <- function(){ checkEquals( Dimension_const( c(2L, 2L)) , 2L, msg = "testing const operator[]" ) } test.evaluator.error <- function(){ checkException( evaluator_error(), msg = "Rcpp_eval( stop() )" ) } test.evaluator.ok <- function(){ checkEquals( sort(evaluator_ok(1:10)), 1:10, msg = "Rcpp_eval running fine" ) } test.exceptions <- function(){ can.demangle <- Rcpp:::capabilities()[["demangling"]] e <- tryCatch( exceptions_(), "C++Error" = function(e) e ) checkTrue( "C++Error" %in% class(e), msg = "exception class C++Error" ) if( can.demangle ){ checkTrue( "std::range_error" %in% class(e), msg = "exception class std::range_error" ) } checkEquals( e$message, "boom", msg = "exception message" ) if( can.demangle ){ # same with direct handler e <- tryCatch( exceptions_(), "std::range_error" = function(e) e ) checkTrue( "C++Error" %in% class(e), msg = "(direct handler) exception class C++Error" ) checkTrue( "std::range_error" %in% class(e), msg = "(direct handler) exception class std::range_error" ) checkEquals( e$message, "boom", msg = "(direct handler) exception message" ) } f <- function(){ try( exceptions_(), silent = TRUE) "hello world" } checkEquals( f(), "hello world", msg = "life continues after an exception" ) } test.has.iterator <- function(){ has_it <- has_iterator_() checkTrue( has_it[1L] , msg = "has_iterator< std::vector >" ) checkTrue( has_it[2L] , msg = "has_iterator< std::ist >" ) checkTrue( has_it[3L] , msg = "has_iterator< std::deque >" ) checkTrue( has_it[4L] , msg = "has_iterator< std::set >" ) checkTrue( has_it[5L] , msg = "has_iterator< std::map >" ) checkTrue( ! has_it[6L] , msg = "has_iterator< std::pair >" ) checkTrue( ! has_it[7L] , msg = "Rcpp::Symbol" ) } test.AreMacrosDefined <- function(){ checkTrue( Rcpp:::areMacrosDefined( "__cplusplus" ) ) } test.rcout <- function(){ ## define test string that is written to two files teststr <- "First line.\nSecond line." rcppfile <- tempfile() rfile <- tempfile() ## write to test_rcpp.txt from Rcpp test_rcout(rcppfile, teststr ) ## write to test_r.txt from R cat( teststr, file=rfile, sep='\n' ) ## compare whether the two files have the same data checkEquals( readLines(rcppfile), readLines(rfile), msg="Rcout output") } test.na_proxy <- function(){ checkEquals( na_proxy(), rep(c(TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE) , 2), msg = "Na_Proxy NA == handling" ) } test.StretchyList <- function(){ checkEquals( stretchy_list(), pairlist( "foo", 1L, 3.2 ) ) } test.named_StretchyList <- function(){ checkEquals( named_stretchy_list(), pairlist( a = "foo", b = 1L, c = 3.2 ) ) } } rcpp-0.11.0/inst/unitTests/runit.Module.client.package.R0000644000000000000000000000467612253723677020014 0ustar #!/usr/bin/r -t # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2010 - 2013 John Chambers, 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 . .tearDown <- function(){ gc() } ## The unit test in this file fails on OS X 10.5.* but pass on 10.6.* ## Sys.info release comes back with 10.* for the latter but 9.* for the former ## Thanks to Simon Urbanek and Baptiste Auguie for suggesting and testing this .badOSX <- (Sys.info()['sysname'] == "Darwin" && isTRUE(as.integer(gsub("\\..*","",Sys.info()['release'])) < 10L) ) ## It now (Dec 2011) appears to fail on Windows too .onWindows <- .Platform$OS.type == "windows" .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest && ! .badOSX && ! .onWindows) { ## ## added test for 'testRcppClass' example of extending C++ classes via R test.Class.package <- function( ){ td <- tempfile() cwd <- getwd() dir.create( td ) file.copy( system.file( "unitTests", "testRcppClass", package = "Rcpp" ) , td, recursive = TRUE) setwd( td ) on.exit( { setwd( cwd) ; unlink( td, recursive = TRUE ) } ) R <- shQuote( file.path( R.home( component = "bin" ), "R" )) cmd <- paste( R , "CMD build testRcppClass" ) system( cmd ) dir.create( "templib" ) install.packages( "testRcppClass_0.1.tar.gz", "templib", repos = NULL, type = "source" ) require( "testRcppClass", "templib", character.only = TRUE ) v <- stdNumeric$new() data <- as.numeric(1:10) v$assign(data) v$set(3L, v$at(3L) + 1) data[[4]] <- data[[4]] +1 checkEquals( v$as.vector(), data ) ## a few function calls checkEquals( bar(2), 4) checkEquals( foo(2,3), 6) } } rcpp-0.11.0/inst/unitTests/runit.Vector.R0000644000000000000000000005241212273214215015132 0ustar #!/usr/bin/r -t # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2010 - 2014 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 . .runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" if (.runThisTest) { .setUp <- Rcpp:::unitTestSetup("Vector.cpp") test.RawVector <- function(){ funx <- raw_ checkEquals( funx(), as.raw(0:9), msg = "RawVector(int)" ) } test.RawVector.REALSXP <- function(){ funx <- raw_REALSXP checkEquals( funx(as.raw(0:9)), as.raw(2*0:9), msg = "RawVector( RAWSXP) " ) } test.ExpressionVector <- function(){ funx <- expression_ ex <- parse( text = "rnorm; rnorm(10)" ) # get rid of the srcref stuff so that we can compare # more easily attributes(ex) <- NULL checkEquals( funx(), ex , msg = "ExpressionVector" ) } test.ExpressionVector.variadic <- function(){ funx <- expression_variadic ex <- parse( text = "rnorm; rnorm(10)" ) attributes(ex) <- NULL checkEquals( funx(), ex , msg = "ExpressionVector (using variadic templates) " ) } test.ExpressionVector.parse <- function( ){ funx <- expression_parse code <- funx() results <- eval( code ) checkEquals( results, 1:10, msg = "ExpressionVector parsing" ) } test.ExpressionVector.parse.error <- function(){ funx <- expression_parseerror checkException( funx(), msg = "parse error" ) } test.ExpressionVector.eval <- function(){ funx <- expression_eval checkEquals( funx(), 1:10, msg = "ExpressionVector::eval" ) } test.ExpressionVector.eval.env <- function(){ funx <- expression_evalenv e <- new.env() e[["x"]] <- sample(1:10) checkEquals( funx(e), 1:10, msg = "ExpressionVector::eval in specific environment" ) } test.ComplexVector <- function(){ funx <- complex_ checkEquals( funx(), 0:9*(1+1i), msg = "ComplexVector" ) } test.ComplexVector.CPLXSXP <- function(){ funx <- complex_CPLXSXP vv = (0:9)*(1+1i) ## not working - funx changes its argument #checkEquals( funx(vv), 2*vv, msg = "ComplexVector( CPLXSXP) " ) checkEquals( funx((0:9)*(1+1i)), 2*(0:9)*(1+1i), msg = "ComplexVector( CPLXSXP) " ) } test.ComplexVector.INTSXP <- function(){ funx <- complex_INTSXP vv <- 0L:9L checkEquals( funx(vv), (2+0i)*vv, msg = "ComplexVector( INTSXP) " ) } test.ComplexVector.REALSXP <- function(){ funx <- complex_REALSXP vv <- as.numeric(0:9) checkEquals( funx(vv), (3+0i)*vv, msg = "ComplexVector( REALSXP) " ) } test.IntegerVector <- function(){ fun <- integer_ctor checkEquals( fun(), 0:9, msg = "IntegerVector" ) } test.IntegerVector.INTSXP_ <- function(){ fun <- integer_INTSXP checkEquals( fun(0:9), 2*0:9, msg = "IntegerVector( INTSXP) " ) } test.IntegerVector.Dimension.constructor <- function(){ fun <- integer_dimension_ctor_1 checkEquals(fun(), integer(5) , msg = "IntegerVector( Dimension(5))" ) fun <- integer_dimension_ctor_2 checkEquals(fun(), matrix( 0L, ncol = 5, nrow = 5) , msg = "IntegerVector( Dimension(5,5))" ) fun <- integer_dimension_ctor_3 checkEquals(fun(), array( 0L, dim = c(2,3,4) ) , msg = "IntegerVector( Dimension(2,3,4))" ) } test.IntegerVector.range.constructors <- function(){ fun <- integer_range_ctor_1 checkEquals( fun(), 0:3, msg = "assign(int*, int*)" ) fun <- integer_range_ctor_2 checkEquals( fun(), 0:3, msg = "assign(int*, int*)" ) } test.IntegerVector.names.set <- function(){ fun <- integer_names_set checkEquals(names(fun()), c("foo", "bar"), msg = "Vector::names" ) } test.IntegerVector.names.get <- function(){ fun <- integer_names_get checkEquals(fun( c("foo" = 1L, "bar" = 2L) ), c("foo", "bar"), msg = "Vector::names get" ) } test.IntegerVector.names.indexing <- function(){ fun <- integer_names_indexing x <- c( "foo" = 1L, "bar" = 2L ) checkEquals( fun( x ), 1L, msg = "IntegerVector names based indexing" ) } test.IntegerVector.comma <- function(){ fun <- integer_comma checkEquals( fun(), 0:3, msg = "IntegerVector comma initialization" ) } test.IntegerVector.push.back <- function(){ fun <- integer_push_back checkEquals( fun(1:4), 1:5, msg = "IntegerVector push back" ) x <- 1:4 names(x) <- letters[1:4] target <- 1:5 names(target) <- c( letters[1:4], "") checkEquals( fun(x), target, msg = "IntegerVector push back names" ) } test.IntegerVector.push.front <- function(){ fun <- integer_push_front checkEquals( fun(1:4), c(5L,1:4), msg = "IntegerVector push front" ) x <- 1:4 names(x) <- letters[1:4] target <- c( 5L, 1:4 ) names(target) <- c( "", letters[1:4]) checkEquals( fun(x), target, msg = "IntegerVector push front names" ) } test.IntegerVector.insert <- function(){ fun <- integer_insert checkEquals( fun(1:4), c(5L,1L, 7L, 2:4), msg = "IntegerVector insert" ) x <- 1:4 names(x) <- letters[1:4] target <- c( 5L, 1L, 7L, 2:4 ) names(target) <- c( "", "a", "", letters[2:4]) checkEquals( fun(x), target, msg = "IntegerVector insert names" ) } test.IntegerVector.erase <- function(){ fun <- integer_erase checkEquals( fun(1:4), c(1L, 2L, 4L), msg = "IntegerVector erase" ) x <- 1:4 names(x) <- letters[1:4] target <- c(1L, 2L, 4L) names(target) <- c( "a", "b", "d" ) checkEquals( fun(x), target, msg = "IntegerVector erase" ) } test.IntegerVector.erase.range <- function(){ x <- y <- 1:10 names(y) <- letters[1:10] res <- integer_erase_range( x, y ) checkEquals( res[[1L]], c(1:5, 10L) , msg = "IntegerVector erase range unnamed" ) z <- y[-(6:9)] checkEquals( res[[2L]], z , msg = "IntegerVector erase range named" ) } test.IntegerVector.erase.range.2 <- function(){ x <- y <- 1:10 names(y) <- letters[1:10] res <- integer_erase_range_2( x, y ) checkEquals( res[[1L]], 1L , msg = "IntegerVector erase range 2 unnamed" ) checkEquals( res[[2L]], c("a" = 1L ) , msg = "IntegerVector erase range 2 named" ) } test.IntegerVector.erase.range.2 <- function(){ x <- y <- as.list(1:10) names(y) <- letters[1:10] res <- List_erase_range_2( x, y ) checkEquals( res[[1L]], list( 1L ) , msg = "List erase range 2 unnamed" ) checkEquals( res[[2L]], list("a" = 1L ) , msg = "List erase range 2 named" ) } test.IntegerVector.erase2 <- function(){ checkEquals( integer_erase2(1:4), c(1L, 3L, 4L), msg = "IntegerVector erase2" ) x <- 1:4 names(x) <- letters[1:4] target <- c(1L, 3L, 4L) names(target) <- c( "a", "c", "d" ) checkEquals( integer_erase2(x), target, msg = "IntegerVector erase2" ) } test.IntegerVector.fill <- function(){ fun <- integer_fill x <- 1:10 checkEquals( fun(x), rep(10L, 10 ), msg = "IntegerVector.fill" ) } test.IntegerVector.zero <- function( ){ fun <- integer_zero checkEquals( fun(), integer(0), msg = "IntegerVector(0)" ) } test.IntegerVector.create.zero <- function( ){ fun <- integer_create_zero checkEquals( fun(), integer(0), msg = "IntegerVector::create()" ) } test.IntegerVector.create <- function(){ fun <- integer_create_ checkEquals( fun(), list( c( 10L, 20L) , c(foo = 20L, bar = 30L) ), msg = "IntegerVector::create" ) } test.IntegerVector.clone <- function(){ x <- 1:10 fun <- integer_clone_ y <- fun(x) checkEquals( x, 1:10, msg = "clone" ) checkEquals( y, 10:1, msg = "clone" ) } test.NumericVector <- function(){ funx <- numeric_ checkEquals( funx(), as.numeric(0:9), msg = "NumericVector(int)" ) } test.NumericVector.REALSXP <- function(){ funx <- numeric_REALSXP checkEquals( funx(as.numeric(0:9)), 2*0:9, msg = "NumericVector( REALSXP) " ) } test.NumericVector.import <- function(){ funx <- numeric_import checkEquals( funx(), 0:9, msg = "IntegerVector::import" ) } test.NumericVector.import.transform <- function(){ funx <- numeric_importtransform checkEquals( funx(), (0:9)^2, msg = "NumericVector::import_transform" ) } test.List <- function(){ fun <- list_ctor checkEquals( fun(), as.list( 2*0:9), msg = "GenericVector" ) } test.List.template <- function(){ fun <- list_template_ checkEquals(fun(), list( "foo", 10L, 10.2, FALSE), msg = "GenericVector" ) } test.List.VECSXP <- function(){ fun <- list_VECSXP_ checkEquals( fun(list(1,2)), list(1,2), msg = "GenericVector( VECSXP) " ) } test.List.matrix.indexing <- function(){ fun <- list_matrix_indexing_1 ## a matrix of integer vectors x <- structure( lapply( 1:16, function(x) seq.int(x) ), dim = c( 4, 4) ) checkEquals( fun(x), diag(x), msg = "matrix indexing 1" ) fun <- list_matrix_indexing_2 checkEquals(diag(fun(x)), rep(list("foo"), 4) , msg = "matrix indexing lhs" ) ## drop dimensions dim(x) <- NULL checkException( fun(x) , msg = "not a matrix" ) } test.List.Dimension.constructor <- function(){ fun <- list_Dimension_constructor_1 checkEquals(fun(), rep(list(NULL),5) , msg = "List( Dimension(5))" ) fun <- list_Dimension_constructor_2 checkEquals(fun(), structure( rep( list(NULL), 25), dim = c(5,5) ), msg = "List( Dimension(5,5))" ) fun <- list_Dimension_constructor_3 checkEquals(fun(), array( rep(list(NULL)), dim = c(2,3,4) ) , msg = "List( Dimension(2,3,4))" ) } test.List.iterator <- function() { fun <- list_iterator_ data <- list( x = letters, y = LETTERS, z = 1:4 ) checkEquals(fun( data, length ), list( x = 26L, y = 26L, z = 4L), msg = "c++ version of lapply" ) } test.List.name.indexing <- function(){ fun <- list_name_indexing d <- data.frame( x = 1:10, y = letters[1:10] ) checkEquals( fun( d ), sum(1:10), msg = "List names based indexing" ) } test.List.push.back <- function(){ fun <- list_push_back d <- list( x = 1:10, y = letters[1:10] ) checkEquals(fun( d ), list( x = 1:10, y = letters[1:10], 10L, foo = "bar" ), msg = "List.push_back" ) } test.List.push.front <- function(){ fun <- list_push_front d <- list( x = 1:10, y = letters[1:10] ) checkEquals(fun(d), list( foo = "bar", 10L, x = 1:10, y = letters[1:10] ), msg = "List.push_front" ) } test.List.erase <- function(){ fun <- list_erase d <- list( x = 1:10, y = letters[1:10] ) checkEquals(fun(d), list( y = letters[1:10] ), msg = "List.erase" ) } test.List.erase.range <- function(){ fun <- list_erase_range d <- list( x = 1:10, y = letters[1:10], z = 1:10 ) checkEquals(fun(d), list( z = 1:10 ), msg = "List.erase (range version)" ) } test.List.implicit.push.back <- function(){ fun <- list_implicit_push_back checkEquals( fun(), list( foo = 10, bar = "foobar" ), msg = "List implicit push back" ) } test.List.create <- function(){ fun <- list_create_ checkEquals( fun(), list( list( 10L, "foo" ), list(foo = 10L, bar = TRUE ) ), msg = "List::create" ) } test.List.stdcomplex <- function(){ fun <- list_stdcomplex checkEquals( fun(), list( float = rep(0+0i, 10), double = rep(0+0i, 10) ), msg = "range wrap over std::complex" ) } test.CharacterVector <- function(){ fun <- character_ctor checkEquals( fun(), rep("foo",10L), msg = "CharacterVector" ) } test.CharacterVector.STRSXP <- function(){ fun <- character_STRSXP_ checkEquals( fun(letters), paste(letters,collapse="" ), msg = "CharacterVector( STRSXP) " ) } test.CharacterVector.plusequals <- function(){ fun <- character_plusequals checkEquals( fun(), c("foobar", "barfoobar"), msg = "StringProxy::operator+=" ) } test.CharacterVector.matrix.indexing <- function() { fun <- character_matrix_indexing x <- matrix( as.character(1:16), ncol = 4 ) checkEquals( fun(x), paste(diag(x), collapse = ""), msg = "matrix indexing" ) y <- as.vector( x ) checkException( fun(y) , msg = "not a matrix" ) fun <- character_matrix_indexing_lhs checkEquals( diag(fun(x)), rep("foo", 4) , msg = "matrix indexing lhs" ) } test.CharacterVector.matrix.row.iteration <- function() { x <- matrix(letters[1:16], nrow = 4) fun <- character_matrix_row_iteration_incr checkEquals( fun(x), "bfjn", msg = "matrix row iteration post-incr" ) fun <- character_matrix_row_iteration_decr checkEquals( fun(x), "njf", msg = "matrix row iteration post-decr" ) } test.CharacterVector.assign <- function(){ fun <- character_assign1 checkEquals( fun(), c("foo", "bar", "bling", "boom"), msg = "assign(char**, char**)" ) fun <- character_assign2 checkEquals( fun(), c("foo", "bar", "bling", "boom"), msg = "assign(char**, char**)" ) } test.CharacterVector.range.constructors <- function(){ fun <- character_range_ctor1 checkEquals( fun(), c("foo", "bar", "bling", "boom"), msg = "assign(char**, char**)" ) fun <- character_range_ctor2 checkEquals( fun(), c("foo", "bar", "bling", "boom"), msg = "assign(char**, char**)" ) } test.CharacterVector.Dimension.constructor <- function(){ fun <- character_dimension_ctor1 checkEquals(fun(), character(5), msg = "CharacterVector( Dimension(5))" ) fun <- character_dimension_ctor2 checkEquals(fun(), matrix( "", ncol = 5, nrow = 5), msg = "CharacterVector( Dimension(5,5))" ) fun <- character_dimension_ctor3 checkEquals(fun(), array( "", dim = c(2,3,4) ) , msg = "CharacterVector( Dimension(2,3,4))" ) } test.CharacterVector.iterator <- function(){ fun <- character_iterator1 checkEquals(fun(letters), paste(letters, collapse=""), msg = "CharacterVector::iterator explicit looping" ) fun <- character_iterator2 checkEquals(fun(letters), paste(letters, collapse=""), msg = "CharacterVector::iterator using std::accumulate" ) } test.CharacterVector.reverse <- function(){ fun <- character_reverse x <- c("foo", "bar", "bling") x <- fun(x) checkEquals( x, c("bling", "bar", "foo"), msg = "reverse" ) x <- fun(x) checkEquals( x, c("foo", "bar", "bling"), msg = "reverse" ) } test.CharacterVector.names.indexing <- function(){ fun <- character_names_indexing x <- c( foo = "foo", bar = "bar" ) checkEquals( fun(x), "foo", msg = "CharacterVector names based indexing" ) } test.CharacterVector.comma <- function(){ fun <- character_comma checkEquals( fun(), c("foo","bar", "bling" ), msg = "CharacterVector comma operator" ) } test.CharacterVector.listOf <- function() { fun <- character_listOf checkEquals(fun(list(foo=c("tic","tac","toe"), bar=c("Eenie","Meenie","Moe"))), list(foo="tictactoe", bar="EenieMeenieMoe"), msg="CharacterVector from list") } test.CharacterVector.find <- function(){ fun <- character_find_ checkEquals( fun( c("bar", "foo", "bob") ), 1L, msg = "support for std::find in CharacterVector" ) } test.CharacterVector.create <- function(){ fun <- character_create_ checkEquals( fun(), list( c( "foo", "bar" ), c(foo = "bar", bar = "foo" ) ), msg = "CharacterVector::create" ) } test.ComplexVector.binary.operators <- function(){ fun <- complex_binary_sugar x <- (1+1i) * 1:10 y <- (2-3i) * 1:10 checkEquals( fun(x, y), list( "+" = x + y, "-" = x - y, "*" = x * y, "/" = x / y ), msg = "complex binary operators" ) } test.ComplexVector.binary.operators <- function(){ fun <- List_extract checkEquals( fun(list(TRUE, 4)), list(TRUE, 4L) ) checkEquals( fun(list(FALSE, -4L)), list(FALSE,-4L) ) } test.factors <- function(){ fun <- factors x <- as.factor( c("c3", "c2", "c1") ) y <- fun(x) checkEquals( y, as.character(x) ) } test.IntegerVector_int_init <- function(){ fun <- IntegerVector_int_init checkEquals( fun(), c(4L,4L), msg = "IntegerVector int init regression test" ) } test.containsElementNamed <- function() { fun <- containsElementNamed x <- list( foo = 2, bla = 1:10 ) checkEquals(fun(x, "foo"), TRUE, msg = "containsElementNamed with element") checkEquals(fun(x, "bar"), FALSE, msg = "containsElementNamed without element") checkEquals(fun(x, ""), FALSE, msg = "containsElementNamed with empty element") } test.CharacterVector.equality.operator <- function(){ res <- CharacterVectorEqualityOperator( letters, letters ) checkEquals( res, list( rep( TRUE, 26L ), rep( FALSE, 26L) ), msg = 'CharacterVector element equality operator' ) } test.List.rep.ctor <- function(){ x <- 1:10 res <- List_rep_ctor(x) expected <- rep( list(x), 3 ) checkEquals( res, expected, msg = "List rep constructor" ) } test.std.vector.double <- function() { fun <- stdVectorDouble x <- seq(1.0, 5.0, by=1.0) checkEquals(fun(x), 5, msg = "automatic conversion of stdVectorDouble") } test.std.vector.double.const <- function() { fun <- stdVectorDoubleConst x <- seq(1.0, 5.0, by=1.0) checkEquals(fun(x), 5, msg = "automatic conversion of stdVectorDoubleConst") } test.std.vector.double.ref <- function() { fun <- stdVectorDoubleRef x <- seq(1.0, 5.0, by=1.0) checkEquals(fun(x), 5, msg = "automatic conversion of stdVectorDoubleRef") } test.std.vector.double.const.ref <- function() { fun <- stdVectorDoubleConstRef x <- seq(1.0, 5.0, by=1.0) checkEquals(fun(x), 5, msg = "automatic conversion of stdVectorDoubleConstRef") } test.std.vector.int <- function() { fun <- stdVectorInt x <- seq(1L, 5L, by=1L) checkEquals(fun(x), 5, msg = "automatic conversion of stdVectorInt") } test.std.vector.int.const <- function() { fun <- stdVectorIntConst x <- seq(1L, 5L, by=1L) checkEquals(fun(x), 5, msg = "automatic conversion of stdVectorIntConst") } test.std.vector.int.ref <- function() { fun <- stdVectorIntRef x <- seq(1L, 5L, by=1L) checkEquals(fun(x), 5, msg = "automatic conversion of stdVectorIntRef") } test.std.vector.int.const.ref <- function() { fun <- stdVectorIntConstRef x <- seq(1L, 5L, by=1L) checkEquals(fun(x), 5, msg = "automatic conversion of stdVectorIntConstRef") } test.character.vector.const.proxy <- function(){ res <- character_vector_const_proxy( "fooo" ) checkEquals( res, "fooo", msg = "CharacterVector const proxy. #32" ) } test.CharacterVector.test.const.proxy <- function(){ res <- CharacterVector_test_const_proxy( letters ) checkEquals( res, letters ) } } rcpp-0.11.0/inst/README0000644000000000000000000000337512253723677011306 0ustar History ======= Rcpp continues and extends earlier work by Dominick Samperi which he initially contributed directly into the RQuantLib package. Then, during 2005 and 2006, several releases were made as CRAN packages, first under the name Rcpp and later under the name RcppTemplate. However, both packages were left abandonded after November 2006. Later, in November 2009, two brief releases were made and abandonded immediately afterwards. Due to the continued use of Rcpp both within RQuantLib and in other projects, Dirk took over maintenance in November 2008 and added some extensions which are documented in the NEWS file, the ChangeLog and the included annoucements of the major releases. With Romain joining development in late 2009, Rcpp development accelerated. A richer, more powerful API has been developped to replace the previous API that we now call 'classic Rcpp API'. The 'classic Rcpp API' has been factored out of Rcpp in its own package 'RcppClassic'. Documentation ============= Several so-called 'vignette' pdf documents are included which provide o an introduction; o answers to frequently asked question; o documentation about how to use Rcpp in other R packages; o documentation of modules (to access C++ classes and functions); o documentation of sugar (expressive C++ code for vectors and matrices); o notes about extending Rcpp; o results from the hundreds of unit tests. The CRAN package RcppExamples provides additionnal documentation and examples. Contact ======= Rcpp is in active and open development, and new contributors are invited to follow the development on GitHub. The rcpp-devel project mailing list is the main venue for discussions about Rcpp. -- Dirk Eddelbuettel and Romain Francois rcpp-0.11.0/inst/doc/0000755000000000000000000000000012273452733011155 5ustar rcpp-0.11.0/inst/doc/Rcpp-FAQ.pdf0000644000000000000000000055157412273452733013202 0ustar %PDF-1.5 % 207 0 obj << /Length 3116 /Filter /FlateDecode >> stream xZmo6_a91O|%v;^ \{M'L,,zICr(bg{/E 2C< hq΢g_ݜ-$fR-nnHIq,~^m|l?+uuպjol<0)v|@JDf+Fc)R”p'7כ.׽:]D$'zkɪ\$uю$fR Kq\̋|4uDE4*_ߢ2^ug .wDV8!S"$53.L,V<&Lnu5Y=;@4LfDE".nv0ͶB쭫e}u5~෭v]b<-M-Y)d $ 8]8FC\n`OSeeM=-VD{.V6g6,gKR=J.Q7L&"! (Kc[K yaŁJuYr׻;;b"$CO$T,Y붝XT]So-O]e, zk!f |u9{uFwYQzN0,Y9͌_ߜzF'Rwg?-6۷ a,n!$#'P.ޏP mQGlG1B*c1S3 M~WG?cJBd `4N4zqǬ:X[1)#I$@% *9k`ԏB(1s,ใG'$k*g:)lF<ԭ`/`kxrxP mcFgiG]4OFS$ 8.N!RF)aCM)[(\daT᱃84I$xq.Yzv[A-E6%VuoF<(ψG 㘈O488,|(^Wpkl*vM 튦Gޫ\-<-$ ݏ۬ev 6g]sY[ȧ(ˋt,# :ձ&1[f Pd26ob['@vBy&XE2 `իS),d.+ֿun!Y}|P|pL^vj[H Plerl|{|触]#Dzo"x6ڕ֏sJPgNԞ`ȡe#=\n!}[dHbJ_>3ToЮKh9l[ѾZjj5ֺ/BЅ,Cu_!G)vj^M_ CX}5EYF @ȫm& ^͘@'@Ź&f@EE|GBFĩ۷BY`:guk2LnIsx `-S۶XUzZA? tbyHB ,k/{w/r^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ظ-DGWRnLN!c'"E\U1^)цS/P.U(chamiMqlppoe' bηORMռQP.v7lcAnL=U+iITApD<2DyzKE7EKr4d]3X.%R E9_=3ˊcqBiGU^ endstream endobj 434 0 obj << /Length1 812 /Length2 1128 /Length3 0 /Length 1696 /Filter /FlateDecode >> stream xuRkTSg%hYV§1 8 5(GPP\r&7@R ҂ 2Ph *e -c\(EWET H vZ9c}X$sp`rX .XH0?b@r 0D -  1ATo FD%FeBKy2gl,WbC@ 'P١8`,r16aB% T$-@a9 0$%٘f-Sh0Tw$U/!F$R8ct0R!*X")H |q0\7 ^ 0X\%m^2+]D$ rPM%OMF\X`p,J"$r[[ Rc['aB#_&$ ޏ )K_Ťa9!q C>W40=9zz'R0F,}Mr? y7V"j\-+9ұ+IkyayG?A봭bgX*妛*=[ܑ ùo9l|7ܳWr~xX~)O[R5c׶ET۰=-A٠m(9uHo? Ǫ\5rGYV_T?ԼѹRNкWfǧU~r^zsҴkhX*kB<|V.*>fZ+|,ƭ7\@}(顗 CeIN?y9^XbC{~bDH>lMTxVNň.pRZWO#n܀E?{MXmy58؃&_TJ\ɞI;\cts߷ܼjd `qe?[oŌc>ߗ8݊\Y=G*iFn)ܕeL=m'/r.8s/6<:0<.:u}ZD;:FE5%5rs7-';%\=^SfM$M}zm@vInZbP6Fn3nvb{tt?ӭķX"svK?v|flsὃӔꐙ `~*yf&.[\˛E?7}w-Ej?v/V^";guq{&ۦ8 endstream endobj 436 0 obj << /Length1 854 /Length2 1264 /Length3 0 /Length 1848 /Filter /FlateDecode >> stream x}R{<V#=]pG?21n#T*5f޹031dWn%d.B8ZYUVV$Rq^s~ÿOpe B`/V#c\X woD"5H BheKę`  v ؃ @m G9Cp֋;|`HoX ,c<?`6Κ"@yLXX0 HƈeDb a"raF9^|>MH >H۟<~>̜{`>(#p0>^<)̢P&|1k~>i1oh@p_py0-i rK}z{n]jD[2`Dhvu,G-XB(h ` Dk `-d`E,CVdbDi D 7 =<Ŷ.fbL'!+"BП  Rp8;2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lMyo߼?x#פB]KoEYe44]Jmd;Bh7=p8D Fە[0@t7Um^?O:qMs,v>,hOF8KKJ׮ͪ2}Υk'SI̡RQ@;>u5}ZLkvWJ"Ei )S2:|*tVX"+%C?fI7Fz9r8pfdr4Ʀjb)G)w6ZbI.Zh\IKwҒ5Z*i.ZWi9B˖ڶڶFK*uo;uokmMMMMԽYbtMmS6WI| /J/U@~'4Хt IX&.ծeuuu;H[Rҕ"Un*-x)Yj,--khWmheEM@٦vY]4.j`m2RB.nS(+kYgv٘6 WT;M|Ў4vB<^K_w#Zf|3vB|tmL<[Ye48Bq NjVniZmKem:_2źk[z-Pq-e2ײj[R-sPq-22k[b-PشLCźbT endstream endobj 466 0 obj << /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.14)/Keywords() /CreationDate (D:20140202082710-06'00') /ModDate (D:20140202082710-06'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 446 0 obj << /Type /ObjStm /N 30 /First 242 /Length 1085 /Filter /FlateDecode >> stream xڭWK6WH,CR4f{c[6"0xeÒwzIjKQ{)q}|9!Yv4ڄc,xͩc̈Ar0vgvgwP9I 0825@T8A⍸L͒)V!f&9Kl4 *5’0GK$4fP7Y"QVf$+pe<҆هa!DmҼty(k&Y-<5=Rf"~,і{v˰Ϊ_=fB7ОA0^lԡƴsv~Ͽ[ endstream endobj 467 0 obj << /Type /XRef /Index [0 468] /Size 468 /W [1 3 1] /Root 465 0 R /Info 466 0 R /ID [<3EE76FB4B0172975A6930EE5F4768395> <3EE76FB4B0172975A6930EE5F4768395>] /Length 1106 /Filter /FlateDecode >> stream x%nVW>`l<`<`gd0l 4$E^ !"ґHi$UHHI" -DyQ"KߢY>k]sϾ{}BxCBW?̀VVlFێZT5m h\ڀ}MhhuhChzd=mS#4 hF;FEqЂqYw;]h6@y;vmm t]@ z.݂}h7nBh7-500v:tC[G Av:E@[iڂV+A*Ca]hpm z8օ=Оԍ=Њ7%$07E40t8mz 8F< p9@֦9P=6&yC[ hi \B7t hI^ Ԕhfju4Ù}"TFd=yRٮWtI+S4HB׽J6\Q*-\n:DeP=Ri$ p 8DZc0d`#9qI'ӎ7)j򂅙9m.:hH^Nr{֞=~֪݉ɟ9x m@tNN8Dj22#s\U&Rzv =V=!H>M` Yxe -|3"MޕcFEƒZSݦǧ#i@MKӀ,t QՀVg8RW%Ӽt5HleOt:LCs HRK327XxnYfuPc]srS^fa[:Z2_n?jcj]^?ԪߒVf8V_!?|(kOϵV[+>ZAT^觋~lj~ */ */Eץ`ϱ=0b endstream endobj startxref 183850 %%EOF rcpp-0.11.0/inst/doc/Rcpp-quickref.pdf0000644000000000000000000022107312273452733014370 0ustar %PDF-1.5 % 5 0 obj << /Length 2902 /Filter /FlateDecode >> stream xko8{~6f%^[tq[laSlѭ,y%9{HʒؔE+h"yqfȪDQ'/NwLE -W+۱aH;fo?vM??;vQ!>Z5öISttyh!}_uÎ?0 ÏY_F#\Qoׁau[ׄ.p|4(N\Me/h`[f]s/^'U @si0:TM t 8E;8Eq)nąOQ OZ8p-) r `pz囪r՚*аm('[b׷x pU͵T1tM'd{}~%,a"-`< ,11Rw5FLuZzrab.b94]b}nD7362{hN h1CFә(NNYWBTXKWb6mc7 •w],fE. քv 6ƤUٳ8l[+hўKD}_7=5QL\R§QDS/%9ՌlQ3jo,޹ e!^1›ig2 cO(?ڛfp:pMB;OpTX%3ovtHPdv]p6&?k!fٵ%{yS%N|V"0KZz(1≷`>'I&Ey(fSNʋ>v5W/oS|E6drzo?XM uF[1 64"L9hkT,=̭G0jY|U  lb$e*ȶXVFaa44co nElTK9b:l2[$:DuJ7|g"d2abv$Q_^%/6F?^.d4?v|*-l@hJmwZh3T]O m_#JlCPUՌ @#O*T2 O4TU`d5Bco|A@ ^0]\IE`ɰ18(u^& QQɵEZMo"ʄILTRAһ!:BgO9QnbY?Ar'ZɃ2fD'p/DGe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Օ zKCZFgs#ɗO2kU.MË~>Y{4 ۧ4qUu3loύSP텧ǾwE$ %#wފ5Z* endstream endobj 60 0 obj << /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.14)/Keywords() /CreationDate (D:20140202082727-06'00') /ModDate (D:20140202082727-06'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 2 0 obj << /Type /ObjStm /N 49 /First 364 /Length 2283 /Filter /FlateDecode >> stream xYr۶}W1jqf:MfI#16OdQ49_)DI>!I 0Ŕ` Y`z&&dI0Y`!SN0ʹ0z)%+ŬAI39噴9t}7T1`qEb@I&pCn7F2y@Y)(JOH .D@Ӕk8mt`*VN2P߀*8f33c᥀sv 34YQ &*1jLs&h4bah;\L@d*?eY^]~4d~R̪lV̐݀bg%$Ou H:˼#e-Y7l}ǟHd-vB4sy #dg/I'GSymze*iuM9#<%DK* !BV7HE1*\1~}z$Kger mawe8P52}pEw3ԬVbB龏(1PbeQ?jkS1}>k {85InyH`DZ^rdͤ.B{mP]uj";1K* h%R@;JV '+*TJQ`Ѫ:ъ OfbVXMֵCǴ8_q߰4 4 t(oh蹆ah6#|uI I䴮v,fh}4'pB׭ NӬ/yU,SIz;\]?<r.lq|ut\L'07x-cp$בgE}-XA9@ I?gmLBwU*iƒIiZ{?g/_+O>OK?kru;>9Eq"@$$:=xӈ9,jcsi]ڀ1Pyƥe|-bT.WO٢emY ^x!|ҁ+%}yӎgZK/+LO&<-1|W[LYcRm6LOU} WI>۷xgB]k բc'+iDԨNG&((*ZߑY|EtC9j@]X0mElv3}!IJ*bRys-д|S"Ube ,_iSt'-$ּXI/wJs^={n[Zܒeܒ[Ӟ_Ưo2t1o忁؄z-T1bOlE/JzЯ\n^6/7_A{', TYĜݛˑ2*!}ٔՐ>lzHgbU^~.DRwym^2/CѷJ8\uB0:L@ؾ'ڶ5C(kX X;Y. >̰cvV0uE>8m՝Ptq3z۠aݻ(&̞.i>#>gq,2H endstream endobj 61 0 obj << /Type /XRef /Index [0 62] /Size 62 /W [1 3 1] /Root 59 0 R /Info 60 0 R /ID [ ] /Length 157 /Filter /FlateDecode >> stream xзBA Eѧ޻R$!2(Ji$})Y, eRLa氀!IXAҦe 9CjP25{W Tu4 @z7_<0]^7Y55l` ;SxH endstream endobj startxref 73892 %%EOF rcpp-0.11.0/inst/doc/Rcpp-FAQ.R0000644000000000000000000001630612273452733012617 0ustar ### R code from vignette source 'Rcpp-FAQ.Rnw' ################################################### ### code chunk number 1: Rcpp-FAQ.Rnw:47-51 ################################################### prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") require(inline) require(highlight) ################################################### ### code chunk number 2: Rcpp-FAQ.Rnw:76-77 (eval = FALSE) ################################################### ## vignette("Rcpp-introduction") ################################################### ### code chunk number 3: Rcpp-FAQ.Rnw:173-174 (eval = FALSE) ################################################### ## vignette("Rcpp-package") ################################################### ### code chunk number 4: Rcpp-FAQ.Rnw:198-204 ################################################### fx <- cxxfunction(signature(x = "numeric"), 'NumericVector xx(x); return wrap(std::accumulate(xx.begin(), xx.end(), 0.0));', plugin = "Rcpp") res <- fx(seq(1, 10, by=0.5)) res ################################################### ### code chunk number 5: Rcpp-FAQ.Rnw:205-206 ################################################### stopifnot(identical(res, sum(seq(1, 10, by=0.5)))) ################################################### ### code chunk number 6: Rcpp-FAQ.Rnw:220-222 (eval = FALSE) ################################################### ## fx <- cxxfunction(signature(), paste(readLines("myfile.cpp"), collapse="\n"), ## plugin = "Rcpp") ################################################### ### code chunk number 7: Rcpp-FAQ.Rnw:242-247 ################################################### cppFunction('double accu(NumericVector x) { return(std::accumulate(x.begin(), x.end(), 0.0)); }') res <- accu(seq(1, 10, by=0.5)) res ################################################### ### code chunk number 11: Rcpp-FAQ.Rnw:505-524 ################################################### inc <- 'template class square : public std::unary_function { public: T operator()( T t) const { return t*t ;} }; ' src <- ' double x = Rcpp::as(xs); int i = Rcpp::as(is); square sqdbl; square sqint; return Rcpp::DataFrame::create(Rcpp::Named("x", sqdbl(x)), Rcpp::Named("i", sqint(i))); ' fun <- cxxfunction(signature(xs="numeric", is="integer"), body=src, include=inc, plugin="Rcpp") fun(2.2, 3L) ################################################### ### code chunk number 14: Rcpp-FAQ.Rnw:605-609 (eval = FALSE) ################################################### ## fx <- cxxfunction(signature(x_="numeric", Y_="matrix", z_="numeric" ), ## paste(readLines("myfile.cpp"), collapse="\n"), ## plugin="RcppArmadillo" ) ## fx(1:4, diag(4), 1:4) ################################################### ### code chunk number 15: Rcpp-FAQ.Rnw:611-612 ################################################### unlink("myfile.cpp") ################################################### ### code chunk number 17: Rcpp-FAQ.Rnw:671-678 ################################################### fx <- cxxfunction(signature(), 'RNGScope(); return rnorm(5, 0, 100);', plugin="Rcpp") set.seed(42) fx() fx() ################################################### ### code chunk number 18: Rcpp-FAQ.Rnw:687-694 ################################################### cppFunction('Rcpp::NumericVector ff(int n) { return rnorm(n, 0, 100); }') set.seed(42) ff(5) ff(5) set.seed(42) rnorm(5, 0, 100) rnorm(5, 0, 100) ################################################### ### code chunk number 19: Rcpp-FAQ.Rnw:709-717 ################################################### src <- 'Rcpp::NumericVector v(4); v[0] = R_NegInf; // -Inf v[1] = NA_REAL; // NA v[2] = R_PosInf; // Inf v[3] = 42; // see the Hitchhiker Guide return Rcpp::wrap(v);' fun <- cxxfunction(signature(), src, plugin="Rcpp") fun() ################################################### ### code chunk number 21: Rcpp-FAQ.Rnw:745-753 (eval = FALSE) ################################################### ## txt <- 'arma::mat Am = Rcpp::as< arma::mat >(A); ## arma::mat Bm = Rcpp::as< arma::mat >(B); ## return Rcpp::wrap( Am * Bm );' ## mmult <- cxxfunction(signature(A="numeric", B="numeric"), ## body=txt, plugin="RcppArmadillo") ## A <- matrix(1:9, 3, 3) ## B <- matrix(9:1, 3, 3) ## C <- mmult(A, B) ################################################### ### code chunk number 23: Rcpp-FAQ.Rnw:800-818 (eval = FALSE) ################################################### ## ## simple example of seeding RNG and drawing one random number ## gslrng <- ' ## int seed = Rcpp::as(par) ; ## gsl_rng_env_setup(); ## gsl_rng *r = gsl_rng_alloc (gsl_rng_default); ## gsl_rng_set (r, (unsigned long) seed); ## double v = gsl_rng_get (r); ## gsl_rng_free(r); ## return Rcpp::wrap(v);' ## ## plug <- Rcpp:::Rcpp.plugin.maker( ## include.before = "#include ", ## libs = paste("-L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp", ## "-Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib", ## "-L/usr/lib -lgsl -lgslcblas -lm")) ## registerPlugin("gslDemo", plug ) ## fun <- cxxfunction(signature(par="numeric"), gslrng, plugin="gslDemo") ## fun(0) ################################################### ### code chunk number 24: Rcpp-FAQ.Rnw:839-846 (eval = FALSE) ################################################### ## myplugin <- getPlugin("Rcpp") ## myplugin$env$PKG_CXXFLAGS <- "-std=c++11" ## f <- cxxfunction(signature(), settings=myplugin, body=' ## + std::vector x = { 1.0, 2.0, 3.0 }; // fails without -std=c++0x ## + return Rcpp::wrap(x); ## + ') ## f() ################################################### ### code chunk number 25: Rcpp-FAQ.Rnw:862-874 (eval = FALSE) ################################################### ## src <- ' ## Rcpp::NumericMatrix x(2,2); ## x.fill(42); // or more interesting values ## Rcpp::List dimnms = // two vec. with static names ## Rcpp::List::create(Rcpp::CharacterVector::create("cc", "dd"), ## Rcpp::CharacterVector::create("ee", "ff")); ## // and assign it ## x.attr("dimnames") = dimnms; ## return(x); ## ' ## fun <- cxxfunction(signature(), body=src, plugin="Rcpp") ## fun() ################################################### ### code chunk number 27: Rcpp-FAQ.Rnw:904-918 (eval = FALSE) ################################################### ## BigInts <- cxxfunction(signature(), ## 'std::vector bigints; ## bigints.push_back(12345678901234567LL); ## bigints.push_back(12345678901234568LL); ## Rprintf("Difference of %ld\\n", 12345678901234568LL - 12345678901234567LL); ## return wrap(bigints);', plugin="Rcpp", includes="#include ") ## ## retval<-BigInts() ## ## # Unique 64-bit integers were cast to identical lower precision numerics ## # behind my back with no warnings or errors whatsoever. Error. ## ## ## stopifnot(length(unique(retval)) == 2) rcpp-0.11.0/inst/doc/Rcpp-unitTests.Rnw0000644000000000000000000000466412273452733014563 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-unitTests} %\VignetteKeywords{R,Rcpp,unit tests} %\VignetteDepends{Rcpp} \usepackage{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ <>= require(Rcpp) prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") library(RUnit) @ \usepackage[colorlinks]{hyperref} \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{\textbf{Rcpp}: Unit testing results} \date{Rcpp version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \section*{Test Execution} <>= pkg <- "Rcpp" if( Sys.getenv( "TRAVIS" ) == "true" ){ writeLines( "not running any tests as part of checking the vignette when doing continuous integration with travis" ) } else { ## Check the environemnt variable to see if all tests should be run if (Sys.getenv("RunAllRcppTests") != "yes") { writeLines("The environment variable 'RunAllRcppTests' was not set to 'yes', so skipping some tests.") } if (file.exists("unitTests-results")) unlink("unitTests-results", recursive = TRUE) dir.create("unitTests-results") path <- system.file("unitTests", package=pkg) testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), dirs=path) tests <- runTestSuite(testSuite) err <- getErrors(tests) if (err$nFail > 0) stop(sprintf("unit test problems: %d failures", err$nFail)) if (err$nErr > 0) stop( sprintf("unit test problems: %d errors", err$nErr)) printHTMLProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.html", pkg)) printTextProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.txt" , pkg)) if (file.exists("/tmp")) { invisible(sapply(c("txt", "html"), function(ext) { fname <- sprintf("unitTests-results/%s-unitTests.%s", pkg, ext) file.copy(fname, "/tmp", overwrite=TRUE) })) } } @ \section*{Test Results} \begin{verbatim} <>= results <- "unitTests-results/Rcpp-unitTests.txt" if (file.exists(results)) { writeLines(readLines(results)) } else{ writeLines("Unit test results not available") } @ \end{verbatim} \end{document} rcpp-0.11.0/inst/doc/Rcpp-modules.pdf0000644000000000000000000052414312273452733014233 0ustar %PDF-1.5 % 113 0 obj << /Length 3301 /Filter /FlateDecode >> stream x[ V^cmrI[q#-+ ZJݱDN().Cܙ7C^87ﯮ/>R:1XoF4dD25'*F׳eY˟)ĈJh$4E@}NX0i'ެ&/$H3{1-ҺCܵ'fHUj\^cMNUޛ)1pK\(a ΫwV׳YVLVYdXq\]r4_)TG.d=B$ 9)v7%$YUCQv萒iq\QMUZ{C*B[&`T$2Ibb4D<뿜MN hӂ#:$E8)k^wPΘS,&W4teܪ`oPhp:۝Y[Miod2]0pOX s'm ]q\C؀ZZ7(<,TJB1<t(a`uqJ;ʊaWL KR N}6lO<[ S|&i22ޔ nrnǛl&z|{#WeY7C<8bL%'G$ *)Ie $1B Qu;j/\Qw鼶{o3%UjQ7EvyQ/r6lX!dD6I!E]>v]yDqI/EhKg!U^iKvr{^<HLPA6ӧEv' K"<6E93iTӍM rGOJ6Xl[ lck3iUs;{t(h grUJ ۙA,b\O WKćt4FWtfL߳~ b$;fg1*,`"O9wm:5U1ReRV b;3p~lX,WUNOpq/޲m,wK @Y0,Kdڬ0PVﶤItxڐՓhO;?WyvQ ޲I] .>L:ͪZcX?#8wPww;k|4Lx%%VWgY5Rڀkt:dhUUQ>|8ó Q K>/~)pO}$Ff)_sEB(ܕU%;"DF% U"nj'<;+zZӒ`FULn~l=ZMwD^_a(c%8NgάWLM.mj5,m[ǜһ3৪:ǣhWrROfO)w,.IP!=RX)x)rgQ0ns LЦy9-Ӥ:hOzHΝɸw}u2>~@?#D?;io!!f fM]) Dߌa*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Ȫ endstream endobj 258 0 obj << /Length1 812 /Length2 1128 /Length3 0 /Length 1696 /Filter /FlateDecode >> stream xuRkTSg%hYV§1 8 5(GPP\r&7@R ҂ 2Ph *e -c\(EWET H vZ9c}X$sp`rX .XH0?b@r 0D -  1ATo FD%FeBKy2gl,WbC@ 'P١8`,r16aB% T$-@a9 0$%٘f-Sh0Tw$U/!F$R8ct0R!*X")H |q0\7 ^ 0X\%m^2+]D$ rPM%OMF\X`p,J"$r[[ Rc['aB#_&$ ޏ )K_Ťa9!q C>W40=9zz'R0F,}Mr? y7V"j\-+9ұ+IkyayG?A봭bgX*妛*=[ܑ ùo9l|7ܳWr~xX~)O[R5c׶ET۰=-A٠m(9uHo? Ǫ\5rGYV_T?ԼѹRNкWfǧU~r^zsҴkhX*kB<|V.*>fZ+|,ƭ7\@}(顗 CeIN?y9^XbC{~bDH>lMTxVNň.pRZWO#n܀E?{MXmy58؃&_TJ\ɞI;\cts߷ܼjd `qe?[oŌc>ߗ8݊\Y=G*iFn)ܕeL=m'/r.8s/6<:0<.:u}ZD;:FE5%5rs7-';%\=^SfM$M}zm@vInZbP6Fn3nvb{tt?ӭķX"svK?v|flsὃӔꐙ `~*yf&.[\˛E?7}w-Ej?v/V^";guq{&ۦ8 endstream endobj 260 0 obj << /Length1 844 /Length2 1133 /Length3 0 /Length 1715 /Filter /FlateDecode >> stream xڅRyTVOӣ"*GO  K"k$ NI20LB2a@q#lR@| "Tly,E.(TRE(Ӗ?:KA R1ao48E= tEH iY`+BGbؕ ] `bPFfePDsyF&DUj*_ 8 A4( 8> UB)GL&(c>G\$b}N ~F$R+_b29 l1·HEp𻜚Ţ>F@jّp@ 56l`ƚcU֩wnn'# FȀ  *GOE. 0J?a Ԑ @Pf S<"D|rGJ`Rߝϕ!̫Xb@ A}@y=7VĂ,JFB rR-bQ4UݓϜ%/5N{[:nvno/fy,a.K:UA}-A,n"eW>T#AzY'ǢFoݣcToKΙ:'vuC{ݖڛg6 KweDVb׈Z#zݴ_ظ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EbލB>eȄWmY9Ey:b[CĜx!ˉWQp`!ҷp|=gl? qӅޥQR&TJEK'gImupػ}:~?[z>Nxv۸|OG~J 5K2Oa>Eڿ6;[6t'FOK6t?Cm+7!+A~ *784yaT:7ҀL"cv3$b|՜gcBFaa(D5"s8VPObxa]w7az*7X85ipr5Zd$˖Fqvݿ2O gfZبZU:ltqVhEw{VPmU7YuɓMasY7;WqBT~ѻȯ&q,zAwxHb 蓸{VZxU=ާO v0SN'n8ޘ&dz++eŨFTgTg.SO< %3{p6kWyykvy"״Չz$z+91_>tӃ6*“E0-洎=Ӫp  q#zBiZ.NL5Ω%4lxH"0bJo\\dt"b)iqu@Ќ41r EKP;e7.4ZpX{eJoR$}ZF !|йY/hQ ?)T9[|BTN^4౨%R8hd$zzOYJb!)#bVd/U,i,T}E*10q[6-C-U*iY!R-38gc / (# z([:)مE!vX=pbju9W(YdARO6 b mڂM#XBQo%h;cA(]s1:F5MS(NmLO͛b?qiDDE#;-k?Mo@qb?_E?}*GC^`EY*y)˜"#ZNk) P|ԁsKzpb~1hN/3]K@B˙aJqLXJ\)+Xh>qMKK !i|]R>h{89Ў{19J#hGPEށ"u=G]<~jz`>JKs5j^m9 C'4'l;R˹pԕJc0^|QoO>v4*S*c7(ԢG)h7!j4kvT4+ZDе#ZA\DfE4tǽQ>uQ}roTx=_߹$Zj7B &]QC=zW9k}C1E/7~􂷉8`&"\r_IM}f4/uyfpqv_7k{_~h.d/Z"Wp7Svɯ@j<IX,U TC[}ZVUI(bRC-BDr v!avy>q}>#P"' &GPȻFM?nbo*Ͼqѕ endstream endobj 283 0 obj << /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.14)/Keywords() /CreationDate (D:20140202082723-06'00') /ModDate (D:20140202082723-06'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 266 0 obj << /Type /ObjStm /N 48 /First 396 /Length 1445 /Filter /FlateDecode >> stream xڝXn8}Wµ8En$8b胒 ,h~"P2 Dq83gFcrF(HB%>Pf+D=)|mF+HEh+| uf jN4AH&: PPAB1"m Дj&@=KQ(E8GиRC@9!2d '%TSl>-H`q)$@V&P @ XeHmtdTR>'\a&)>4`Z9޾WK2_l\ i6?,Ҟ>:2Y}\67걭ט’^Z7}Fs7 ]ݶ rw/~q_'ϊVwa]W Pr,\we-~?\$,IǰU{"z`@/vۗ `\I !~8g[,Idb'2âJ+l~Top.ɎiuېMWҭUP*ʮo8_}*׹__s1d ӑc'v+28LzRL Ŧ]V+kpօ6=#a.Kb<bMEi'y\KgʂiTy+`Ѧ?~x~`৷tp%-q"=nTR URI.J'yR&;y\wAw`>p*aGm8X(X(AK$XywXBR&@2| kBCM&.H4s&xhC7UUW'Ybg`Vِվk:0hN5T}ר{lh|DJHZv)ASRLq)A<Ӊ鮡7PXy1+T3CʪDM(Ĝx(q}3[ź#`/uӔͪAl!z>eb+Ф]2eLEƄ8:ᓘkA :WmMN?2\%H~^_|`p_?EnFT $-zaq ] /Length 684 /Filter /FlateDecode >> stream x%9OAMQw?eE@\@Q67}SA,- Ƃ‚@1&67vcb?X[X'=3̝s&dn-&FQ@k@`^uZP6jPhx|cx Rp/$^^e4Q)ZݢU Ҩ: z<*Hn(T.^#է 8ׄcxxu۷Rwk2RS7륦ݟq{-5ԜnyR z==ZOjӳuOyz^ ) ZzZMU/;AtMɛ endstream endobj startxref 173239 %%EOF rcpp-0.11.0/inst/doc/Rcpp-extending.pdf0000644000000000000000000031363512273452733014552 0ustar %PDF-1.5 % 55 0 obj << /Length 2384 /Filter /FlateDecode >> stream xZ[oF~ aAdnntчHFTIʲ−Hي"`8"\\;v>\#޼Bȣ~-C)w|Py{E>OyO0>jm^i1A<)!yLN#'#-L4wfQ"L9#vXi/7ƃ":z0" b>? Ph(020iXJߋ?=WM\>'1RNZGX8B)'(NjogU]I}hn'Q1B[Ji͋Zwe΅y^Rs=^ =j6@_ƫ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GA=-B{ߦ]t endstream endobj 79 0 obj << /Length 1672 /Filter /FlateDecode >> stream xYo6_!`5/QbVXh>(-WyCœ,َ|4]נ`u''PoQ_9#֐ #i)-I̎^ soPZ THC{*nt[Eno+sFb}g۱2w 9ݲմS- r}GژW%JS{ 'GsXoUV4ZG WVᯍyB(OYSۚgqIYLx6k :9sy1͒;@׊`CB .._mmKF riS'żS&uQVyָ EOE)ޅ [@j6H&jذΐ o$#PGl endstream endobj 83 0 obj << /Length 1510 /Filter /FlateDecode >> stream xY[o6~ϯY/Ym}m [4͆"ɞc;vuC"s΍"ѫ "7.~ ՔDJ#U$ GhxG31H:24z{KAD+(U;HFLJsF=VGr?;j⼣&%ADF3G5i6/$FIe4G2#Bgѻ7C2H``La0a`HP6x7a{020@pG!Cȗfot1VHNnk~=4.{hC9ytEe6J bPAFz&Ӈ(nTsynq M7wjIqO}mzx {N*kT!qO:!:D(b1QyUf0VE_O, vORvpt`>FAs~~ z78 D#NƦ+_a.;p~p>L -1h_^zmx^0-k;M4#.lm>bel~v'~&IS?[eA۵-\ >O/ƭrWpbG WhNj UdaŽJ\AR$J**i(D~h=4NYQ$:Mo{8PWGe1b uAvr)M[ ͋:$iR&@;Q[T؉-" b[Ζ-g"E͗˝֭ He)i2Ψq♅1b=VPC#=)`[&^j~9 VŮ-x (t{n *J +.n#X y@w߿$6~շWNIo9N:Cqc-w~Kom7*sGcq~uB55aV+ba3pl䐀bۂE%|s-EXu^+PU:jF4T=b- ]c GW%d:cS Yz:1Ha&kl8/[$Z!cqev5&q_A$i/\qR/@ [zT)$RjjJh@~2Kp+W)\(lj TUmKȞ=̄gk75y W| 6B^V55i8 U`Q5$ M"hxr@M0(yI*g햃 f=&|eUpĥ}| zCn++Miva%VyBVxY]B)q'oc!>4 endstream endobj 89 0 obj << /Length 2343 /Filter /FlateDecode >> stream xZ[o8~ϯ/2fś$vn@ $<06k"K$P.TNݦ;(XKxx߹8wۓ+\=xKE1A䅂!.7[5 μmc!AFpz'?I#$e(DaŌbM|or51IB0Z[[[ Vfk]A/QT8TC ḓTVbɞm0(& 2MfG! {FV4D,ஔ_b6`?84O g` )xᰑL??ip$Ydf#E#PwA/0= GYD Um@V_~b$!mErsd3:_6Aa_Lp<+dʣcuJK~>A3EC GtwiM|@?hDHcK`"I9HgTP3s]Bn\I m@l " >G Q/ nl0"n2j,ʪ̪cZ"Dcd?jQIve(1r .e !h6oxSGXXRJd-*)j7d4ld7ſvJio|Li OT=27wZR Um12D@ (]ꗲW-z]r|vgDqjm{6:daDǵ\Lz{w!B(c7y vu2003[> Q roR,;3ypN'jZ6rNc~e>/K(PJ_Oc1uݴyW0Y3O++s1&0G1mdOc"@1)"l E |Z- jػ0.C "OU=Uq=u-, l|AGIP_+ӫB*)a!gIT,P2+j0/S&/UIz,R-$2?tGݦ%?y(;&SqoP )V5QS WhX}T@<`^6Ʀ%D׻!|oJUL$ ~!Iɩ~z(DQL]V$C(2D ö׺>e X^abt-V0P'I LnVoqܐlϾMpnU k>X Ug YzYcB, 7IABe!rU;-)\DT]|vSTM=.e>JFP'nvEHjaP:[.z$᪐`O9(r]K`0/m^]Mou0vthZGҹ`>q}B @eΏ=DhLop i K endstream endobj 97 0 obj << /Length 786 /Filter /FlateDecode >> stream xUo0~_GGAaRuӰ$lb=MWUb|ߝ߹$)|_f痹N4V$j S?d$KɪNWI,fc[z6,ehr\mf+tM̕]qu/ʔގnׄ֏_ۢ2]`{iz;L RF#~v> Kytms.4dM]ٮ a!bdNKFt~vv*']Z8 ok86w_1B#}^f?؋6&"26'41|`y 뽭 kU6!GZ)BpSڛPԪ?!Z .B_ Q:J@$l JMfO62sos Ԯh"2E|]kCܹ[ǒhY)`6 ?>?p AN.t}Xj]ߖMLZb>XiΞ/U*da֗m.*3d׻\*܎}UJ)WCjs~JG#M:8n?iߤ:棭9؇m29DWPEM\^f?V endstream endobj 109 0 obj << /Length1 1456 /Length2 10870 /Length3 0 /Length 11871 /Filter /FlateDecode >> stream xڝweT\- ܵ@K 5w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"i٤dLzn|!|C2¼y':"YL-.?1rR€d_y?+,Xdtj8Nl=%@L˪89/24wqqaWlo"ѝ7O~Z_I&e>9ڥ݇.x?JkQ y~ûD2*e14e,l{c(Uyĸ:PrUĸ^jYй:v\9Q{{yu[Fu((㎔;s)VoK1]qj#{K)¦Ha-6ׄ'nIVbiOR!_Vuf ;Zǀ")MrHRK`9Tk8ϕN{!oo_,EƂXߌlj1'ʤ[1<; /\! 'iC~i!F0㧧@M?NI9OTZ- {ZDFqbL# wlyZ\aY4}RE< Cfm>b8{X]aͧ_WW4؆ϧЊv4_] ^4fϾVZdnTs1nhXf=5+sO}JRL柼>}4TeA}8$Z endstream endobj 136 0 obj << /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.14)/Keywords() /CreationDate (D:20140202082720-06'00') /ModDate (D:20140202082720-06'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 128 0 obj << /Type /ObjStm /N 18 /First 135 /Length 636 /Filter /FlateDecode >> stream xڅUn0+H% )T؄*@/Ht}zd`ܙ$H^D $ T-'B[z3 HP0@=Z B!e} Ts>- ILWŗ H-~(fMp3fww 06&yHYJMuXhRylpA'P.$1F#y+h򈆼ki?I '_йi n_Aa٢ekm)qO3HXktCnaXOZЛhCp^<<o$w`%TͽW7郮;;rJȞȈۛ{lZ{@^Tl] t* endstream endobj 137 0 obj << /Type /XRef /Index [0 138] /Size 138 /W [1 3 1] /Root 135 0 R /Info 136 0 R /ID [ ] /Length 336 /Filter /FlateDecode >> stream x2Qsb c1199Ʀ++[켃,mXyEg󫯿}sD5% NImtnRdC;]>)r!LG2lVm9Jgyl"(~:{J`ξ~-2( TCjBЬ"^ I8J8 8+aơZT/}+Ctm!Ыa &`H%L ,J8m",2 $`6T"JҖsҶ7K{K{[K7T-2̩{Lqp΁0s;>Շ`槄W0 endstream endobj startxref 103757 %%EOF rcpp-0.11.0/inst/doc/Rcpp-unitTests.R0000644000000000000000000000405312273452733014206 0ustar ### R code from vignette source 'Rcpp-unitTests.Rnw' ################################################### ### code chunk number 1: Rcpp-unitTests.Rnw:13-17 ################################################### require(Rcpp) prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") library(RUnit) ################################################### ### code chunk number 2: unitTesting ################################################### pkg <- "Rcpp" if( Sys.getenv( "TRAVIS" ) == "true" ){ writeLines( "not running any tests as part of checking the vignette when doing continuous integration with travis" ) } else { ## Check the environemnt variable to see if all tests should be run if (Sys.getenv("RunAllRcppTests") != "yes") { writeLines("The environment variable 'RunAllRcppTests' was not set to 'yes', so skipping some tests.") } if (file.exists("unitTests-results")) unlink("unitTests-results", recursive = TRUE) dir.create("unitTests-results") path <- system.file("unitTests", package=pkg) testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), dirs=path) tests <- runTestSuite(testSuite) err <- getErrors(tests) if (err$nFail > 0) stop(sprintf("unit test problems: %d failures", err$nFail)) if (err$nErr > 0) stop( sprintf("unit test problems: %d errors", err$nErr)) printHTMLProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.html", pkg)) printTextProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.txt" , pkg)) if (file.exists("/tmp")) { invisible(sapply(c("txt", "html"), function(ext) { fname <- sprintf("unitTests-results/%s-unitTests.%s", pkg, ext) file.copy(fname, "/tmp", overwrite=TRUE) })) } } ################################################### ### code chunk number 3: importResults ################################################### results <- "unitTests-results/Rcpp-unitTests.txt" if (file.exists(results)) { writeLines(readLines(results)) } else{ writeLines("Unit test results not available") } rcpp-0.11.0/inst/doc/Rcpp-modules.Rnw0000644000000000000000000007441512273452733014232 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-modules} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, module} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color, alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\code}[1]{\texttt{#1}} \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= suppressMessages(require(Rcpp)) prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{Exposing \proglang{C++} functions and classes with \pkg{Rcpp} modules} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This note discusses \textsl{Rcpp modules}. \textsl{Rcpp modules} allow programmers to expose \proglang{C++} functions and classes to \proglang{R} with relative ease. \textsl{Rcpp modules} are inspired from the \pkg{Boost.Python} \proglang{C++} library \citep{Abrahams+Grosse-Kunstleve:2003:Boost.Python} which provides similar features for \proglang{Python}. } \section{Motivation} Exposing \proglang{C++} functionality to \proglang{R} is greatly facilitated by the \pkg{Rcpp} package and its underlying \proglang{C++} library \citep{CRAN:Rcpp,JSS:Rcpp}. \pkg{Rcpp} smoothes many of the rough edges in \proglang{R} and \proglang{C++} integration by replacing the traditional \proglang{R} Application Programming Interface (API) described in `\textsl{Writing R Extensions}' \citep{R:Extensions} with a consistent set of \proglang{C++} classes. The `\textsl{Rcpp-introduction}' vignette \citep{CRAN:Rcpp,JSS:Rcpp} describes the API and provides an introduction to using \pkg{Rcpp}. These \pkg{Rcpp} facilities offer a lot of assistance to the programmer wishing to interface \proglang{R} and \proglang{C++}. At the same time, these facilities are limited as they operate on a function-by-function basis. The programmer has to implement a \code{.Call} compatible function (to conform to the \proglang{R} API) using classes of the \pkg{Rcpp} API as described in the next section. \subsection{Exposing functions using \pkg{Rcpp}} Exposing existing \proglang{C++} functions to \proglang{R} through \pkg{Rcpp} usually involves several steps. One approach is to write an additional wrapper function that is responsible for converting input objects to the appropriate types, calling the actual worker function and converting the results back to a suitable type that can be returned to \proglang{R} (\texttt{SEXP}). Consider the \texttt{norm} function below: <>= double norm( double x, double y ) { return sqrt( x*x + y*y ); } @ This simple function does not meet the requirements set by the \texttt{.Call} convention, so it cannot be called directly by \proglang{R}. Exposing the function involves writing a simple wrapper function that does match the \texttt{.Call} requirements. \pkg{Rcpp} makes this easy. <>= using namespace Rcpp; RcppExport SEXP norm_wrapper(SEXP x_, SEXP y_) { // step 0: convert input to C++ types double x = as(x_), y = as(y_); // step 1: call the underlying C++ function double res = norm( x, y ); // step 2: return the result as a SEXP return wrap( res ); } @ Here we use the (templated) \pkg{Rcpp} converter \texttt{as()} which can transform from a \texttt{SEXP} to a number of different \proglang{C++} and \pkg{Rcpp} types. The \pkg{Rcpp} function \texttt{wrap()} offers the opposite functionality and converts many known types to a \texttt{SEXP}. This process is simple enough, and is used by a number of CRAN packages. However, it requires direct involvement from the programmer, which quickly becomes tiresome when many functions are involved. \textsl{Rcpp modules} provides a much more elegant and unintrusive way to expose \proglang{C++} functions such as the \texttt{norm} function shown above to \proglang{R}. We should note that \pkg{Rcpp} now has \textsl{Rcpp attributes} which extends certain aspect of \textsl{Rcpp modules} and makes binding to simple functions such as this one even easier. With \textsl{Rcpp attribues} we can just write <>= # include // [[Rcpp::export]] double norm(double x, double y) { return sqrt(x*x + y*y); } @ See the corresponding vignette \citep{CRAN:Rcpp:Attributes} for details, but read on for \textsl{Rcpp modules} which contains to provide features not covered by \textsl{Rcpp attributes}, particularly when it comes to binding entire C++ classes and more. \subsection{Exposing classes using Rcpp} Exposing \proglang{C++} classes or structs is even more of a challenge because it requires writing glue code for each member function that is to be exposed. Consider the simple \texttt{Uniform} class below: <>= class Uniform { public: Uniform(double min_, double max_) : min(min_), max(max_) {} NumericVector draw(int n) { RNGScope scope; return runif( n, min, max ); } private: double min, max; }; @ To use this class from R, we at least need to expose the constructor and the \texttt{draw} method. External pointers \citep{R:Extensions} are the perfect vessel for this, and using the \texttt{Rcpp:::XPtr} template from \pkg{Rcpp} we can expose the class with these two functions: <>= using namespace Rcpp; /// create an external pointer to a Uniform object RcppExport SEXP Uniform__new(SEXP min_, SEXP max_) { // convert inputs to appropriate C++ types double min = as(min_), max = as(max_); // create a pointer to an Uniform object and wrap it // as an external pointer Rcpp::XPtr ptr( new Uniform( min, max ), true ); // return the external pointer to the R side return ptr; } /// invoke the draw method RcppExport SEXP Uniform__draw( SEXP xp, SEXP n_ ) { // grab the object as a XPtr (smart pointer) to Uniform Rcpp::XPtr ptr(xp); // convert the parameter to int int n = as(n_); // invoke the function NumericVector res = ptr->draw( n ); // return the result to R return res; } @ As it is generally a bad idea to expose external pointers `as is', they usually get wrapped as a slot of an S4 class. Using \code{cxxfunction()} from the \pkg{inline} package, we can build this example on the fly. Suppose the previous example code assigned to a text variable \texttt{unifModcode}, we could then do %% DE 21 Sep 2013: there must a bug somewhere in the vignette processing %% as the following example produces only empty lines preceded %% by '+' -- same for 0.10.4 release and current 0.10.5 pre-release %% hence shortened example to not show code again <>= f1 <- cxxfunction( , "", includes = unifModCode, plugin = "Rcpp" ) getDynLib(f1) ## will display information about 'f1' just created @ The following listing shows some \textsl{manual} wrapping to access the code, we will see later how this can be automated: <>= setClass( "Uniform", representation( pointer = "externalptr" ) ) # helper Uniform_method <- function(name) { paste( "Uniform", name, sep = "__" ) } # syntactic sugar to allow object$method( ... ) setMethod( "$", "Uniform", function(x, name ) { function(...) .Call( Uniform_method(name) , x@pointer, ... ) } ) # syntactic sugar to allow new( "Uniform", ... ) setMethod( "initialize", "Uniform", function(.Object, ...) { .Object@pointer <- .Call( Uniform_method("new"), ... ) .Object } ) u <- new( "Uniform", 0, 10 ) u$draw( 10L ) @ \pkg{Rcpp} considerably simplifies the code that would be involved for using external pointers with the traditional \proglang{R} API. Yet this still involves a lot of mechanical code that quickly becomes hard to maintain and error prone. \textsl{Rcpp modules} offer an elegant way to expose the \texttt{Uniform} class in a way that makes both the internal \proglang{C++} code and the \proglang{R} code easier. \section{Rcpp modules} \label{sec:modules} The design of Rcpp modules has been influenced by \proglang{Python} modules which are generated by the \texttt{Boost.Python} library \citep{Abrahams+Grosse-Kunstleve:2003:Boost.Python}. Rcpp modules provide a convenient and easy-to-use way to expose \proglang{C++} functions and classes to \proglang{R}, grouped together in a single entity. A Rcpp module is created in a \texttt{cpp} file using the \texttt{RCPP\_MODULE} macro, which then provides declarative code of what the module exposes to \proglang{R}. \subsection{Exposing \proglang{C++} functions using Rcpp modules} Consider the \texttt{norm} function from the previous section. We can expose it to \proglang{R} : <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod) { function( "norm", &norm ); } @ The code creates an Rcpp module called \texttt{mod} that exposes the \texttt{norm} function. \pkg{Rcpp} automatically deduces the conversions that are needed for input and output. This alleviates the need for a wrapper function using either \pkg{Rcpp} or the \proglang{R} API. On the \proglang{R} side, the module is retrieved by using the \code{Module} function from \pkg{Rcpp} <>= inc <- ' using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod) { function( "norm", &norm ); } ' fx <- cxxfunction(signature(), plugin="Rcpp", include=inc) mod <- Module("mod", getDynLib(fx)) @ Note that this example assumed that the previous code segment defining the module was returned by the \code{cxxfunction()} (from the \pkg{inline} package) as callable R function \code{fx} from which we can extract the relevant pointer using \code{getDynLib()}. In the case of using Rcpp modules via a package (which is detailed in Section~\ref{sec:package} below), modules are actually loaded differently and we would have used <>= require(nameOfMyModulePackage) mod <- new( mod ) mod$norm( 3, 4 ) @ where the module is loaded upon startup and we use the constructor directly. More details on this aspect follow below. A module can contain any number of calls to \texttt{function} to register many internal functions to \proglang{R}. For example, these 6 functions : <>= std::string hello() { return "hello"; } int bar( int x) { return x*2; } double foo( int x, double y) { return x * y; } void bla( ) { Rprintf( "hello\\n" ); } void bla1( int x) { Rprintf( "hello (x = %d)\\n", x ); } void bla2( int x, double y) { Rprintf( "hello (x = %d, y = %5.2f)\\n", x, y ); } @ can be exposed with the following minimal code: <>= RCPP_MODULE(yada) { using namespace Rcpp; function("hello" , &hello); function("bar" , &bar ); function("foo" , &foo ); function("bla" , &bla ); function("bla1" , &bla1 ); function("bla2" , &bla2 ); } @ which can then be used from \proglang{R}: <>= require( Rcpp ) yd <- Module("yada", getDynLib(fx)) yd$bar(2L) yd$foo(2L, 10.0) yd$hello() yd$bla() yd$bla1(2L) yd$bla2(2L, 5.0) @ In the case of a package (as for example the one created by \code{Rcpp.package.skeleton()} with argument \code{module=TRUE}; more on that below), we can use <>= require(myModulePackage) ## or whichever name was chose bar(2L) foo(2L, 10.0) hello() bla() bla1(2L) bla2(2L, 5.0) @ The requirements for a function to be exposed to \proglang{R} via Rcpp modules are: \begin{itemize} \item The function takes between 0 and 65 parameters. \item The type of each input parameter must be manageable by the \texttt{Rcpp::as} template. \item The return type of the function must be either \texttt{void} or any type that can be managed by the \texttt{Rcpp::wrap} template. \item The function name itself has to be unique in the module. In other words, no two functions with the same name but different signatures are allowed. C++ allows overloading functions. This might be added in future versions of modules. \end{itemize} \subsubsection{Documentation for exposed functions using Rcpp modules} In addition to the name of the function and the function pointer, it is possible to pass a short description of the function as the third parameter of \texttt{function}. <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod) { function( "norm", &norm, "Provides a simple vector norm" ); } @ The description is used when displaying the function to the R prompt: <>= mod <- Module("mod", getDynLib(fx)) show(mod$norm) @ \subsubsection{Formal arguments specification} \texttt{function} also gives the possibility to specify the formal arguments of the R function that encapsulates the C++ function, by passing a \texttt{Rcpp::List} after the function pointer. <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod_formals) { function("norm", &norm, List::create( _["x"] = 0.0, _["y"] = 0.0 ), "Provides a simple vector norm"); } @ A simple usage example is provided below: <>= norm <- mod$norm norm() norm( y = 2 ) norm( x = 2, y = 3 ) args( norm ) @ To set formal arguments without default values, simply omit the rhs. <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod_formals2) { function("norm", &norm, List::create( _["x"], _["y"] = 0.0 ), "Provides a simple vector norm"); } @ This can be used as follows: <>= norm <- mod$norm args(norm) @ The ellipsis (\texttt{...}) can be used to denote that additional arguments are optional; it does not take a default value. <>= using namespace Rcpp; double norm( double x, double y ) { return sqrt( x*x + y*y ); } RCPP_MODULE(mod_formals3) { function( "norm", &norm, List::create( _["x"], _["..."] ), "documentation for norm"); } @ <>= norm <- mod$norm args( norm ) @ \subsection{Exposing \proglang{C++} classes using Rcpp modules} Rcpp modules also provide a mechanism for exposing \proglang{C++} classes, based on the reference classes introduced in R 2.12.0. \subsubsection{Initial example} A class is exposed using the \texttt{class\_} keyword. The \texttt{Uniform} class may be exposed to \proglang{R} as follows: <>= using namespace Rcpp; class Uniform { public: Uniform(double min_, double max_) : min(min_), max(max_) {} NumericVector draw(int n) const { RNGScope scope; return runif( n, min, max ); } double min, max; }; double uniformRange( Uniform* w) { return w->max - w->min; } RCPP_MODULE(unif_module) { class_( "Uniform" ) .constructor() .field( "min", &Uniform::min ) .field( "max", &Uniform::max ) .method( "draw", &Uniform::draw ) .method( "range", &uniformRange ) ; } @ <>= ## assumes fx_unif <- cxxfunction(...) has ben run unif_module <- Module( "unif_module", getDynLib(fx_unif ) ) Uniform <- unif_module$Uniform u <- new( Uniform, 0, 10 ) u$draw( 10L ) u$range() u$max <- 1 u$range() u$draw( 10 ) @ \texttt{class\_} is templated by the \proglang{C++} class or struct that is to be exposed to \proglang{R}. The parameter of the \texttt{class\_} constructor is the name we will use on the \proglang{R} side. It usually makes sense to use the same name as the class name. While this is not enforced, it might be useful when exposing a class generated from a template. Then constructors, fields and methods are exposed. \subsubsection{Exposing constructors using Rcpp modules} Public constructors that take from 0 and 6 parameters can be exposed to the R level using the \texttt{.constuctor} template method of \texttt{.class\_}. Optionally, \texttt{.constructor} can take a description as the first argument. <>= .constructor("sets the min and max value of the distribution") @ Also, the second argument can be a function pointer (called validator) matching the following type : <>= typedef bool (*ValidConstructor)(SEXP*,int); @ The validator can be used to implement dispatch to the appropriate constructor, when multiple constructors taking the same number of arguments are exposed. The default validator always accepts the constructor as valid if it is passed the appropriate number of arguments. For example, with the call above, the default validator accepts any call from R with two \texttt{double} arguments (or arguments that can be cast to \texttt{double}). TODO: include validator example here \subsubsection{Exposing fields and properties} \texttt{class\_} has three ways to expose fields and properties, as illustrated in the example below : <>= using namespace Rcpp; class Foo { public: Foo(double x_, double y_, double z_ ): x(x_), y(y_), z(z_) {} double x; double y; double get_z() { return z; } void set_z( double z_ ) { z = z_; } private: double z; }; RCPP_MODULE(mod_foo) { class_( "Foo" ) .constructor() .field( "x", &Foo::x ) .field_readonly( "y", &Foo::y ) .property( "z", &Foo::get_z, &Foo::set_z ) ; } @ The \texttt{.field} method exposes a public field with read/write access from R. \texttt{field} accepts an extra parameter to give a short description of the field: <>= .field( "x", &Foo::x, "documentation for x" ) @ The \texttt{.field\_readonly} exposes a public field with read-only access from R. It also accepts the description of the field. <>= .field_readonly( "y", &Foo::y, "documentation for y" ) @ The \texttt{.property} method allows indirect access to fields through a getter and a setter. The setter is optional, and the property is considered read-only if the setter is not supplied. A description of the property is also allowed: <>= // with getter and setter .property( "z", &Foo::get_z, &Foo::set_z, "Documentation for z" ) // with only getter .property( "z", &Foo::get_z, "Documentation for z" ) @ The type of the field (\textbf{T}) is deduced from the return type of the getter, and if a setter is given its unique parameter should be of the same type. Getters can be member functions taking no parameter and returning a \textbf{T} (for example \texttt{get\_z} above), or a free function taking a pointer to the exposed class and returning a \textbf{T}, for example: <>= double z_get( Foo* foo ) { return foo->get_z(); } @ Setters can be either a member function taking a \texttt{T} and returning void, such as \texttt{set\_z} above, or a free function taking a pointer to the target class and a \textbf{T} : <>= void z_set( Foo* foo, double z ) { foo->set_z(z); } @ Using properties gives more flexibility in case field access has to be tracked or has impact on other fields. For example, this class keeps track of how many times the \texttt{x} field is read and written. <>= class Bar { public: Bar(double x_) : x(x_), nread(0), nwrite(0) {} double get_x( ) { nread++; return x; } void set_x( double x_) { nwrite++; x = x_; } IntegerVector stats() const { return IntegerVector::create(_["read"] = nread, _["write"] = nwrite); } private: double x; int nread, nwrite; }; RCPP_MODULE(mod_bar) { class_( "Bar" ) .constructor() .property( "x", &Bar::get_x, &Bar::set_x ) .method( "stats", &Bar::stats ) ; } @ Here is a simple usage example: <>= Bar <- mod_bar$Bar b <- new( Bar, 10 ) b$x + b$x b$stats() b$x <- 10 b$stats() @ \subsubsection{Exposing methods using Rcpp modules} \texttt{class\_} has several overloaded and templated \texttt{.method} functions allowing the programmer to expose a method associated with the class. A legitimate method to be exposed by \texttt{.method} can be: \begin{itemize} \item A public member function of the class, either const or non const, that returns void or any type that can be handled by \texttt{Rcpp::wrap}, and that takes between 0 and 65 parameters whose types can be handled by \texttt{Rcpp::as}. \item A free function that takes a pointer to the target class as its first parameter, followed by 0 or more (up to 65) parameters that can be handled by \texttt{Rcpp::as} and returning a type that can be handled by \texttt{Rcpp::wrap} or void. \end{itemize} \paragraph{Documenting methods} \texttt{.method} can also include a short documentation of the method, after the method (or free function) pointer. <>= .method("stats", &Bar::stats, "vector indicating the number of times x has been read and written" ) @ TODO: mention overloading, need good example. \paragraph{Const and non-const member functions} \texttt{method} is able to expose both \texttt{const} and \texttt{non const} member functions of a class. There are however situations where a class defines two versions of the same method, differing only in their signature by the \texttt{const}-ness. It is for example the case of the member functions \texttt{back} of the \texttt{std::vector} template from the STL. <>= reference back ( ); const_reference back ( ) const; @ To resolve the ambiguity, it is possible to use \texttt{const\_method} or \texttt{nonconst\_method} instead of \texttt{method} in order to restrict the candidate methods. \paragraph{Special methods} \pkg{Rcpp} considers the methods \texttt{[[} and \texttt{[[<-} special, and promotes them to indexing methods on the \proglang{R} side. \subsubsection{Object finalizers} The \texttt{.finalizer} member function of \texttt{class\_} can be used to register a finalizer. A finalizer is a free function that takes a pointer to the target class and return \texttt{void}. The finalizer is called before the destructor and so operates on a valid object of the target class. It can be used to perform operations, releasing resources, etc ... The finalizer is called automatically when the \proglang{R} object that encapsulates the \proglang{C++} object is garbage collected. \subsubsection{S4 dispatch} When a \proglang{C++} class is exposed by the \texttt{class\_} template, a new S4 class is registered as well. The name of the S4 class is obfuscated in order to avoid name clashes (i.e. two modules exposing the same class). This allows implementation of \proglang{R}-level (S4) dispatch. For example, one might implement the \texttt{show} method for \proglang{C++} \texttt{World} objects: <>= setMethod( "show", yada$World , function(object) { msg <- paste( "World object with message : ", object$greet() ) writeLines( msg ) } ) @ TODO: mention R inheritance (John ?) \subsubsection{Full example} % TODO: maybe replace this by something from wls or RcppModels ? The following example illustrates how to use Rcpp modules to expose the class \texttt{std::vector} from the STL. <>= typedef std::vector vec; // convenience typedef void vec_assign( vec* obj, Rcpp::NumericVector data ) { // helpers obj->assign( data.begin(), data.end() ); } void vec_insert( vec* obj, int position, Rcpp::NumericVector data) { vec::iterator it = obj->begin() + position; obj->insert( it, data.begin(), data.end() ); } Rcpp::NumericVector vec_asR( vec* obj ) { return Rcpp::wrap( *obj ); } void vec_set( vec* obj, int i, double value ) { obj->at( i ) = value; } RCPP_MODULE(mod_vec) { using namespace Rcpp; // we expose the class std::vector as "vec" on the R side class_( "vec") // exposing constructors .constructor() .constructor() // exposing member functions .method( "size", &vec::size) .method( "max_size", &vec::max_size) .method( "resize", &vec::resize) .method( "capacity", &vec::capacity) .method( "empty", &vec::empty) .method( "reserve", &vec::reserve) .method( "push_back", &vec::push_back ) .method( "pop_back", &vec::pop_back ) .method( "clear", &vec::clear ) // specifically exposing const member functions .const_method( "back", &vec::back ) .const_method( "front", &vec::front ) .const_method( "at", &vec::at ) // exposing free functions taking a std::vector* // as their first argument .method( "assign", &vec_assign ) .method( "insert", &vec_insert ) .method( "as.vector", &vec_asR ) // special methods for indexing .const_method( "[[", &vec::at ) .method( "[[<-", &vec_set ) ; } @ <>= ## for code compiled on the fly using cxxfunction() into 'fx_vec', we use mod_vec <- Module( "mod_vec", getDynLib(fx_vec), mustStart = TRUE ) vec <- mod_vec$vec ## and that is not needed in a package setup as e.g. one created ## via Rcpp.package.skeleton(..., module=TRUE) v <- new( vec ) v$reserve( 50L ) v$assign( 1:10 ) v$push_back( 10 ) v$size() v$capacity() v[[ 0L ]] v$as.vector() @ \section{Using modules in other packages} \label{sec:package} \subsection{Namespace import/export} \subsubsection{Import all functions and classes} When using \pkg{Rcpp} modules in a packages, the client package needs to import \pkg{Rcpp}'s namespace. This is achieved by adding the following line to the \texttt{NAMESPACE} file. <>= options( prompt = " ", continue = " " ) @ <>= import( Rcpp ) @ The simplest way to load all functions and classes from a module directly into a package namespace is to use the \code{loadRcppModules} function within the \code{.onLoad} body. <>= .onLoad <- function(libname, pkgname) { loadRcppModules() } @ This will look in the package's DESCRIPTION file for the \texttt{RcppModules} field, load each declared module and populate their contents into the package's namespace. For example, both the \pkg{testRcppModule} package (which is part of large unit test suite for \pkg{Rcpp}) and the package created via \code{Rcpp.package.skeleton("somename", module=TRUE)} have this declaration: \begin{verbatim} RcppModules: yada, stdVector, NumEx \end{verbatim} The \code{loadRcppModules} function has a single argument \texttt{direct} with a default value of \texttt{TRUE}. With this default value, all content from the module is exposed directly in the package namespace. If set to \texttt{FALSE}, all content is exposed as components of the module. Starting with release 0.9.11, an alternative is provided by the \code{loadModule()} function which takes the module name as an argument. It can be placed in any \code{.R} file in the package. This is useful as it allows to load the module from the same file as some auxiliary \proglang{R} functions using the module. For the example module, the equivalent code to the \code{.onLoad()} use shown above then becomes <>= loadModule("yada") loadModule("stdVector") loadModule("NumEx") @ This feature is also used in the new Rcpp Classes introduced with Rcpp 0.9.11. \subsubsection{Just expose the module} Alternatively, it is possible to just expose the module to the user of the package, and let them extract the functions and classes as needed. This uses lazy loading so that the module is only loaded the first time the user attempts to extract a function or a class with the dollar extractor. <>= yada <- Module( "yada" ) .onLoad <- function(libname, pkgname) { # placeholder } @ <>= options( prompt = "> ", continue = "+ " ) @ \subsection{Support for modules in skeleton generator} The \code{Rcpp.package.skeleton} function has been improved to help \pkg{Rcpp} modules. When the \texttt{module} argument is set to \texttt{TRUE}, the skeleton generator installs code that uses a simple module. <>= Rcpp.package.skeleton( "testmod", module = TRUE ) @ Creating a new package using \textsl{Rcpp modules} is easiest via the call to \code{Rcpp.package.skeleton()} with argument \code{module=TRUE} as a working package with three example Modules results. \subsection{Module documentation} \pkg{Rcpp} defines a \code{prompt} method for the \code{Module} class, allowing generation of a skeleton of an Rd file containing some information about the module. <>= yada <- Module( "yada" ) prompt( yada, "yada-module.Rd" ) @ We strongly recommend using a package when working with Modules. But in case a manually compiled shared library has to loaded, the return argument of the \texttt{getDynLib()} function can be supplied as the \texttt{PACKAGE} argument to the \texttt{Module()} function as well. \section{Future extensions} \label{sec:future} \texttt{Boost.Python} has many more features that we would like to port to Rcpp modules : class inheritance, default arguments, enum types, ... \section{Known shortcomings} \label{sec:misfeatures} There are some things \textsl{Rcpp modules} is not good at: \begin{itemize} \item serialization and deserialization of objects: modules are implemented via an external pointer using a memory location, which is non-constant and varies between session. Objects have to be re-created, which is different from the (de-)serialization that R offers. So these objects cannot be save from session to session. \item mulitple inheritance: currently, only simple class structures are representable via \textsl{Rcpp modules}. \end{itemize} \section{Summary} This note introduced \textsl{Rcpp modules} and illustrated how to expose \proglang{C++} function and classes more easily to \proglang{R}. We hope that \proglang{R} and \proglang{C++} programmers find \textsl{Rcpp modules} useful. \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/inst/doc/Rcpp-introduction.pdf0000644000000000000000000117456712273452733015320 0ustar %PDF-1.5 % 131 0 obj << /Length 3927 /Filter /FlateDecode >> stream xڥZ[~_PH4a>[;p@ $̕ZźU{n3$%ViaErs&G\~zwgFTF{7{iU^h=~ލu6w?;V* &ߍ'>ϳ to=Uwpi_]sgCSR~믇sʴ߷8;dۇY㵪78~bL/FgTm4px{^f8?`si?ҹJ J3h=kgw809rUrԙPˌ8a7f;"oȳ)v\|y"}<^$ھL!&d}<EnH@ tuhVaDV#GWT0TUweJyQo=mCxsӶl%z{&.Y4o.P##-iz"Tct#vz +JX(a,ߛЧEd (K hAu(z`}? ZZVw.՛lm47 @,;=J۴o^ĝƪѨddy^G(ɞ9FnXmio`g < ǐƁ4+#!sʺ°#g^KЭb D%fi/3SA3NuF:!C|}3U,[9dH2!;g \]R|u /E˘\ۺםwyh+0 :`hڰ = bQizpd󕘖P@(8$wU0f; d].X0\.29_0v(%P?r=c|O.k|u V_2Y%(<3\/}u`\USn()ڐLFZdW P,Gכ QK''0x9 $F1=6tVksLVۧ)ߠRzg=4/zٜS Q: D-)O)iuPЌm6{\"6sc?q`,+=*RrV%HYwbz3c_Pu,fϏV7M&R8mU^>7I.BͮZUMf$æM&ϠJ90să7<(ڀl9UNN2[!l[ZW_{ )@><6ڵ ܛRdQ{o,c踋B+"k=/ E};^r'I#f]Im%zâ'@ Z[)#(}=TBHPzGܸo۪kFqʀ% ^AgK"*) ݴqcT@&oF ߝ|2gdWCIn>"֑rA [ʩpz/3.ALSz!PE,b??U#ЫAgC(͞lGƢ[LA gUk<p&oCa2f娴FHݒ[q9H&&/|s; y6qA]}{7f;=Ix5XnzBq1)ŖjbOd=no+0&y69nWR#+tETz'A* 3E/_Jtg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"m¹O3dn<˨ qqvqҏހV^?lӀa87l(X@]Hdh9nj{X6mAL⹦o{%Wu506'Ps endstream endobj 431 0 obj << /Length 117 /Filter /FlateDecode >> stream x31ӳP0P02U06P06W05WH1*24͡Rɹ\N\ \@q.}O_T.}gB4PS,{h 0T0pzrr۵& endstream endobj 435 0 obj << /Length 155 /Filter /FlateDecode >> stream x313R0P0U0S01CB.cI$r9yr\`W4K)YKE!P E ?0? J!DH" @ l%r38 H.WO@.E endstream endobj 456 0 obj << /Length1 1899 /Length2 11933 /Length3 0 /Length 13093 /Filter /FlateDecode >> stream xڍP\ w $Cp %8q䞜{꽚uj[ݻ\UY(Pggqq RSkň@W $\fn2I3W;%G; `ggcpх i(N. k0yYx<,Jfn6@׈f`_.mܜYY===Y]Y] 7:Q0@We,M_r G+7O3 UY\_O;X]r'_Ɗ0 wfNf k H+y1,04:70_ -0{-\-\@Nn, %R@7W?-^98z: V K?twbr9$6y!Y\lll<3ea{Mo'?ů:9:^?f@;ߊ&Dvv% `9 *Zů;?OFemʪI*3U?:qqG//37 ӀT wr(`ǂweY~!yoMH SM66xew׵Pr|]5`ɹ.5&\A^@KU_;xu9U]Ajll{]7 ׉Mnrpc8f..fވJ\_z9VG#V.'7U_ `M<V*8roCl^&ozX5/U{7kt菞Z _ X _c _Vi/| Ƶk/|/|}u } '뿎/|Wn _Sx _k,]\^߸|^@ ąYG Pֻ/bDcB:i̾ .mp܈%u/oJ].=6E|KTky{2WnA/<#A f{vj쐧uvEUǺ+_ V̭T>cT2Cg֍ mf |<#Q,gLJ>+T$Pט#4{)xs1?rx>.&P&xZ,؁E"m1 % .J*5&?Sh$BZ2uvhu0KMh\"AO ,ZɱzX!|}^t"ikJVٔϫxv)$K/< rRzj="swJ8-O Da&\LաJs#U~B 6❖_ N䯟{f}b nqIEw֥6z_vtfɆ~xO6c VZMvjAeVj}} F4xAMw h܈|*%}p}i@-TQ `t?=䵍R&_^;oka")42*]%NꊵWԈKyZ؜mD1<!FngPwă1*oq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_+:i~sɸ!(ϋ|eCsEW5ɫL t]ELW:_"15׊D6+z]=swyG*JrI+ = ki1uR(ޱ }$?++x̑.\5`3V.%3Ҽrĵ͠Ov37x_ cg }&9h/GƲʆNQxL0+.GGKb? endstream endobj 522 0 obj << /Author(Dirk Eddelbuettel, Romain Fran\347ois)/Title(Rcpp: Seamless R and C++ Integration)/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.14)/Keywords(R, C++, foreign function interface, .Call) /CreationDate (D:20140202082737-06'00') /ModDate (D:20140202082737-06'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 488 0 obj << /Type /ObjStm /N 77 /First 676 /Length 3402 /Filter /FlateDecode >> stream xڭZr8}Wm'@HBU;%T--2'!)'nbx;/& t>" =$gpe^(GpU̇Q&B<?07J>bMC>`Cy1& x)@@? Gq=NPpB 9po&*vM7~qH'a) sOQG0p8\C\H`$ .H]l!pHS `J惘!\#< &OU` |$A}/̴@b@xPQE4 Fҗ^$J&/+!)a7SA7̃@>K 5Pb0 Hը F9K,6?k0OG\~hγX"Ty125^_./i*=a-޿_ %(g*}DBgP:"GNV#`K؈Tq,* >Gp>.~!SrH1yE^7䄜3|$Ȝ\+rMnHLFe-I\VH$--N]e D1u4ýXE]c$Z1H|ه'g'& 'kV@EwjӠ?S)|@hՊfO~~^~=Qm/g}}yxfNt9vѯ zVjî{ͯ9c?#73VCpPs3D?{wWwW\88rT >xrsr~}qmEx-Ϙ^f>whkOg,7f]^Fڅ ޞ\pzѽGӱ?qxٜ\W_܅-xt>7o=xUψꣳAǦwxKM[ܛ̸eRZ4Q:W۫ x9,NJ,S^Yl ΥþPna,X0c$jak",B⧃ U gN7 0|R0O5&pP-BWZ6DLM{kNzcc=cջz(7-7 ;#|@rjxrAUq,+M\Q%E>ݣʡzԈ|"5DɣF03N8ai8" gЖ?t@H0A h IRv6( 9ƭ?5zˮ޻ t(%.w(w-È.6[=ôEaph t 95ٝ yW{֮Q7r3'krFn&XO(n)h.hHA#xr/^Ϋ^x.ϫ,ذA Vn#Hh&q'}R4 -+XA6 a!Olq n~EdU/pZ/bxԵc/GxYU$tYܢ"N_I26Ґo.h1.O0m&Ae\ /zƕ4-⛑ ]ERݯMQ "*@Cc +4S~,./qЖzIiDcr,Af SZH|^_Kw۲ɺ?~plH r/!F(%/>#a  micTi)7k AF0=m_qY|'B_3NÉu- %j%9Az~秿.K\n5IschOjIA@=¬"z~|re5>VLXu[TC ]d7to|U5}\XۻXV&-<&XzcD32;X,:dy?lfIV&K (tq%&E^;Dgf8`IDr t1VUn+ S97{j v3g0߮Cp  2II^X#W)u(u>ٷ:.jVWN!4Ğ1-Żj!>x'>8Ts8Y˶IlE4)`$[b7X&T) y/;\04P#Qm I׎F vWn߭lkaFRО n!8.&D+,tzW6pi*gSZѴaRBDk]ny[@.ʘwpl̑7:7wu5*/J>↷ `;;zkc\9v96!BGiƽ~KU v@g}zQz/%Pa)^e} mvqk15,i͑ ''=TJР֬i/3ю]X3{WqF?,~k}5'B%W#ǍΦ&2'!Rg endstream endobj 523 0 obj << /Type /XRef /Index [0 524] /Size 524 /W [1 3 1] /Root 521 0 R /Info 522 0 R /ID [<9E09E369448969DEBDFB47FBE5E16973> <9E09E369448969DEBDFB47FBE5E16973>] /Length 1239 /Filter /FlateDecode >> stream xoUU:R -(Zʻ-P]hyJóI'dh&FG&N}_^}^EQEQVtDJPUԁlAh;NvݠOsD`O Y{>rM0&8H^raA\Np%r QrWȝfx 'w)'Irw7>9=IZ<',Jcfe JV!K[iiE4I_ц+~ļ r )d0lf ,$/Z -*Nfs!ݐ5x:Xk, /J3ȪY@uubcSfF1h @_]@Xһg Ql<Or(6T?48@A?2]31_@d6e=9JUx?ƓT;wIufәs%J(lBz%uz+F"QF$饃ɬx)X:[jMàݬNH*](8AYz88 43N !cPpER.@g"}I)ti:nuYE߸ ЋkRn0rr'M,̮8x TlE+V|U~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]!IyDU IҁkWdFV!SZ6yEVEz(-Lj]Al]A*ZXVi[ =kc:ga+gJYfQ~kwȩy<Qdzΐ`Hg Q#zNkӂf*xi NKRle'}FuVbVGA@2fS3Ndcl .;YSUoP&ov7'i;6 >(DE t1MI5xBŽ6CW‰n1ze嶙Z&YҲKZqnȈN2e̹͗VK3԰٩[Cvȫ-Eƥ \6Oƺ$cB&Gum$ZMiMWa'Zfg7h6ڹxC"CoCk: SE7jKEHUrTLNEuPiUzU]ُU]ُU]ىnj(;]ʼn-iZV,s+giqͽ{`!M/1pSÇKU/L]cLNPMe%"KH6ykhlʲd *glA B iW4Hze: >L"mZAI LKЙo@:;CY 7eyy2Žr4vZ;ʁZu9[o]Jw 8tІdYSVvk;[EM MtGķ}~lCHIl׈Qe媶Uo6UTUGUێܧjN_ N_2m endstream endobj 229 0 obj << /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.14)/Keywords() /CreationDate (D:20140202082713-06'00') /ModDate (D:20140202082713-06'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 226 0 obj << /Type /ObjStm /N 3 /First 20 /Length 169 /Filter /FlateDecode >> stream x5N 07֡=-P_l;TH}/)w l14.ayQ^ 5'5(Kʪn2ۍlcI5+ {||' uMt<[u=7=tn%)6q < endstream endobj 230 0 obj << /Type /XRef /Index [0 231] /Size 231 /W [1 3 1] /Root 228 0 R /Info 229 0 R /ID [<6A722FFE236C0B32B308B7965A0ABD6C> <6A722FFE236C0B32B308B7965A0ABD6C>] /Length 558 /Filter /FlateDecode >> stream xsMa>KA&+JD#FPQD?Y f4:3*3QQP䷚߬7߹gu""Ed̽ T*tր<:PFnփw lxsz \śEm[5\ǛA5mQӨ`B5]b7h x<O8'J-7v1cjÞ󥬪˨.٣Ԣ4Mx:sS4QXVJIB/V|65cG "Zh4B4B4B4B4B4BDUҝUOƯ+ѲUwr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4W9P] 1K?-R0' P\rߦ8$-7Cݬxř 5>O{E1GUƦϞ-S.-A0-\e Wfuy^ϛ+z'±l%~kwX %ؚUթ5u gNҶM6Ẅgg;S-.?yӞ85q38˞1iXkAZ39y~U_f/:8^n6c$U.3d2L\2r8%E{. 1g'~.?<0-A1(2Cfv2 q>_tXxm3) k,( c;ƬS%:6#06̳XbswXOR;Ve,Z5՞96{{Wvk rƶuȲt ʼny W endstream endobj 189 0 obj << /Length 1223 /Filter /FlateDecode >> stream x]o6ݿ )nMb@3o/iTGq ؒ'9ίId b'5 ZDwAcDЧ)/#9G.Edžh4ξt>#@7a5*H09Q@Ĕ FB"f<ֱDXcIBQL.9b7yTi7XRˑ֞߇HdT9fL!W.3}9*#)\+78Lu8ZIjo {]\7 3eFQ@8J79wm-@@A= hq~ na=6tBͲj(ºBdž6x;O4QZuԧgF95c(k4- mo)JxQ8m`/DW0rfӫq*ʻ 0H|Lct;>=A-Lk(fКqE1a-^ ~u h*ӧTWTrAb櫟ZaSZpWWX ,}<sUX#gk*jN`)/d| endstream endobj 193 0 obj << /Length 2577 /Filter /FlateDecode >> stream x[o&fM-w(+ -dQCvܿ>eQ0h53ppϿ|C0A]F=zuG^  NSF>!8hcd x,v\79ssċ!"x +٭*dbB*Ϲim#c؜ϻvOApO{!A*G2[AMtR!>{B g|"s+˨HmҎPSH`Â*ބSk.XMxG9L5I9 `!{^2&Xp͞^M6 v)ˠp=3޼)|j.6g^.:,1e lBc]a8Knݩ2ʫGM?䤬bv;!٦CghsUI(o؊+=L?/JU3{VgucԱ U)S'6ۄ0Zf#o67ZP즃(Dh4(C@#c-~8!ptҮlOw *lh(*W^yQ+_C|X `9&oH*\2/_9ܷ"R" p ?KS)}+?KJ{M=g4ͣIg72 x훛[E{Ǎk?(ac fq˦zޓ7$ endstream endobj 197 0 obj << /Length 2553 /Filter /FlateDecode >> stream x[Ys8~<<ݚI־l3/-C2(R)ʯex(`h45A,;˳?1*4y,HY$ e20ɪ)O&v˲])O?o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TEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 273 0 obj << /Type /ObjStm /N 64 /First 541 /Length 1844 /Filter /FlateDecode >> stream xڭYn8}W5%( $i6{l't0-CR璒%J@ w="4ˆ"Z "#.)<)TS"%<J#Jc('­A,@e*^M16X  (AAEMË#B$TRfmrkcp@!0Ȁ$S,fQ [j) S&HjĈ9bJ Q c ≠ሃV8I&GPS ȡtF60eP'hܲ6, jň*9U Jĥx^ J[ l@!m %L tAD@ -?mb49Kh2{^VHF(M.nN8].Fc?fɦH3 m $ k &Q~Ms=]?d>74]E2>2P]nf/EL+Q.Χ]Ƴe.!0.F.}Dyo糛xh2ow_!|Np 4g5bK/O?}?;uCW/?ߝ\E3Mndcwr(/WgL;c01]_>`ꁤO3C]"Ȥ.)Gp@[qH9ETO]> nxX1eJir0Zۃ+rn^e~=TLe ڲ3Mr,a4>3kqHמvr`]? w M(: ¨HPDB! P8! @(Ўh-IvЎh-qv\n¬WMMiT-/$7?7uM0gh]m F50flP(=,CA:ŧMU5 {2٨&\ z02]քK:-ZL F3ƧCY? kVܟ"0ƼP}yb^S(f><@q 0ťgf dsN:562'p#jvΆZ `R p(UNfm염^l8쎁M`'֖B=pmpuc8-7I;E*?!a<^mQ_Eҧ,ZkZyL ()Ueh,ulV{O>=2a>0 0 L6& H/1 P?0bX)-Y 0Y`۪ e1I d/kނ`ނ`Zނ`i`Acvb*wxE9EgZۢIzK: e}Zmj }?nl 0IQHU:!-^.fꬒ꺩TWQZ&5^cz:$*e4*Ú+MwXrF_*]ē <9066D11F21C1D0DA16DC40DAD4D14E6B>] /Length 671 /Filter /FlateDecode >> stream xRQF,0l("n0.ȾWU&f$wdi(KNu.wmf/%sk,38;D #- JA9{7IE\ n4*p~JPnV\*qIW%́\4Ჸk͠W&̓V\wh5H/+\'i;qDI?#_$Dщ2pTPT׍^'5D?NipzQ0jip#8=čx4q8b&qt+́yNm\q8:Fx x x x ^-7 ~M@#_$ܯ52Qf(((-(#(-*T{`Wڶ['qȥ%̜B VRU)QFNq%ǫn&naf-4 ft#@{ 8vu f-4AM9F/4n'4Mj<Ŝo:Lσ 44Z6hmX7}Un_mV^WSю뜢]ӌ=?}QtCO~SO5Z&me кh?,`Sqb endstream endobj startxref 139367 %%EOF rcpp-0.11.0/inst/doc/Rcpp.bib0000644000000000000000000004667412273452733012560 0ustar @String{CRAN = "http://CRAN.R-Project.org/" } @String{manuals = CRAN # "doc/manuals/" } @String{RCoreTeam = "{R Development Core Team}" } @String{RFoundation = "R Foundation for Statistical Computing" } @String{R-Forge = "http://R-Forge.R-Project.org/" } @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 = "http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372", urlansi = "http://webstore.ansi.org/RecordDetail.aspx?sku=ISO/IEC%2014882:2011" } @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 = "http://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} } @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 = {http://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 = {http://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 = {http://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 = {http://www.icce.rug.nl/documents/cplusplus/} } @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: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} } @Manual{CRAN:RInside, title = {RInside: C++ classes to embed R in C++ applications}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, year = 2012, note = {R package version 0.2.10}, 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 = 2014, note = {R package version 0.4.0}, url = CRAN # "package=RProtoBuf" } @Manual{CRAN:RQuantLib, title = {RQuantLib: {R} interface to the {QuantLib} library}, author = {Dirk Eddelbuettel and Khanh Nguyen}, year = 2014, note = {R package version 0.3.11}, url = CRAN # "package=RQuantLib" } @Manual{CRAN:rbenchmark, title = {\pkg{rbenchmark}: Benchmarking routine for \proglang{R}}, author = {Wacek Kusnierczyk}, year = 2012, note = {R package version 1.0.0}, url = CRAN # "package=rbenchmark" } @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 = {http://www.jstatsoft.org/v40/i08/}, } @Manual{CRAN:Rcpp, title = {{Rcpp}: Seamless {R} and {C++} Integration}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois and JJ Allaire and John Chambers and Douglas Bates and Kevin Ushey}, year = 2014, note = {R package version 0.11.0}, 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 = 2013, 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 = 2014, 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 = 2014, 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 = {Romain Fran\c{c}ois and Dirk Eddelbuettel and Douglas Bates}, year = 2014, note = {R package version 0.4.000.2}, url = CRAN # "package=RcppArmadillo" } @Manual{CRAN:RcppClassic, title = {RcppClassic: Deprecated 'classic' Rcpp API}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, year = 2014, note = {R package version 0.9.5}, url = CRAN # "package=RcppClassic" } @Manual{CRAN:RcppDE, title = {RcppDE: Global optimization by differential evolution in C++}, author = {Dirk Eddelbuettel}, year = 2013, note = {R package version 0.1.2}, url = CRAN # "package=RcppDE" } @Manual{CRAN:RcppEigen, title = {RcppEigen: Rcpp integration for the Eigen templated linear algebra library}, author = {Douglas Bates and Romain Fran\c{c}ois and Dirk Eddelbuettel}, year = 2014, note = {{R} package version 0.3.2.0.2}, url = CRAN # "package=RcppEigen" } @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 = {http://www.jstatsoft.org/v52/i05/}, } @Manual{CRAN:RcppExamples, title = {RcppExamples: Examples using {Rcpp} to interface {R} and {C++}}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, year = 2013, note = {R package version 0.1.6}, url = CRAN # "package=RcppExamples" } @Manual{CRAN:RcppGSL, title = {RcppGSL: Rcpp integration for GNU GSL vectors and matrices}, author = {Romain Fran\c{c}ois and Dirk Eddelbuettel}, year = 2012, note = {R package version 0.2.0}, url = CRAN # "package=RcppGSL" } @Manual{CRAN:Rserve, title = {Rserve: Binary R server}, author = {Simon Urbanek}, year = 2013, note = {R package version 1.7-3}, 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:highlight, title = {highlight: Syntax highlighter}, author = {Romain Fran\c{c}ois}, year = 2013, note = {R package with version 0.4.4}, 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}, year = 2013, note = {R package version 0.3.13}, url = CRAN # "package=inline" } @Manual{CRAN:Matrix, title = {\pkg{Matrix}: Sparse and Dense Matrix Classes and Methods}, author = {Douglas Bates and Martin Maechler}, year = 2014, note = {R package version 1.1-2}, url = CRAN # "package=Matrix" } @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 = 2012, note = {R package version 1.2.2}, url = CRAN # "package=minqa" } @Manual{CRAN:roxygen2, title = {roxygen2: In-source documentation for R}, author = {Hadley Wickham and Peter Danenberg and Manuel Eugster}, year = 2014, note = {R package version 3.1.0}, url = CRAN # "package=roxygen2" } @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{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 = {http://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 = {http://dx.doi.org/10.1016/j.csda.2013.02.005} } ; see http://eigen.tuxfamily.org/index.php?title=BibTeX ; replaced 'howpublished' with 'url' and updated year to 2011, and again to 2012 @MISC{Eigen:Web, author = {Ga\"{e}l Guennebaud and Beno\^{i}t Jacob and others}, title = {Eigen v3}, year = 2012, url = {http://eigen.tuxfamily.org}, } @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} } @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 = {http://dx.doi.org/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}} @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 = {http://www.gnu.org/software/gsl} } @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 = {http://sphhp.buffalo.edu/biostat/research/techreports/UB_Biostatistics_TR0702.pdf}, month = {July}, year = 2007 } @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 } @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}, } @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{R:Administration, author = RCoreTeam, organization = RFoundation, address = {Vienna, Austria}, year = 2013, title = "R Installation and Administration", note = {{ISBN} 3-900051-09-7}, url = manuals # "R-admin.html" } @manual{R:Extensions, author = RCoreTeam, organization = RFoundation, address = {Vienna, Austria}, year = 2012, 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 = 2013, title = "R internals", annote = {{ISBN} 3-900051-14-3}, url = manuals # "R-ints.html" } @manual{R:Main, title = {R: A Language and Environment for Statistical Computing}, author = RCoreTeam, organization = RFoundation, address = {Vienna, Austria}, year = 2013, url = {http://www.R-project.org/}, } @manual{R:Language, author = RCoreTeam, organization = RFoundation, address = {Vienna, Austria}, year = 2013, title = "R language", annote = {{ISBN} 3-900051-13-5}, url = manuals # "R-lang.html" } @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} } @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" } @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 = "http://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{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{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 = {http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}, note = {{N2761=08-0271}} } @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 = {http://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}, } @misc{KDE-TechBase:2012, author = {KDE-TechBase}, title = {Binary Compatibility Issues With {C++}}, url = "http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++", year = 2012, note = "[Online; accessed 24-November-2012]" } rcpp-0.11.0/inst/doc/Rcpp-FAQ.Rnw0000644000000000000000000011345612273452733013170 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-FAQ} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, FAQ} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color,alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} \newcommand{\code}[1]{\texttt{#1}} %% defined as a stop-gap measure til interaction with highlight is sorted out \newcommand{\hlboxlessthan}{ \hlnormalsizeboxlessthan} \newcommand{\hlboxgreaterthan}{\hlnormalsizeboxgreaterthan} \newcommand{\hlboxopenbrace}{ \hlnormalsizeboxopenbrace} \newcommand{\hlboxclosebrace}{ \hlnormalsizeboxclosebrace} \newcommand{\hlboxbacktick}{ \hlnormalsizeboxbacktick} \newcommand{\hlboxunderscore}{ \hlnormalsizeboxunderscore} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} \newcommand{\faq}[1]{FAQ~\ref{#1}} \newcommand{\rdoc}[2]{\href{http://www.rdocumentation.org/packages/#1/functions/#2}{\code{#2}}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") require(inline) require(highlight) @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{Frequently Asked Questions about \pkg{Rcpp}} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This document attempts to answer the most Frequently Asked Questions (FAQ) regarding the \pkg{Rcpp} \citep{CRAN:Rcpp,JSS:Rcpp,Eddelbuettel:2013:Rcpp} package. } \section{Getting started} \subsection{How do I get started ?} If you have \pkg{Rcpp} installed, please execute the following command in \proglang{R} to access the introductory vignette (which is a variant of the \citet{JSS:Rcpp} paper) for a detailed introduction: <>= vignette("Rcpp-introduction") @ If you do not have \pkg{Rcpp} installed, the document should also be available whereever you found this document, \textsl{i.e.,} on every mirror of CRAN site. \subsection{What do I need ?} Obviously, \proglang{R} must be installed. \pkg{Rcpp} provides a \proglang{C++} API as an extension to the \proglang{R} system. As such, it is bound by the choices made by \proglang{R} and is also influenced by how \proglang{R} is configured. In general, the standard environment for building a CRAN package from source (particularly when it contains \proglang{C} or \proglang{C++} code) is required. This means one needs: \begin{itemize} \item a development environment with a suitable compiler (see below), header files and required libraries; \item \proglang{R} should be built in a way that permits linking and possibly embedding of \proglang{R}; this is typically ensured by the \texttt{--enable-shared-lib} option; \item standard development tools such as \texttt{make} etc. \end{itemize} Also see the \href{http://www.rstudio.com/ide/docs/packages/prerequisites}{RStudio documentation} on pre-requisites for R package development. \subsection{What compiler can I use ?} On almost all platforms, the GNU Compiler Collection (or \texttt{gcc}, which is also the name of its \proglang{C} language compiler) has to be used along with the corresponding \texttt{g++} compiler for the \proglang{C++} language. A minimal suitable version is a final 4.2.* release; earlier 4.2.* were lacking some \proglang{C++} features (and even 4.2.1, still used on OS X, has issues). Generally speaking, and as of early 2011, the default compilers on all the common platforms are suitable. Specific per-platform notes: \begin{description} \item[Windows] users need the \texttt{Rtools} package from the site maintained by Duncan Murdoch which contains all the required tools in a single package; complete instructions specific to Windows are in the `R Administration' manual \citep[Appendix D]{R:Administration}. \item[OS X] users, as noted in the `R Administration' manual \citep[Appendix C.4]{R:Administration}, need to install the Apple Developer Tools (\textsl{e.g.}, \texttt{Xcode}) (as well as \texttt{gfortran} if \proglang{R} or Fortran-using packages are to be built); also see \faq{q:OSX} below. \item[Linux] user need to install the standard developement packages. Some distributions provide helper packages which pull in all the required packages; the \texttt{r-base-dev} package on Debian and Ubuntu is an example. \end{description} The \texttt{clang} and \texttt{clang++} compilers from the LLVM project can also be used as they are inter-operable with \texttt{gcc} et al. The \texttt{clang++} compiler is particularly interesting as it emits much more comprehensible error messages than \texttt{g++}. The Intel \texttt{icc} family has also been used successfully as its output files can also be combined with those from \texttt{gcc}. \subsection{What other packages are useful ?} Additional packages that we have found useful are \begin{description} \item[\pkg{inline}] which is invaluable for direct compilation, linking and loading of short code snippets---but now effectively superseded by the Rcpp Attributes (see \faq{using-attributes} and \faq{prototype-using-attributes}) feature provided by \pkg{Rcpp}; \item[\pkg{RUnit}] is used for unit testing; the package is recommended and will be needed to re-run some of our tests but it is not strictly required during use of \pkg{Rcpp}; \item[\pkg{rbenchmark}] to run simple timing comparisons and benchmarks; it is also recommended but not required. \item[\pkg{microbenchmark}] is an alternative for benchmarking. \item[\pkg{devtools}] can help the process of building, compiling and testing a package but it too is entirely optional. \end{description} \section{Compiling and Linking} \subsection{How do I use \pkg{Rcpp} in my package ?} \label{make-package} \pkg{Rcpp} has been specifically designed to be used by other packages. Making a package that uses \pkg{Rcpp} depends on the same mechanics that are involved in making any \proglang{R} package that use compiled code --- so reading the \textsl{Writing R Extensions} manual \citep{R:Extensions} is a required first step. Further steps, specific to \pkg{Rcpp}, are described in a separate vignette. <>= vignette("Rcpp-package") @ \subsection{How do I quickly prototype my code?} There are two toolchains which can help with this: \begin{itemize} \item The older one is provided by the \pkg{inline} package and described in Section~\ref{using-inline}. \item Starting with \pkg{Rcpp} 0.10.0, the Rcpp Attributes feature (described in Section~\ref{using-attributes}) offered an even easier alternative via the function \rdoc{Rcpp}{evalCpp}, \rdoc{Rcpp}{cppFunction} and \rdoc{Rcpp}{sourceCpp}. \end{itemize} The next two subsections show an example each. \subsubsection{Using inline} \label{using-inline} The \pkg{inline} package \citep{CRAN:inline} provides the functions \rdoc{inline}{cfunction} and \rdoc{inline}{cxxfunction}. Below is a simple function that uses \texttt{accumulate} from the (\proglang{C++}) Standard Template Library to sum the elements of a numeric vector. <<>>= fx <- cxxfunction(signature(x = "numeric"), 'NumericVector xx(x); return wrap(std::accumulate(xx.begin(), xx.end(), 0.0));', plugin = "Rcpp") res <- fx(seq(1, 10, by=0.5)) res <>= stopifnot(identical(res, sum(seq(1, 10, by=0.5)))) @ %\pkg{Rcpp} uses \pkg{inline} to power its entire unit test suite. Consult the %\texttt{unitTests} directory of \pkg{Rcpp} for several hundred further examples. % %< < eval=FALSE>>= % \list.files( system.file( "unitTests", package = "Rcpp" ), pattern = "^runit[.]" ) % @ One might want to use code that lives in a \proglang{C++} file instead of writing the code in a character string in R. This is easily achieved by using \rdoc{base}{readLines}: <>= fx <- cxxfunction(signature(), paste(readLines("myfile.cpp"), collapse="\n"), plugin = "Rcpp") @ The \texttt{verbose} argument of \rdoc{inline}{cxxfunction} is very useful as it shows how \pkg{inline} runs the show. \subsubsection{Using Rcpp Attributes} \label{using-attributes} Rcpp Attributes \citep{CRAN:Rcpp:Attributes}, and also discussed in \faq{prototype-using-attributes} below, permits an even easier route to integrating R and C++. It provides three key functions. First, \rdoc{Rcpp}{evalCpp} provide a means to evaluate simple C++ expression which is often useful for small tests, or to simply check if the toolchain is set up correctly. Second, \rdoc{Rcpp}{cppFunction} can be used to create C++ functions for R use on the fly. Third, \code{Rcpp}{sourceCpp} can integrate entire files in order to define multiple functions. The example above can now be rewritten as: <<>>= cppFunction('double accu(NumericVector x) { return(std::accumulate(x.begin(), x.end(), 0.0)); }') res <- accu(seq(1, 10, by=0.5)) res @ The \rdoc{Rcpp}{cppFunction} parses the supplied text, extracts the desired function names, creates the required scaffolding, compiles, links and loads the supplied code and makes it available under the selected identifier. Similarly, \rdoc{Rcpp}{sourceCpp} can read in a file and compile, link and load the code therein. \subsection{How do I convert my prototyped code to a package ?} \label{from-inline-to-package} Since release 0.3.5 of \pkg{inline}, one can combine \faq{using-inline} and \faq{make-package}. See \verb|help("package.skeleton-methods")| once \pkg{inline} is loaded and use the skeleton-generating functionality to transform a prototyped function into the minimal structure of a package. After that you can proceed with working on the package in the spirit of \faq{make-package}. Rcpp Attributes \citep{CRAN:Rcpp:Attributes} also offers a means to convert functions written using Rcpp Attributes into a function via the \rdoc{Rdoc}{compileAttributes} function; see the vignette for details. \subsection{How do I quickly prototype my code in a package?} \label{using-a-package} The simplest way may be to work directly with a package. Changes to both the \proglang{R} and \proglang{C++} code can be compiled and tested from the command line via: <>= $ R CMD INSTALL mypkg && Rscript --default-packages=mypkg -e 'someFunctionToTickle(3.14)' @ This first installs the packages, and then uses the command-line tool \rdoc{utils}{Rscript} (which ships with \code{R}) to load the package, and execute the \proglang{R} expression following the \code{-e} switch. Such an expression can contain multiple statements separated by semicolons. \rdoc{utils}{Rscript} is available on all three core operating systems. On Linux, one can also use \code{r} from the \code{littler} package by Horner and Eddelbuettel which is an alternative front end to \proglang{R} designed for both \verb|#!| (hashbang) scripting and command-line use. It has slightly faster start-up times than \rdoc{utils}{Rscript}; and both give a guaranteed clean slate as a new session is created. The example then becomes <>= $ R CMD INSTALL mypkg && r -l mypkg -e 'someFunctionToTickle(3.14)' @ The \code{-l} option calls 'suppressMessages(library(mypkg))' before executing the \proglang{R} expression. Several packages can be listed, separated by a comma. More choice are provide by the \pkg{devtools} package, and by using RStudio. See the respective documentation for details. \subsection{But I want to compile my code with R CMD SHLIB !} \label{using-r-cmd-shlib} The recommended way is to create a package and follow \faq{make-package}. The alternate recommendation is to use \pkg{inline} and follow \faq{using-inline} because it takes care of all the details. However, some people have shown that they prefer not to follow recommended guidelines and compile their code using the traditional \texttt{R CMD SHLIB}. To do so, we need to help \texttt{SHLIB} and let it know about the header files that \pkg{Rcpp} provides and the \proglang{C++} library the code must link against. On the Linux command-line, you can do the following:\newline <>= $ export PKG_LIBS=`Rscript -e "Rcpp:::LdFlags()"` # if Rcpp older than 0.11.0 $ export PKG_CXXFLAGS=`Rscript -e "Rcpp:::CxxFlags()"` $ R CMD SHLIB myfile.cpp @ which first defines and exports two relevant environment variables which \texttt{R CMD SHLIB} then relies on. On other operating systems, appropriate settings may have to be used to define the environment variables. This approach corresponds to the very earliest ways of building programs and can still be found in some deprecated documents (as \textit{e.g.} some of Dirk's older 'Intro to HPC with R' tutorial slides). It is still not recommended as there are tools and automation mechanisms that can do the work for you. \pkg{Rcpp} versions 0.11.0 or later can do with the definition of \code{PKG\_LIBS} as a user-facing library is no longer needed (and hence no longer shipped with the package). One still needs to set \code{PKG\_CXXFLAGS} to tell R where the \pkg{Rcpp} headers files are located. Once \code{R CMD SHLIB} has created the dyanmically-loadable file (with extension \code{.so} on Linux, \code{.dylib} on OS X or \code{.dll} on Windows), it can be loaded in an R session via \rdoc{base}{dyn.load}, and the function can be executed via \rdoc{base}{.Call}. Needless to say, we \emph{strongly} recommend using a package, or at least Rcpp Attributes as either approach takes care of a lot of these tedious and error-prone manual steps. \subsection{But R CMD SHLIB still does not work !} We have had reports in the past where build failures occurred when users had non-standard code in their \verb|~/.Rprofile| or \texttt{Rprofile.site} (or equivalent) files. If such code emits text on \texttt{stdout}, the frequent and implicit invocation of \texttt{Rscript -e "..."} (as in \faq{using-r-cmd-shlib} above) to retrieve settings directly from \pkg{Rcpp} will fail. You may need to uncomment such non-standard code, or protect it by wrapping it inside \texttt{if (interactive())}, or possibly try to use \texttt{Rscript --vanilla} instead of plain \texttt{Rscript}. \subsection{What about \texttt{LinkingTo} ?} \proglang{R} has only limited support for cross-package linkage. We now employ the \texttt{LinkingTo} field of the \texttt{DESCRIPTION} file of packages using \pkg{Rcpp}. But this only helps in having \proglang{R} compute the location of the header files for us. The actual library location and argument still needs to be provided by the user. How to do so has been shown above, and we recommned you use either \faq{make-package} or \faq{using-inline} both which use the \pkg{Rcpp} function \texttt{Rcpp:::LdFlags()}. If and when \texttt{LinkingTo} changes and lives up to its name, we will be sure to adapt \pkg{Rcpp} as well. An important change arrive with \pkg{Rcpp} release 0.11.0 and concern the automatic registration of functions; see Section~\ref{function-registration} below. \subsection{Does \pkg{Rcpp} work on windows ?} Yes of course. See the Windows binaries provided by CRAN. \subsection{Can I use \pkg{Rcpp} with Visual Studio ?} Not a chance. And that is not because we are meanies but because \proglang{R} and Visual Studio simply do not get along. As \pkg{Rcpp} is all about extending \proglang{R} with \proglang{C++} interfaces, we are bound by the available toolchain. And \proglang{R} simply does not compile with Visual Studio. Go complain to its vendor if you are still upset. \subsection{I am having problems building Rcpp on OS X, any help ?} \label{q:OSX} OS X used to be a little more conservative with compiler versions as Apple stuck with gcc-4.2. Following the 'Mavericks' release, it is the opposite as only llvm is provide in Xcode---while the R build provided by CRAN still has hardwired settings for the gcc/g++ combination. Until that is resolved, users either need to create softlinks (say, in, \code{/usr/local/bin}) or override the \code{CC} and \code{CXX} variables via a file \code{~/.R/Makevars} or its system-equivalent in R's \code{etc/} directory. See the \code{r-sig-mac} mailing for further details. Compilation from source is recommended. %At the time of writing this paragraph (in the spring of 2011), \pkg{Rcpp} %(just like CRAN) supports all OS X releases greater or equal to 10.5. %However, building \pkg{Rcpp} from source (or building packages using %\pkg{Rcpp}) also requires a recent-enough version of Xcode. For the %\textsl{Leopard} release of OS X, the current version is 3.1.4 which can be %downloaded free of charge from the Apple Developer site. Users may have to %manually select \code{g++-4.2} via the symbolic link \code{/usr/bin/g++}. %The \textsl{Snow Leopard} release already comes with Xcode 3.2.x and work as %is. \subsection{Does \pkg{Rcpp} work on solaris/suncc ?} Yes, it generally does. But as we do not have access to such systems, some issues persist on the CRAN test systems. \subsection{Does \pkg{Rcpp} work with Revolution R ?} We have not tested it yet. \pkg{Rcpp} might need a few tweaks to work with the compilers used by Revolution R (if those differ from the defaults). \subsection{Is it related to CXXR ?} CXXR is an ambitious project that aims to totally refactor the \proglang{R} interpreter in \proglang{C++}. There are a few similaritites with \pkg{Rcpp} but the projects are unrelated. CXXR and \pkg{Rcpp} both want \proglang{R} to make more use of \proglang{C++} but they do it in very different ways. \subsection{How do I quickly prototype my code using Attributes?} \label{prototype-using-attributes} \pkg{Rcpp} version 0.10.0 and later offer a new feature 'Rcpp Attributes' which is described in detail in its own vignette \citep{CRAN:Rcpp:Attributes}. In short, it offers functions \rdoc{Rcpp}{evalCpp}, \rdoc{Rcpp}{cppFunction} and \rdoc{Rcpp}{sourceCpp} which extend the functionality of the \rdoc{Rcpp}{cxxfunction} function. \subsection{What about the new 'no-linking' feature??} \label{function-registration} Starting with \pkg{Rcpp} 0.11.0, functionality provided by \pkg{Rcpp} and used by packages built with \pkg{Rcpp} accessed via the registration facility offered by R (and which is used by \pkg{lme4} and \pkg{Matrix}, as well as by \pkg{xts} and \pkg{zoo}). This requires no effort from the user / programmer, and even frees us from explicit linking instruction. In most cases, the files \code{src/Makevars} and \code{src/Makevars.win} can now be removed. Exceptions are the use of \pkg{RcppArmadillo} (which needs an entry \verb|PKG_LIBS=$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)|) and packages linking to external libraries they use. But for most packages using \pkg{Rcpp}, only two things are required: \begin{itemize} \item an entry in \code{DESCRIPTION} such as \code{Imports: Rcpp} (which may be versioned as in \code{Imports: Rcpp (>= 0.11.0)}), and \item an entry in \code{NAMESPACE} to ensure \pkg{Rcpp} is correctly instantiated, for example \code{importFrom(Rcpp, evalCpp)}. \end{itemize} The name of the symbol does really matter; once one symbol is important all should be available. \section{Examples} The following questions were asked on the \href{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel}{Rcpp-devel} mailing list, which is our preferred place to ask questions as it guarantees exposure to a number of advanced Rcpp users. The \href{http://stackoverflow.com/questions/tagged/rcpp}{StackOverflow tag for rcpp} is an alternative; that site is also easily searchable. Several dozen fully documented examples are provided at the \href{http://gallery.rcpp.org}{Rcpp Gallery} -- which is also open for new contributions. \subsection{Can I use templates with \pkg{Rcpp} ? } \begin{quote} \emph{I'm curious whether one can provide a class definition inline in an R script and then initialize an instance of the class and call a method on the class, all inline in R.} \end{quote} This question was initially about using templates with \pkg{inline}, and we show that (older) answer first. It is also easy with Rcpp Attributes which is what we show below. \subsubsection{Using inline} \noindent Most certainly, consider this simple example of a templated class which squares its argument: <>= inc <- 'template class square : public std::unary_function { public: T operator()( T t) const { return t*t ;} }; ' src <- ' double x = Rcpp::as(xs); int i = Rcpp::as(is); square sqdbl; square sqint; return Rcpp::DataFrame::create(Rcpp::Named("x", sqdbl(x)), Rcpp::Named("i", sqint(i))); ' fun <- cxxfunction(signature(xs="numeric", is="integer"), body=src, include=inc, plugin="Rcpp") fun(2.2, 3L) @ \subsubsection{Using Rcpp Attributes} We can also use 'Rcpp Attributes' \citep{CRAN:Rcpp:Attributes}---as described in \faq{using-attributes} and \faq{prototype-using-attributes} above. Simply place the following code into a file and use \rdoc{Rcpp}{sourceCpp} on it. It will even run the R part at the end. <>= #include template class square : public std::unary_function { public: T operator()( T t) const { return t*t ;} }; // [[Rcpp::export]] Rcpp::DataFrame fun(double x, int i) { square sqdbl; square sqint; return Rcpp::DataFrame::create(Rcpp::Named("x", sqdbl(x)), Rcpp::Named("i", sqint(i))); } /*** R fun(2.2, 3L) */ @ \subsection{Can I do matrix algebra with \pkg{Rcpp} ?} \label{matrix-algebra} \begin{quote} \emph{\pkg{Rcpp} allows element-wise operations on vector and matrices through operator overloading and STL interface, but what if I want to multiply a matrix by a vector, etc ...} \end{quote} \noindent Currently, \pkg{Rcpp} does not provide binary operators to allow operations involving entire objects. Adding operators to \pkg{Rcpp} would be a major project (if done right) involving advanced techniques such as expression templates. We currently do not plan to go in this direction, but we would welcome external help. Please send us a design document. However, we have developed the \pkg{RcppArmadillo} package \citep{CRAN:RcppArmadillo,Eddelbuettel+Sanderson:2014:RcppArmadillo} that provides a bridge between \pkg{Rcpp} and \pkg{Armadillo} \citep{Sanderson:2010:Armadillo}. \pkg{Armadillo} supports binary operators on its types in a way that takes full advantage of expression templates to remove temporaries and allow chaining of operations. That is a mouthful of words meaning that it makes the code go faster by using fiendishly clever ways available via the so-called template meta programming, an advanced \proglang{C++} technique. Also, the \pkg{RcppEigen} package \citep{JSS:RcppEigen} provides an alternative using the \href{http://eigen.tuxfamily.org}{Eigen} template library. \subsubsection{Using inline} The following example is adapted from the examples available at the project page of Armadillo. It calculates $ x' \times Y^{-1} \times z$ <>= // copy the data to armadillo structures arma::colvec x = Rcpp::as (x_); arma::mat Y = Rcpp::as(Y_) ; arma::colvec z = Rcpp::as(z_) ; // calculate the result double result = arma::as_scalar(arma::trans(x) * arma::inv(Y) * z); // return it to R return Rcpp::wrap( result ); @ %% Running this now makes the package depend on RcppArmadillo being installed %% and would require at least a Suggests If stored in a file \code{myfile.cpp}, we can use it via \pkg{inline}: <>= fx <- cxxfunction(signature(x_="numeric", Y_="matrix", z_="numeric" ), paste(readLines("myfile.cpp"), collapse="\n"), plugin="RcppArmadillo" ) fx(1:4, diag(4), 1:4) @ <>= unlink("myfile.cpp") @ The focus is on the code \verb|arma::trans(x) * arma::inv(Y) * z|, which performs the same operation as the R code \verb|t(x) %*% solve(Y) %*% z|, although Armadillo turns it into only one operation, which makes it quite fast. Armadillo benchmarks against other \proglang{C++} matrix algebra libraries are provided on \href{http://arma.sourceforge.net/speed.html}{the Armadillo website}. It should be noted that code below depends on the version \texttt{0.3.5} of \pkg{inline} and the version \texttt{0.2.2} of \pkg{RcppArmadillo} \subsubsection{Using Rcpp Attributes} We can also write the same example for use with Rcpp Attributes: <>= #include // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] double fx(arma::colvec x, arma::mat Y, arma::colvec z) { // calculate the result double result = arma::as_scalar(arma::trans(x) * arma::inv(Y) * z); return result; } /*** R fx(1:4, diag(4), 1:4) */ @ Here, the additional \code{Rcpp::depends(RcppArmadillo)} ensures that code can be compiled against the \pkg{RcppArmadillo} header, and that the correct libraries are linked to the function built from the supplied code example. Note how we do not have to concern ourselves with conversion; R object automatically become (Rcpp)Armadillo objects and we can focus on the single computing a (scalar) result. \subsection{Can I use code from the Rmath header and library with \pkg{Rcpp} ?} \begin{quote} \emph{Can I call functions defined in the Rmath header file and the standalone math library for R--as for example the random number generators?} \end{quote} \noindent Yes, of course. This math library exports a subset of R, but \pkg{Rcpp} has access to much more. Here is another simple example. Note how we have to use and instance of the \texttt{RNGScope} class to set and re-set the random-number generator. This also illustrates Rcpp sugar as we are using a vectorised call to \texttt{rnorm}. Moreover, because the RNG is reset, the two calls result in the same random draws. If we wanted to control the draws, we could explicitly set the seed after the \texttt{RNGScope} object has been instantiated. <<>>= fx <- cxxfunction(signature(), 'RNGScope(); return rnorm(5, 0, 100);', plugin="Rcpp") set.seed(42) fx() fx() @ Newer versions of Rcpp also provide the actual Rmath function in the \code{R} namespace, \textsl{i.e.} as \code{R::rnorm(m,s)} to obtain a scalar random variable distributed as $N(m,s)$. Using Rcpp Attributes, this can be as simple as <<>>= cppFunction('Rcpp::NumericVector ff(int n) { return rnorm(n, 0, 100); }') set.seed(42) ff(5) ff(5) set.seed(42) rnorm(5, 0, 100) rnorm(5, 0, 100) @ This illustrates the Rcpp Attributes adds the required \code{RNGScope} object for us. It also shows how setting the seed from R affects draws done via C++ as well as R, and that identical random number draws are obtained. \subsection{Can I use NA and Inf with \pkg{Rcpp} ?} \begin{quote} \emph{R knows about NA and Inf. How do I use them from C++?} \end{quote} \noindent Yes, see the following example: <<>>= src <- 'Rcpp::NumericVector v(4); v[0] = R_NegInf; // -Inf v[1] = NA_REAL; // NA v[2] = R_PosInf; // Inf v[3] = 42; // see the Hitchhiker Guide return Rcpp::wrap(v);' fun <- cxxfunction(signature(), src, plugin="Rcpp") fun() @ Similarly, for Rcpp Attributes: <>= #include // [[Rcpp::export]] Rcpp::NumericVector fun(void) { Rcpp::NumericVector v(4); v[0] = R_NegInf; // -Inf v[1] = NA_REAL; // NA v[2] = R_PosInf; // Inf v[3] = 42; // see the Hitchhiker Guide return v; } @ \subsection{Can I easily multiply matrices ?} \begin{quote} \emph{Can I multiply matrices easily?} \end{quote} \noindent Yes, via the \pkg{RcppArmadillo} package which builds upon \pkg{Rcpp} and the wonderful Armadillo library described above in \faq{matrix-algebra}: <>= txt <- 'arma::mat Am = Rcpp::as< arma::mat >(A); arma::mat Bm = Rcpp::as< arma::mat >(B); return Rcpp::wrap( Am * Bm );' mmult <- cxxfunction(signature(A="numeric", B="numeric"), body=txt, plugin="RcppArmadillo") A <- matrix(1:9, 3, 3) B <- matrix(9:1, 3, 3) C <- mmult(A, B) @ % < < echo=FALSE,print=FALSE > > = % A <- matrix(1:9, 3, 3) % B <- matrix(9:1, 3, 3) % A %*% B % @ Armadillo supports a full range of common linear algebra operations. The \pkg{RcppEigen} package provides an alternative using the \href{http://eigen.tuxfamily.org}{Eigen} template library. Rcpp Attributes, once again, makes this even easier: <>= #include // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] arma::mat mult(arma::mat A, arma::mat B) { return A*B; } /*** R A <- matrix(1:9, 3, 3) B <- matrix(9:1, 3, 3) mult(A,B) */ @ which can be built, and run, from R via a simple \rdoc{Rcpp}{sourceCpp} call---and will also run the small R example at the end. \subsection{How do I write a plugin for \pkg{inline} and/or Rcpp Attributes?} \begin{quote} \emph{How can I create my own plugin for use by the \pkg{inline} package?} \end{quote} \noindent Here is an example which shows how to it using GSL libraries as an example. This is merely for demonstration, it is also not perfectly general as we do not detect locations first---but it serves as an example: <>= ## simple example of seeding RNG and drawing one random number gslrng <- ' int seed = Rcpp::as(par) ; gsl_rng_env_setup(); gsl_rng *r = gsl_rng_alloc (gsl_rng_default); gsl_rng_set (r, (unsigned long) seed); double v = gsl_rng_get (r); gsl_rng_free(r); return Rcpp::wrap(v);' plug <- Rcpp:::Rcpp.plugin.maker( include.before = "#include ", libs = paste("-L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp", "-Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib", "-L/usr/lib -lgsl -lgslcblas -lm")) registerPlugin("gslDemo", plug ) fun <- cxxfunction(signature(par="numeric"), gslrng, plugin="gslDemo") fun(0) @ % Here the \pkg{Rcpp} function \code{Rcpp.plugin.maker} is used to create a plugin 'plug' which is then registered, and subsequently used by \pkg{inline}. The same plugins can be used by Rcpp Attributes as well. \subsection{How can I pass one additional flag to the compiler?} \begin{quote} \emph{How can I pass another flag to the \code{g++} compiler without writing a new plugin?} \end{quote} The quickest way is to modify the return value from an existing plugin. Here we use the default one from \pkg{Rcpp} itself in order to pass the new flag \verb|-std=c++0x|. As it does not set the \verb|PKG_CXXFLAGS| variable, we simply assign this. For other plugins, one may need to append to the existing values instead. <>= myplugin <- getPlugin("Rcpp") myplugin$env$PKG_CXXFLAGS <- "-std=c++11" f <- cxxfunction(signature(), settings=myplugin, body=' + std::vector x = { 1.0, 2.0, 3.0 }; // fails without -std=c++0x + return Rcpp::wrap(x); + ') f() @ For Rcpp Attributes, the attributes \code{Rcpp::plugin()} can be used. Currently supported plugins are for C++11 as well as for OpenMP. \subsection{How can I set matrix row and column names ?} \begin{quote} \emph{Ok, I can create a matrix, but how do I set its row and columns names?} \end{quote} Pretty much the same way as in \proglang{R} itself: We define a list with two character vectors, one each for row and column names, and assign this to the \code{dimnames} attribute: <>= src <- ' Rcpp::NumericMatrix x(2,2); x.fill(42); // or more interesting values Rcpp::List dimnms = // two vec. with static names Rcpp::List::create(Rcpp::CharacterVector::create("cc", "dd"), Rcpp::CharacterVector::create("ee", "ff")); // and assign it x.attr("dimnames") = dimnms; return(x); ' fun <- cxxfunction(signature(), body=src, plugin="Rcpp") fun() @ % The same logic, but used with Rcpp Attributes: <>= #include // [[Rcpp::export]] Rcpp::List fun(void) { Rcpp::NumericMatrix x(2,2); x.fill(42); // or more interesting values Rcpp::List dimnms = // two vec. with static names Rcpp::List::create(Rcpp::CharacterVector::create("cc", "dd"), Rcpp::CharacterVector::create("ee", "ff")); // and assign it x.attr("dimnames") = dimnms; return(x); } @ \subsection{Why can long long types not be cast correctly?} That is a good and open question. We rely on the basic \proglang{R} types, notably \code{integer} and \code{numeric}. These can be cast to and from \proglang{C++} types without problems. But there are corner cases. The following example, contributed by a user, shows that we cannot reliably cast \code{long} types (on a 64-bit machines). <>= BigInts <- cxxfunction(signature(), 'std::vector bigints; bigints.push_back(12345678901234567LL); bigints.push_back(12345678901234568LL); Rprintf("Difference of %ld\\n", 12345678901234568LL - 12345678901234567LL); return wrap(bigints);', plugin="Rcpp", includes="#include ") retval<-BigInts() # Unique 64-bit integers were cast to identical lower precision numerics # behind my back with no warnings or errors whatsoever. Error. stopifnot(length(unique(retval)) == 2) @ % While the difference of one is evident at the \proglang{C++} level, it is no longer present once cast to \proglang{R}. The 64-bit integer values get cast to a floating point types with a 53-bit mantissa. We do not have a good suggestion or fix for casting 64-bit integer values: 32-bit integer values fit into \code{integer} types, up to 53 bit precision fits into \code{numeric} and beyond that truly large integers may have to converted (rather crudely) to text and re-parsed. Using a different representation as for example from the \href{http://gmplib.org/}{GNU Multiple Precision Arithmetic Library} may be an alternative. \section{Support} \subsection{Is the API documented ?} You bet. We use \proglang{doxygen} to generate html, latex and man page documentation from the source. The html documentation is available for \href{http://dirk.eddelbuettel.com/code/rcpp/html/index.html}{browsing}, as a \href{http://dirk.eddelbuettel.com/code/rcpp/Rcpp_refman.pdf}{very large pdf file}, and all three formats are also available a zip-archives: \href{http://dirk.eddelbuettel.com/code/rcpp/rcpp-doc-html.zip}{html}, \href{http://dirk.eddelbuettel.com/code/rcpp/rcpp-doc-latex.zip}{latex}, and \href{http://dirk.eddelbuettel.com/code/rcpp/rcpp-doc-man.zip}{man}. \subsection{Does it really work ?} We take quality seriously and have developped an extensive unit test suite to cover many possible uses of the \pkg{Rcpp} API. We are always on the look for more coverage in our testing. Please let us know if something has not been tested enough. \subsection{Where can I ask further questions ?} The \href{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel}{Rcpp-devel} mailing list hosted at R-forge is by far the best place. You may also want to look at the list archives to see if your question has been asked before. You can also use \href{http://stackoverflow.com/questions/tagged/rcpp}{Stack Overflow via its 'rcpp' tag}. \subsection{Where can I read old questions and answers ?} The normal \href{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel}{Rcpp-devel} mailing list hosting at R-forge contains an archive, which can be \href{http://lists.r-forge.r-project.org/mailman/swish.cgi?query=listname=rcpp-devel}{searched via swish}. Alternatively, one can also use \href{http://thread.gmane.org/gmane.comp.lang.r.rcpp/}{Gmane on Rcpp-devel} as well as \href{http://www.mail-archive.com/rcpp-devel@lists.r-forge.r-project.org/info.html}{Mail-Archive on Rcpp-devel} both of which offer web-based interfaces, including searching. \subsection{I like it. How can I help ?} \label{helping} We maintain a list of \href{https://github.com/RcppCore/Rcpp/issues?state=open}{open issues in the Github repository}. We welcome pull requests and suggest that code submissions come corresponding unit tests and, if applicable, documentation. If you are willing to donate time and have skills in C++, let us know. If you are willing to donate money to sponsor improvements, let us know too. You can also spread the word about \pkg{Rcpp}. There are many packages on CRAN that use \proglang{C++}, yet are not using \pkg{Rcpp}. You could blog about it, or get the word out otherwise. Last but not least the \href{http://gallery.rcpp.org}{Rcpp Gallery} is open for user contributions. \subsection{I don't like it. How can I help ?} It is very generous of you to still want to help. Perhaps you can tell us what it is that you dislike. We are very open to \emph{constructive} criticism. \subsection{Can I have commercial support for \pkg{Rcpp} ?} Sure you can. Just send us an email, and we will be happy to discuss the request. \subsection{I want to learn quickly. Do you provide training courses ?} Yes. Just send us an email. \subsection{Where is the code repository ?} From late 2008 to late 2013, we used the \href{https://r-forge.r-project.org/scm/?group_id=155}{Subversion repository at R-Forge} which contained Rcpp and a number of related packages. It still has the full history as well as number of support files. We have since switched to a \href{http://github.com/RcppCore/Rcpp}{Git repository at Github} for Rcpp (as well as RcppArmadillo and RcppEigen). \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/inst/doc/Rcpp-introduction.Rnw0000644000000000000000000013360012273452733015273 0ustar %% use JSS class -- use 'nojss' to turn off header \documentclass[shortnames,nojss,article]{jss} \usepackage{booktabs,flafter,thumbpdf} %\VignetteIndexEntry{Rcpp-introduction} %\VignetteKeywords{Rcpp, foreign function interface, .Call, C++, R} %\VignetteDepends{Rcpp} \author{Dirk Eddelbuettel\\Debian Project \And Romain Fran\c{c}ois\\\proglang{R} Enthusiasts} \Plainauthor{Dirk Eddelbuettel, Romain Fran\c{c}ois} \title{\pkg{Rcpp}: Seamless \proglang{R} and \proglang{C++} Integration} \Plaintitle{Rcpp: Seamless R and C++ Integration} \Abstract{ The \pkg{Rcpp} package simplifies integrating \proglang{C++} code with \proglang{R}. It provides a consistent \proglang{C++} class hierarchy that maps various types of \proglang{R} objects (vectors, matrices, functions, environments, \dots) to dedicated \proglang{C++} classes. Object interchange between \proglang{R} and \proglang{C++} is managed by simple, flexible and extensible concepts which include broad support for \proglang{C++} Standard Template Library idioms. \proglang{C++} code can both be compiled, linked and loaded on the fly, or added via packages. Flexible error and exception code handling is provided. \pkg{Rcpp} substantially lowers the barrier for programmers wanting to combine \proglang{C++} code with \proglang{R}. } \Keywords{\proglang{R}, \proglang{C++}, foreign function interface, \code{.Call}} \Plainkeywords{R, C++, foreign function interface, .Call} \Volume{40} \Issue{8} \Month{April} \Year{2011} \Submitdate{2010-11-15} \Acceptdate{2011-03-21} \Address{ Dirk Eddelbuettel \\ Debian Project \\ River Forest, IL, United States of America\\ E-mail: \email{edd@debian.org}\\ URL: \url{http://dirk.eddelbuettel.com/}\\ Romain Fran\c{c}ois\\ Professional \proglang{R} Enthusiast\\ 1 rue du Puits du Temple\\ 34 000 Montpellier, France \\ E-mail: \email{romain@r-enthusiasts.com}\\ URL: \url{http://romainfrancois.blog.free.fr/} } %% need no \usepackage{Sweave.sty} <>= library(Rcpp) rcpp.version <- packageDescription("Rcpp")$Version rcpp.date <- packageDescription("Rcpp")$Date now.date <- strftime(Sys.Date(), "%B %d, %Y") @ % \begin{document} \vspace*{-0.25cm} \section{Introduction} \proglang{R} \citep{R:Main} is an extensible system. The `Writing \proglang{R} Extensions' manual \citep{R:Extensions} describes in detail how to augment \proglang{R} with compiled code, focusing mostly on the \proglang{C} language, but also mentioning \proglang{C++} and \proglang{Fortran}. The \proglang{R} application programming interface (API) described in `Writing \proglang{R} Extensions' is based on a set of functions and macros operating on \code{SEXP} (pointers to \code{SEXPREC} or `\proglang{S} expression' structures, see the `\proglang{R} Language' manual \citealp{R:Language} for details) which are the internal representation of \proglang{R} objects. In this article, we discuss the functionality of the \pkg{Rcpp} package \citep{CRAN:Rcpp}, which simplifies the usage of \proglang{C++} code in \proglang{R}. Combining \proglang{R} and \proglang{C++} is not a new idea, so we start with a short review of other approaches and give some historical background on the development of \pkg{Rcpp}. The \pkg{Rcpp} package provides a consistent API for seamlessly accessing, extending or modifying \proglang{R} objects at the \proglang{C++} level. The API is a rewritten and extented version of an earlier API which we refer to as the `classic \pkg{Rcpp} API'. It is still provided in the \pkg{RcppClassic} package \citep{CRAN:RcppClassic} to ensure compatibility, but its use is otherwise deprecated. All new development should use the richer second API which is enclosed in the \pkg{Rcpp} \proglang{C++} namespace, and corresponds to the redesigned code base. This article highlights some of the key design and implementation choices of the new API: Lightweight encapsulation of \proglang{R} objects in \proglang{C++} classes, automatic garbage collection strategy, code inlining, data interchange between \proglang{R} and \proglang{C++}, and error handling. Several examples are included to illustrate the benefits of using \pkg{Rcpp} as opposed to the traditional \proglang{R} API. Many more examples are available within the package, both as explicit examples and as part of the numerous unit tests. % The \pkg{Rcpp} package is available from the Comprehensive \proglang{R} Archive Network (CRAN) at \url{http://CRAN.R-project.org/package=Rcpp}. \makeatletter \if@nojss This vignette corresponds to the paper published in the \textsl{Journal of Statistical Software}. It is currently still identical to the published paper. Over time, this vignette version may receive minor updates. For citations, please use the \cite{JSS:Rcpp} or \cite{Eddelbuettel:2013:Rcpp}; details are also provided in \proglang{R} via \texttt{citation("Rcpp")}. This version corresponds to \pkg{Rcpp} version \Sexpr{rcpp.version} and was typeset on \Sexpr{now.date}. \fi \makeatother \subsection{Historical context} \pkg{Rcpp} first appeared in 2005 as a contribution (by Dominick Samperi) to the \pkg{RQuantLib} package \citep{CRAN:RQuantLib} and became a CRAN package in early 2006. Several releases (all by Samperi) followed in quick succession under the name \pkg{Rcpp}. The package was then renamed to \pkg{RcppTemplate}; several more releases followed during 2006 under the new name. However, no further releases were made during 2007, 2008 or most of 2009. Following a few updates in late 2009, it was withdrawn from CRAN. Given the continued use of the package, Eddelbuettel decided to revitalize it. New releases, using the initial name \pkg{Rcpp}, started in November 2008. These included an improved build and distribution process, additional documentation, and new functionality---while retaining the existing `classic \pkg{Rcpp}' interface. While not described here, this API will be provided for the foreseeable future via the \pkg{RcppClassic} package. Reflecting evolving \proglang{C++} coding standards \citep[see][]{Meyers:2005:EffectiveC++}, Eddelbuettel and Fran\c{c}ois started a significant redesign of the code base in 2009. This added numerous new features several of which are described in this article as well as in multiple vignettes included with the package. This new API is our current focus, and we intend to both extend and support the API in future development of the \pkg{Rcpp} package. \subsection{Related work} Integration of \proglang{C++} and \proglang{R} has been addressed by several authors; the earliest published reference is probably \cite{Bates+DebRoy:2001:C++Classes}. An unpublished paper by \cite{Java+Gaile+Manly:2007:RCpp} expresses several ideas that are close to some of our approaches, though not yet fully fleshed out. The \pkg{Rserve} package \citep{Urbanek:2003:Rserve,CRAN:Rserve} acts as a socket server for \proglang{R}. On the server side, \pkg{Rserve} translates \proglang{R} data structures into a binary serialization format and uses TCP/IP for transfer. On the client side, objects are reconstructed as instances of \proglang{Java} or \proglang{C++} classes that emulate the structure of \proglang{R} objects. The packages \pkg{rcppbind} \citep{Liang:2008:rcppbind}, \pkg{RAbstraction} \citep{Armstrong:2009:RAbstraction} and \pkg{RObjects} \citep{Armstrong:2009:RObjects} are all implemented using \proglang{C++} templates. None of them have matured to the point of a CRAN release. \pkg{CXXR} \citep{Runnalls:2009:CXXR} approaches this topic from the other direction: Its aim is to completely refactor \proglang{R} on a stronger \proglang{C++} foundation. \pkg{CXXR} is therefore concerned with all aspects of the \proglang{R} interpreter, read-eval-print loop (REPL), and threading; object interchange between \proglang{R} and \proglang{C++} is but one part. A similar approach is discussed by \cite{TempleLang:2009:ModestProposal} who suggests making low-level internals extensible by package developers in order to facilitate extending \proglang{R}. \cite{TempleLang:2009:RGCCTranslationUnit}, using compiler output for references on the code in order to add bindings and wrappers, offers a slightly different angle. \subsection[Rcpp use cases]{\pkg{Rcpp} use cases} \label{sec:classic_rcpp} The core focus of \pkg{Rcpp} has always been on helping the programmer to more easily add \proglang{C++}-based functions. Here, we use `function' in the standard mathematical sense of providing results (output) given a set of parameters or data (input). This was facilitated from the earliest releases using \proglang{C++} classes for receiving various types of \proglang{R} objects, converting them to \proglang{C++} objects and allowing the programmer to return the results to \proglang{R} with relative ease. This API therefore supports two typical use cases. First, existing \proglang{R} code may be replaced by equivalent \proglang{C++} code in order to reap performance gains. This case is conceptually easy when there are (built- or run-time) dependencies on other \proglang{C} or \proglang{C++} libraries. It typically involves setting up data and parameters---the right-hand side components of a function call---before making the call in order to provide the result that is to be assigned to the left-hand side. Second, \pkg{Rcpp} facilitates calling functions provided by other libraries. The use resembles the first case but with an additional level of abstraction: data and parameters are passed via \pkg{Rcpp} to a function set-up to call code from an external library. Apart from this `vertical mode' of calling \proglang{C++} from \proglang{R}, additional features in the new API also support a more `horizontal mode' of directly calling \pkg{Rcpp} objects. This was motivated by the needs of other projects such as \pkg{RInside} \citep{CRAN:RInside} for easy embedding of \proglang{R} in \proglang{C++} applications and \pkg{RProtoBuf} \citep{CRAN:RProtoBuf} to interface with the Protocol Buffers library. This use will be touched upon in the next section, but a more detailed discussion is outside the scope of this paper. Lastly, the more recent additions `\pkg{Rcpp} modules' and `\pkg{Rcpp} sugar' also expand the use cases; see Section~\ref{sec:ongoing} below. \section[The Rcpp API]{The \pkg{Rcpp} API} \label{sec:new_rcpp} \subsection{A first example} We can illustrate the \pkg{Rcpp} API by revisiting the convolution example from the `Writing \proglang{R} Extensions' manual \citep[Chapter 5]{R:Extensions}. Using \pkg{Rcpp}, this function can be written as follows: % \begin{Code} #include RcppExport SEXP convolve3cpp(SEXP a, SEXP b) { Rcpp::NumericVector xa(a); Rcpp::NumericVector xb(b); int n_xa = xa.size(), 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; } \end{Code} % We can highlight several aspects. \begin{enumerate} \item Only a single header file \code{Rcpp.h} is needed to use the \pkg{Rcpp} API. \item \code{RcppExport} is a convenience macro helping with calling a \proglang{C} function from \proglang{C++}. \item Given two arguments of type \code{SEXP}, a third is returned (as using only \code{SEXP} types for input and output is prescribed by the \code{.Call()} interface of the \proglang{R} API). \item Both inputs are converted to \proglang{C++} vector types provided by \pkg{Rcpp} (and we have more to say about these conversions below). \item The usefulness of these classes can be seen when we query the vectors directly for their size---using the \code{size()} member function---in order to reserve a new result type of appropriate length, and with the use of the \verb|operator[]| to extract and set individual elements of the vector. \item The computation itself is straightforward embedded looping just as in the original examples in the `Writing \proglang{R} Extensions' manual \citep{R:Extensions}. \item The return conversion from the \code{NumericVector} to the \code{SEXP} type is also automatic. \end{enumerate} We argue that this \pkg{Rcpp}-based usage is much easier to read, write and debug than the \proglang{C} macro-based approach supported by \proglang{R} itself. \subsection[Rcpp class hierarchy]{\pkg{Rcpp} class hierarchy} The \code{Rcpp::RObject} class is the basic class of the new \pkg{Rcpp} API. An instance of the \code{RObject} class encapsulates an \proglang{R} object (itself represented by the \proglang{R} type \code{SEXP}), exposes methods that are appropriate for all types of objects and transparently manages garbage collection. The most important aspect of the \code{RObject} class is that it is a very thin wrapper around the \code{SEXP} it encapsulates. The \code{SEXP} is indeed the only data member of an \code{RObject}. The \code{RObject} class does not interfere with the way \proglang{R} manages its memory and does not perform copies of the object into a suboptimal \proglang{C++} representation. Instead, it merely acts as a proxy to the object it encapsulates so that methods applied to the \code{RObject} instance are relayed back to the \code{SEXP} in terms of the standard \proglang{R} API. The \code{RObject} class takes advantage of the explicit life cycle of \proglang{C++} objects to manage exposure of the underlying \proglang{R} object to the garbage collector. The \code{RObject} effectively treats its underlying \code{SEXP} as a resource. The constructor of the \code{RObject} class takes the necessary measures to guarantee that the underlying \code{SEXP} is protected from the garbage collector, and the destructor assumes the responsibility to withdraw that protection. By assuming the entire responsibility of garbage collection, \pkg{Rcpp} relieves the programmer from writing boiler plate code to manage the protection stack with \code{PROTECT} and \code{UNPROTECT} macros. The \code{RObject} class defines a set of member functions applicable to any \proglang{R} object, regardless of its type. This ranges from querying properties of the object (\texttt{isNULL}, \texttt{isObject}, \texttt{isS4}), management of the attributes (\texttt{attributeNames}, \texttt{hasAttribute}, \texttt{attr}) to handling of slots\footnote{Member functions dealing with slots are only applicable to \proglang{S}4 objects; otherwise an exception is thrown.} (\texttt{hasSlot}, \texttt{slot}). \subsection{Derived classes} Internally, an \proglang{R} object must have one type amongst the set of predefined types, commonly referred to as SEXP types. The `\proglang{R} Internals' manual \citep{R:Internals} documents these various types. \pkg{Rcpp} associates a dedicated \proglang{C++} class for most SEXP types, and therefore only exposes functionality that is relevant to the \proglang{R} object that it encapsulates. For example \code{Rcpp::Environment} contains member functions to manage objects in the associated environment. Similarly, classes related to vectors---\code{IntegerVector}, \code{NumericVector}, \code{RawVector}, \code{LogicalVector}, \code{CharacterVector}, \code{GenericVector} (also known as \code{List}) and \code{ExpressionVector}---expose functionality to extract and set values from the vectors. The following sections present typical uses of \pkg{Rcpp} classes in comparison with the same code expressed using functions and macros of the \proglang{R} API. \subsection{Numeric vectors} The next code snippet is taken from `Writing \proglang{R} Extensions' \citep[Section 5.9.1]{R:Extensions}. It allocates a \code{numeric} vector of two elements and assigns some values to it using the \proglang{R} API. % \begin{Code} SEXP ab; PROTECT(ab = allocVector(REALSXP, 2)); REAL(ab)[0] = 123.45; REAL(ab)[1] = 67.89; UNPROTECT(1); \end{Code} % Although this is one of the simplest examples in `Writing \proglang{R} Extensions', it seems verbose and yet it is not obvious at first sight what is happening. Memory is allocated by \code{allocVector}; we must also supply it with the type of data (\code{REALSXP}) and the number of elements. Once allocated, the \code{ab} object must be protected from garbage collection. Lastly, the \code{REAL} macro returns a pointer to the beginning of the actual array; its indexing does not resemble either \proglang{R} or \proglang{C++}. The code can be simplified using the \code{Rcpp::NumericVector} class: % \begin{Code} Rcpp::NumericVector ab(2); ab[0] = 123.45; ab[1] = 67.89; \end{Code} % The code contains fewer idiomatic decorations. The \code{NumericVector} constructor is given the number of elements the vector contains (2), which hides the call to the \code{allocVector} in the original code example. Also hidden is protection of the object from garbage collection, which is a behavior that \code{NumericVector} inherits from \code{RObject}. Values are assigned to the first and second elements of the vector as \code{NumericVector} overloads the \code{operator[]}. The snippet can also be written more concisely as a single statement using the \code{create} static member function of the \code{NumericVector} class: % \begin{Code} Rcpp::NumericVector ab = Rcpp::NumericVector::create(123.45, 67.89); \end{Code} \subsection{Character vectors} A second example deals with character vectors and emulates this \proglang{R} code: % \begin{CodeInput} R> c("foo", "bar") \end{CodeInput} % Using the traditional \proglang{R} API, the vector can be allocated and filled as such: % \begin{Code} SEXP ab; PROTECT(ab = allocVector(STRSXP, 2)); SET_STRING_ELT( ab, 0, mkChar("foo") ); SET_STRING_ELT( ab, 1, mkChar("bar") ); UNPROTECT(1); \end{Code} % This imposes on the programmer knowledge of \code{PROTECT}, \code{UNPROTECT}, \code{SEXP}, \code{allocVector}, \code{SET\_STRING\_ELT}, and \code{mkChar}. % Using the \code{Rcpp::CharacterVector} class, we can express the same code more concisely: % \begin{Code} Rcpp::CharacterVector ab(2); ab[0] = "foo"; ab[1] = "bar"; \end{Code} \section[R and C++ data interchange]{\proglang{R} and \proglang{C++} data interchange} In addition to classes, the \pkg{Rcpp} package contains two functions to perform conversion of \proglang{C++} objects to \proglang{R} objects and back. \subsection[C++ to R: wrap]{\proglang{C++} to \proglang{R}: \code{wrap}} The \proglang{C++} to \proglang{R} conversion is performed by the \code{Rcpp::wrap} templated function. It uses advanced template metaprogramming techniques\footnote{A discussion of template metaprogramming \citep{Vandevoorde+Josuttis:2003:Templates,Abrahams+Gurtovoy:2004:TemplateMetaprogramming} is beyond the scope of this article.} to convert a wide and extensible set of types and classes to the most appropriate type of \proglang{R} object. The signature of the \code{wrap} template is as follows: % \begin{Code} template SEXP wrap(const T& object); \end{Code} % The templated function takes a reference to a `wrappable' object and converts this object into a \code{SEXP}, which is what \proglang{R} expects. Currently wrappable types are: \begin{itemize} \item primitive types: \code{int}, \code{double}, \code{bool}, \dots which are converted into the corresponding atomic \proglang{R} vectors; \item \code{std::string} objects which are converted to \proglang{R} atomic character vectors; \item Standard Template Library (STL) containers such as \code{std::vector} or \code{std::map}, as long as the template parameter type \code{T} is itself wrappable; \item STL maps which use \code{std::string} for keys ({e.g.}, \code{std::map}); as long as the type \code{T} is wrappable; \item any type that implements implicit conversion to \code{SEXP} through the \code{operator SEXP()}; \item any type for which the \code{wrap} template is fully specialized. \end{itemize} Wrappability of an object type is resolved at compile time using modern techniques of template meta programming and class traits. The \code{Rcpp-extending} vignette in the \pkg{Rcpp} package discusses in depth how to extend \code{wrap} to third-party types. The \pkg{RcppArmadillo} \citep*{CRAN:RcppArmadillo} and \pkg{RcppGSL} \citep{CRAN:RcppGSL} packages feature several examples. The following segment of code illustrates that the design allows composition: \begin{Code} RcppExport SEXP someFunction() { std::vector > v; std::map m1; std::map m2; m1["foo"]=1; m1["bar"]=2; m2["foo"]=1; m2["bar"]=2; m2["baz"]=3; v.push_back( m1 ); v.push_back( m2 ); return Rcpp::wrap( v ); } \end{Code} % In this example, the STL types \verb+vector+ and \verb+map+ are used to create a list of two named vectors. The member function \verb+push_back+ insert a given element into a vector. This example is equivalent to the result of this \proglang{R} statement: % \begin{Code} list(c(bar = 2L, foo = 1L), c(bar = 2L, baz = 3L, foo = 1L)) \end{Code} \subsection[R to C++: as]{\proglang{R} to \proglang{C++}: \code{as}} The reverse conversion from an \proglang{R} object to a \proglang{C++} object is implemented by variations of the \code{Rcpp::as} template whose signature is: % \begin{Code} template T as(SEXP x); \end{Code} % It offers less flexibility and currently handles conversion of \proglang{R} objects into primitive types ({e.g.}, \code{bool}, \code{int}, \code{std::string}, \dots), STL vectors of primitive types ({e.g.}, \code{std::vector}, \code{std::vector}, \dots) and arbitrary types that offer a constructor that takes a \code{SEXP}. In addition \code{as} can be fully or partially specialized to manage conversion of \proglang{R} data structures to third-party types as can be seen for example in the \pkg{RcppArmadillo} package which eases transfer of \proglang{R} matrices and vectors to the optimised data structures in the \pkg{Armadillo} linear algebra library \citep{Sanderson:2010:Armadillo}. \subsection{Implicit use of converters} The converters offered by \code{wrap} and \code{as} provide a very useful framework to implement code logic in terms of \proglang{C++} data structures and then explicitly convert data back to \proglang{R}. In addition, the converters are also used implicitly in various places in the \code{Rcpp} API. Consider the following code that uses the \code{Rcpp::Environment} class to interchange data between \proglang{C++} and \proglang{R}. It accesses a vector \texttt{x} from the global environment, creates an STL \texttt{map} of string types and pushes this back to \proglang{R}: % \begin{Code} Rcpp::Environment global = Rcpp::Environment::global_env(); std::vector vx = global["x"]; std::map map; map["foo"] = "oof"; map["bar"] = "rab"; global["y"] = map; \end{Code} % In the first part of the example, the code extracts a \code{std::vector} from the global environment. In order to achieve this, the \code{operator[]} of \code{Environment} uses the proxy pattern \citep{Meyers:1995:MoreEffectiveC++} to distinguish between left hand side (LHS) and right hand side (RHS) use. The output of the \code{operator[]} is an instance of the nested class \code{Environment::Binding}. This class defines a templated implicit conversion operator. It is this conversion operator which allows a \code{Binding} object to be assigned to any type that \code{Rcpp::as} is able to handle. In the last part of the example, the LHS use of the \code{Binding} instance is implemented through its assignment operator. This is also templated and uses \code{Rcpp::wrap} to perform the conversion to a \code{SEXP} that can be assigned to the requested symbol in the global environment. The same mechanism is used throughout the API. Examples include access/modification of object attributes, slots, elements of generic vectors (lists), function arguments, nodes of dotted pair lists, language calls and more. \section{Function calls} \label{sec:functions} \begin{table}[t!] \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Environment: Using the \pkg{Rcpp} API}} \begin{Code} Environment stats("package:stats"); Function rnorm = stats["rnorm"]; return rnorm(10, Named("sd", 100.0)); \end{Code} \end{minipage} \begin{minipage}{0.06\linewidth} \phantom{XXX} \end{minipage} \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Environment: Using the \proglang{R} API}} \begin{Code} SEXP stats = PROTECT( R_FindNamespace( mkString("stats"))); SEXP rnorm = PROTECT( findVarInFrame(stats, install("rnorm"))); SEXP call = PROTECT( LCONS( rnorm, CONS(ScalarInteger(10), CONS(ScalarReal(100.0), R_NilValue)))); SET_TAG(CDDR(call),install("sd")); SEXP res = PROTECT(eval(call, R_GlobalEnv)); UNPROTECT(4); return res; \end{Code} \end{minipage} \bigskip \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Language: Using the \pkg{Rcpp} API}} \begin{Code} Language call("rnorm", 10, Named("sd",100.0)); return call.eval(); \end{Code} \end{minipage} \begin{minipage}{0.06\linewidth} \phantom{XXX} \end{minipage} \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Language: Using the \proglang{R} API}} \begin{Code} SEXP call = PROTECT( LCONS(install("rnorm"), CONS(ScalarInteger(10), CONS(ScalarReal(100.0), R_NilValue)))); SET_TAG(CDDR(call),install("sd")); SEXP res = PROTECT(eval(call, R_GlobalEnv)); UNPROTECT(2); return res; \end{Code} \end{minipage} \bigskip \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Sugar: Using the \pkg{Rcpp} API}} \begin{Code} RNGScope scope; return rnorm(10, 0, 100); \end{Code} \end{minipage} \begin{minipage}{0.06\linewidth} \phantom{XXX} \end{minipage} \begin{minipage}[t]{0.465\linewidth} \centering{\underline{Sugar: Using the \proglang{R} API}} \medskip (not applicable) \end{minipage} \bigskip \caption{\pkg{Rcpp} versus the \proglang{R} API: Five ways of calling \code{rnorm(10L, sd = 100)} in \proglang{C}/\proglang{C++}.} \label{fig:rnormCode} \medskip \small Note that we have removed the \code{Rcpp::} prefix for readability; this corresponds to adding a directive \texttt{using namespace Rcpp;} in the code. The versions that use callbacks to \proglang{R} do not require handling of the state of the random number generator. The version that uses \pkg{Rcpp} sugar requires it, which is done via the instantiation of the \code{RNGScope} variable. \end{table} The next example shows how to use \pkg{Rcpp} to emulate the \proglang{R} code \code{rnorm(10L, sd = 100.0)}. As shown in Table~\ref{fig:rnormCode}, the code can be expressed in several ways in either \pkg{Rcpp} or the standard \proglang{R} API. The first version shows the use of the \code{Environment} and \code{Function} classes by \pkg{Rcpp}. The second version shows the use of the \code{Language} class, which manages calls (LANGSXP). For comparison, we also show both versions using the standard \proglang{R} API. Finally, we also show a variant using `\pkg{Rcpp} sugar', a topic which is discussed in Sections~\ref{sec:perfcomp} and \ref{sec:ongoing} below. This example illustrates that the \pkg{Rcpp} API permits us to work with code that is easier to read, write and maintain. More examples are available as part of the documentation included in the \pkg{Rcpp} package, as well as among its over seven hundred and fifty unit tests. \section{Using code `inline'} \label{sec:inline} Extending \proglang{R} with compiled code requires a mechanism for reliably compiling, linking, and loading the code. While using a package is preferable in the long run, it may be too involved for quick explorations. An alternative is provided by the \pkg{inline} package \citep{CRAN:inline} which compiles, links and loads a \proglang{C}, \proglang{C++} or \proglang{Fortran} function---directly from the \proglang{R} prompt using simple functions \code{cfunction} and \code{cxxfunction}. The latter provides an extension which works particularly well with \pkg{Rcpp} via so-called `plugins' which provide information about additional header file and library locations. The use of \pkg{inline} is possible as \pkg{Rcpp} can be installed and updated just like any other \proglang{R} package using, for examples, the \code{install.packages()} function for initial installation as well as \code{update.packages()} for upgrades. So even though \proglang{R}/\proglang{C++} interfacing would otherwise require source code, the \pkg{Rcpp} library is always provided ready for use as a pre-built library through the CRAN package mechanism.\footnote{This presumes a platform for which pre-built binaries are provided. \pkg{Rcpp} is available in binary form for Windows and OS~X users from CRAN, and as a \code{.deb} package for Debian and Ubuntu users. For other systems, the \pkg{Rcpp} library is automatically built from source during installation or upgrades.} The library and header files provided by \pkg{Rcpp} for use by other packages are installed along with the \pkg{Rcpp} package. The \code{LinkingTo:}~\code{Rcpp} directive in the \code{DESCRIPTION} file lets \proglang{R} properly reference the header files. The \pkg{Rcpp} package provides appropriate information for the \code{-L} switch needed for linking via the function \code{Rcpp:::LdFlags()}. It can be used by \code{Makevars} files of other packages, and \pkg{inline} makes use of it internally so that all of this is done behind the scenes without the need for explicitly setting compiler or linker options. The convolution example provided above can be rewritten for use by \pkg{inline} as shown below. The function body is provided by the \proglang{R} character variable \code{src}, the function header is defined by the argument \code{signature}, and we only need to enable \code{plugin = "Rcpp"} to obtain a new \proglang{R} function \code{fun} based on the \proglang{C++} code in \code{src}: % \begin{CodeChunk} \begin{CodeInput} R> src <- ' + Rcpp::NumericVector xa(a); + Rcpp::NumericVector xb(b); + int n_xa = xa.size(), n_xb = xb.size(); + + Rcpp::NumericVector xab(n_xa + n_xb - 1); + 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; + ' R> fun <- cxxfunction(signature(a = "numeric", b = "numeric"), + src, plugin = "Rcpp") R> fun(1:3, 1:4) \end{CodeInput} \begin{CodeOutput} [1] 1 4 10 16 17 12 \end{CodeOutput} \end{CodeChunk} % With one assignment to the \proglang{R} variable \code{src}, and one call of the \proglang{R} function \code{cxxfunction} (provided by the \pkg{inline} package), we have created a new \proglang{R} function \code{fun} that uses the \proglang{C++} code we assigned to \code{src}---and all this functionality can be used directly from the \proglang{R} prompt making prototyping with \proglang{C++} functions straightforward. \textsl{Update}: \pkg{Rcpp} version 0.10.0 and later contain new and powerful feature called 'Rcpp Attributes' which provides an even more powerful mechanism; see \cite{CRAN:Rcpp:Attributes} for more details. \section{Using Standard Template Library algorithms} The STL offers a variety of generic algorithms designed to be used on ranges of elements \citep{Plauger+Et+Al:2000:STL}. A range is any sequence of objects that can be accessed through iterators or pointers. All \pkg{Rcpp} classes from the new API representing vectors (including lists) can produce ranges through their member functions \code{begin()} and \code{end()}, effectively supporting iterating over elements of an \proglang{R} vector. The following code illustrates how \pkg{Rcpp} might be used to emulate a simpler\footnote{The version of \code{lapply} does not allow use of the ellipsis (\code{...}).} version of \code{lapply} using the \code{transform} algorithm from the STL. % \begin{CodeChunk} \begin{CodeInput} R> src <- ' + Rcpp::List input(data); + Rcpp::Function f(fun); + Rcpp::List output(input.size()); + std::transform(input.begin(), input.end(), output.begin(), f); + output.names() = input.names(); + return output; + ' R> cpp_lapply <- cxxfunction(signature(data = "list", fun = "function"), + src, plugin = "Rcpp") \end{CodeInput} \end{CodeChunk} % We can now use this \code{cpp_lapply} function to calculate a summary of each column of the \code{faithful} data set included with \proglang{R}. % \begin{CodeInput} R> cpp_lapply(faithful, summary) \end{CodeInput} \begin{CodeOutput} $eruptions Min. 1st Qu. Median Mean 3rd Qu. Max. 1.600 2.163 4.000 3.488 4.454 5.100 $waiting Min. 1st Qu. Median Mean 3rd Qu. Max. 43.0 58.0 76.0 70.9 82.0 96.0 \end{CodeOutput} \section{Error handling} Code that uses both \proglang{R} and \proglang{C++} has to deal with two distinct error handling models. \pkg{Rcpp} simplifies this and allows both systems to work together. \subsection[C++ exceptions in R]{\proglang{C++} exceptions in \proglang{R}} The internals of the \proglang{R} condition mechanism and the implementation of \proglang{C++} exceptions are both based on a layer above POSIX jumps. These layers both assume total control over the call stack and should not be used together without extra precaution. \pkg{Rcpp} contains facilities to combine both systems so that \proglang{C++} exceptions are caught and recycled into the \proglang{R} condition mechanism. \pkg{Rcpp} defines the \code{BEGIN\_RCPP} and \code{END\_RCPP} macros that should be used to bracket code that might throw \proglang{C++} exceptions. % \begin{Code} RcppExport SEXP fun( SEXP x ) { BEGIN_RCPP int dx = Rcpp::as(x); if( dx > 10 ) throw std::range_error("too big"); return Rcpp::wrap( dx * dx); END_RCPP } \end{Code} % The macros are simply defined to avoid code repetition. They expand to simple \code{try}/\code{catch} blocks so that the above example becomes: % \begin{Code} RcppExport SEXP fun( SEXP x ) { try { int dx = Rcpp::as(x); if( dx > 10 ) throw std::range_error("too big"); return Rcpp::wrap( dx * dx); } catch( std::exception& __ex__ ) { forward_exception_to_r( __ex__ ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } } \end{Code} % Using \code{BEGIN\_RCPP} and \code{END\_RCPP}---or the expanded versions---guarantees that the stack is first unwound in terms of \proglang{C++} exceptions, before the problem is converted to the standard \proglang{R} error management system using the function \code{Rf\_error} of the \proglang{R} API. The \code{forward\_exception\_to\_r} function uses run-time type information to extract information about the class of the \proglang{C++} exception and its message so that dedicated handlers can be installed on the \proglang{R} side. % \begin{CodeChunk} \begin{CodeInput} R> f <- function(x) .Call("fun", x) R> tryCatch(f(12), "std::range_error" = function(e) { conditionMessage(e) }) \end{CodeInput} \begin{CodeOutput} [1] "too big" \end{CodeOutput} \begin{CodeInput} R> tryCatch(f(12), "std::range_error" = function(e) { class(e) }) \end{CodeInput} \begin{CodeOutput} [1] "std::range_error" "C++Error" "error" "condition" \end{CodeOutput} \end{CodeChunk} % A serious limitation of this approach is the lack of support for calling handlers. \proglang{R} calling handlers are also based on POSIX jumps, and using both calling handlers from the \proglang{R} engine as well \proglang{C++} exception forwarding might lead to undetermined results. Future versions of \pkg{Rcpp} might attempt to to improve this issue. \subsection[R errors in C++]{\proglang{R} errors in \proglang{C++}} \proglang{R} itself currently does not offer \proglang{C}-level mechanisms to deal with errors. To overcome this problem, \pkg{Rcpp} uses the \code{Rcpp\_eval} function to evaluate an \proglang{R} expression in an R-level \code{tryCatch} block. The error, if any, that occurs while evaluating the function is then translated into an \proglang{C++} exception that can be dealt with using regular \proglang{C++} \code{try}/\code{catch} syntax. An open (and rather hard) problem, however, is posed by the fact that calls into the \proglang{C} API offered by \proglang{R} cannot be reliably protected. Such calls can always encounter an error condition of their own triggering a call to \code{Rf_error} which will lead to a sudden death of the program. In particular, neither \proglang{C++} class destructors nor \code{catch} parts of outer \code{try}/\code{catch} blocks will be called. This leaves the potential for memory or resource leakage. So while newly written code can improve on this situation via use of \proglang{C++} exception handling, existing code calling into the \proglang{C} API of \proglang{R} cannot be amended just by having an outer layer of exception handling around it. \section{Performance comparison} \label{sec:perfcomp} In this section, we present several different ways to leverage \pkg{Rcpp} to rewrite the convolution example from `Writing \proglang{R} Extensions' \citep[Chapter 5]{R:Extensions} first discussed in Section~\ref{sec:new_rcpp}. As part of the redesign of \pkg{Rcpp}, data copy is kept to the absolute minimum: The \code{RObject} class and all its derived classes are just a container for a \code{SEXP} object. We let \proglang{R} perform all memory management and access data though the macros or functions offered by the standard \proglang{R} API. The implementation of the \code{operator[]} is designed to be as efficient as possible, using both inlining and caching, but even this implementation is still less efficient than the reference \proglang{C} implementation described in \cite{R:Extensions}. \pkg{Rcpp} follows design principles from the STL, and classes such as \code{NumericVector} expose iterators that can be used for sequential scans of the data. Algorithms using iterators are usually more efficient than those that operate on objects using the \code{operator[]}. The following version of the convolution function illustrates the use of the \code{NumericVector::iterator}. % \begin{Code} #include RcppExport SEXP convolve4cpp(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; } \end{Code} % One of the focuses of recent developments of \pkg{Rcpp} is called `\pkg{Rcpp} sugar', and aims to provide R-like syntax in \proglang{C++}. While a fuller discussion of \pkg{Rcpp} sugar is beyond the scope of this article, we have included another version of the convolution algorithm based on \pkg{Rcpp} sugar for illustrative purposes here: % \begin{Code} #include RcppExport SEXP convolve11cpp(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, 0.0); Rcpp::Range r( 0, n_xb-1 ); for (int i=0; i} & 683 & 3.13 \\ \bottomrule \end{tabular} \end{small} \caption{Run-time performance of the different convolution examples.} \label{tab:benchmark} \end{center} \end{table} The first implementation, written in \proglang{C} and using the traditional \proglang{R} API, provides our base case. It takes advantage of pointer arithmetics and therefore does not to pay the price of \proglang{C++} object encapsulation or operator overloading. The slowest solution illustrates the price of object encapsulation. Calling an overloaded \code{operator[]} as opposed to using direct pointer arithmetics as in the reference case costs about 29\% in performance. The next implementation uses iterators rather than indexing. Its performance is indistinguishable from the base case. This also shows that the use of \proglang{C++} may not necessarily imply any performance penalty. Further, \proglang{C++} \code{iterators} can be used to achieve the performance of \proglang{C} pointers, but without the potential dangers of direct memory access via pointers. Finally, the fastest implementation uses \pkg{Rcpp} sugar. It performs significantly better than the base case. Explicit loop unrolling provides us with vectorization at the \proglang{C++} level which is responsible for this particular speedup. \section{On-going development} \label{sec:ongoing} \pkg{Rcpp} is in very active development: Current work in the package (and in packages such as \pkg{RcppArmadillo}) focuses on further improving interoperability between \proglang{R} and \proglang{C++}. Two core themes for on-going development are `\pkg{Rcpp} sugar' as well as `\pkg{Rcpp} modules', both of which are also discussed in more detail in specific vignettes in the \pkg{Rcpp} package. `\pkg{Rcpp} sugar' offers syntactic sugar at the \proglang{C++} level, including optimized binary operators and many \proglang{R} functions such as \code{ifelse}, \code{sapply}, \code{any}, \code{head}, \code{tail}, and more. The main technique used in \pkg{Rcpp} sugar is expression templates pioneered by the \pkg{Blitz++} library \citep{Veldhuizen:1998:Blitz} and since adopted by projects such as \pkg{Armadillo} \citep{Sanderson:2010:Armadillo}. Access to most of the d/p/q/r-variants of the statistical distribution functions has also been added, enabling the use of expressions such as \code{dnorm(X, m, s)} for a numeric vector \code{X} and scalars \code{m} and \code{s}. This was shown in Table~\ref{fig:rnormCode} in Section~\ref{sec:functions} above where the \proglang{R} expression \code{rnorm(10L, sd = 100)} was rewritten in \proglang{C++} as \code{rnorm(10, 0, 100)}. Note that \proglang{C++} semantics require the second parameter to be used here, which is different from the \proglang{R} case. `\pkg{Rcpp} modules' allows programmers to expose \proglang{C++} functions and classes at the \proglang{R} level. This offers access to \proglang{C++} code from \proglang{R} using even less interface code than by writing accessor functions. Modules are inspired by the \pkg{Boost.Python} library \citep{Abrahams+Grosse-Kunstleve:2003:Boost.Python} which provides similar functionality for \proglang{Python}. \proglang{C++} classes exposed by \pkg{Rcpp} modules are shadowed by reference classes which have been introduced in \proglang{R} 2.12.0. \textsl{Update}: Besides the vignettes for '\pkg{Rcpp} Sugar' \citep{CRAN:Rcpp:Sugar} and '\pkg{Rcpp} Modules' \citep{CRAN:Rcpp:Modules}, the aforementioned vignette for '\pkg{Rcpp} Attributes' \citep{CRAN:Rcpp:Attributes} describes a new possibility for even more direct integration between \proglang{Rcpp} and \proglang{C++}. \section{Summary} The \pkg{Rcpp} package presented in this paper greatly simplifies integration of compiled \proglang{C++} code with \proglang{R}. \pkg{Rcpp} provides a \proglang{C++} class hierarchy which allows manipulation of \proglang{R} data structures in \proglang{C++} using member functions and operators directly related to the type of object being used, thereby reducing the level of expertise required to master the various functions and macros offered by the internal \proglang{R} API. The classes assume the entire responsibility of garbage collection of objects, relieving the programmer from book-keeping operations with the protection stack and enabling him/her to focus on the underlying problem. Data interchange between \proglang{R} and \proglang{C++} code is performed by the \code{wrap()} and \code{as()} template functions. They allow the programmer to write logic in terms of \proglang{C++} data structures, and facilitate use of modern libraries such as the Standard Template Library (STL) and its containers and algorithms. The \code{wrap()} and \code{as()} template functions are extensible by design. They are also used either explicitly or implicitly throughout the API. By using only thin wrappers around \code{SEXP} objects and adopting \proglang{C++} idioms such as iterators, the footprint of the \pkg{Rcpp} API is very lightweight, and does not incur a significant performance penalty. The \pkg{Rcpp} API offers opportunities to dramatically reduce the complexity of code, which should lower the initial cost of writing code and improve code readability, maintainability, and reuse---without incurring noticeable penalties in run-time performance. \section*{Acknowledgments} Detailed comments and suggestions by editors as well as anonymous referees are gratefully acknowledged. We are also thankful for code contributions by Douglas Bates and John Chambers, as well as for very helpful suggestions by Uwe Ligges, Brian Ripley and Simon Urbanek concerning the build systems for different platforms. Last but not least, several users provided very fruitful ideas for new or extended features via the \code{rcpp-devel} mailing list. \bibliography{Rcpp} \vspace*{-0.35cm} \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: rcpp-0.11.0/inst/doc/Rcpp-extending.Rnw0000644000000000000000000002344712273452733014546 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-extending} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, package} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color, alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} %% defined as a stop-gap measure til interaction with highlight is sorted out \newcommand{\hlboxlessthan}{ \hlnormalsizeboxlessthan} \newcommand{\hlboxgreaterthan}{\hlnormalsizeboxgreaterthan} \newcommand{\hlboxopenbrace}{ \hlnormalsizeboxopenbrace} \newcommand{\hlboxclosebrace}{ \hlnormalsizeboxclosebrace} \newcommand{\hlboxbacktick}{ \hlnormalsizeboxbacktick} \newcommand{\hlboxunderscore}{ \hlnormalsizeboxunderscore} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") require(inline) require(highlight) require(Rcpp) @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{Extending \pkg{Rcpp}} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This note provides an overview of the steps programmers should follow to extend \pkg{Rcpp} \citep{CRAN:Rcpp,JSS:Rcpp} for use with their own classes. This document is based on our experience in extending \pkg{Rcpp} to work with the \pkg{Armadillo} \citep{Sanderson:2010:Armadillo} classes, available in the separate package \pkg{RcppArmadillo} \citep{CRAN:RcppArmadillo}. This document assumes knowledge of \pkg{Rcpp} as well as some knowledge of \proglang{C++} templates \citep{Abrahams+Gurtovoy:2004:TemplateMetaprogramming}. } \section{Introduction} \pkg{Rcpp} facilitates data interchange between \proglang{R} and \proglang{C++} through the templated functions \texttt{Rcpp::as} (for conversion of objects from \proglang{R} to \proglang{C++}) and \texttt{Rcpp::wrap} (for conversion from \proglang{C++} to \proglang{R}). In other words, we convert between the so-called \proglang{S}-expression pointers (in type \texttt{SEXP}) to a templated \proglang{C++} type, and vice versa. The corresponding function declarations are as follows: <>= // conversion from R to C++ template T as( SEXP x) ; // conversion from C++ to R template SEXP wrap(const T& object) ; @ These converters are often used implicitly, as in the following code chunk: <>= code <- ' // we get a list from R List input(input_) ; // pull std::vector from R list // this is achieved through an implicit call to Rcpp::as std::vector x = input["x"] ; // return an R list // this is achieved through implicit call to Rcpp::wrap return List::create( _["front"] = x.front(), _["back"] = x.back() ) ; ' writeLines( code, "code.cpp" ) @ <>= external_highlight( "code.cpp", type = "LATEX", doc = FALSE ) @ <<>>= fx <- cxxfunction( signature( input_ = "list"), paste( readLines( "code.cpp" ), collapse = "\n" ), plugin = "Rcpp" ) input <- list( x = seq(1, 10, by = 0.5) ) fx( input ) @ The \pkg{Rcpp} converter function \texttt{Rcpp::as} and \texttt{Rcpp::wrap} have been designed to be extensible to user-defined types and third-party types. \section[Extending Rcpp::wrap]{Extending \texttt{Rcpp::wrap} } The \pkg{Rcpp::wrap} converter is extensible in essentially two ways : intrusive and non-intrusive. \subsection{Intrusive extension} When extending \pkg{Rcpp} with your own data type, the recommended way is to implement a conversion to \texttt{SEXP}. This lets \texttt{Rcpp::wrap} know about the new data type. The template meta programming (or TMP) dispatch is able to recognize that a type is convertible to a \texttt{SEXP} and \texttt{Rcpp::wrap} will use that conversion. The caveat is that the type must be declared before the main header file \texttt{Rcpp.h} is included. <>= #include class Foo { public: Foo() ; // this operator enables implicit Rcpp::wrap operator SEXP() ; } #include @ This is called \emph{intrusive} because the conversion to \texttt{SEXP} operator has to be declared within the class. \subsection{Non-intrusive extension} It is often desirable to offer automatic conversion to third-party types, over which the developer has no control and can therefore not include a conversion to \texttt{SEXP} operator in the class definition. To provide automatic conversion from \proglang{C++} to \proglang{R}, one must declare a specialization of the \texttt{Rcpp::wrap} template between the includes of \texttt{RcppCommon.h} and \texttt{Rcpp.h}. <>= #include // third party library that declares class Bar #include // declaring the specialization namespace Rcpp { template <> SEXP wrap( const Bar& ) ; } // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ It should be noted that only the declaration is required. The implementation can appear after the \texttt{Rcpp.h} file is included, and therefore take full advantage of the \pkg{Rcpp} type system. \subsection{Templates and partial specialization} It is perfectly valid to declare a partial specialization for the \texttt{Rcpp::wrap} template. The compiler will identify the appropriate overload: <>= #include // third party library that declares template class Bling #include // declaring the partial specialization namespace Rcpp { namespace traits { template SEXP wrap( const Bling& ) ; } } // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ \section[Extending Rcpp::as]{Extending \texttt{Rcpp::as}} Conversion from \proglang{R} to \proglang{C++} is also possible in both intrusive and non-intrusive ways. \subsection{Intrusive extension} As part of its template meta programming dispatch logic, \pkg{Rcpp::as} will attempt to use the constructor of the target class taking a \texttt{SEXP}. <>= #include #include class Foo{ public: Foo() ; // this constructor enables implicit Rcpp::as Foo(SEXP) ; } #include // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ \subsection{Non intrusive extension} It is also possible to fully specialize \texttt{Rcpp::as} to enable non intrusive implicit conversion capabilities. <>= #include // third party library that declares class Bar #include // declaring the specialization namespace Rcpp { template <> Bar as( SEXP ) ; } // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ \subsection{Templates and partial specialization} The signature of \texttt{Rcpp::as} does not allow partial specialization. When exposing a templated class to \texttt{Rcpp::as}, the programmer must specialize the \pkg{Rcpp::traits::Exporter} template class. The TMP dispatch will recognize that a specialization of \texttt{Exporter} is available and delegate the conversion to this class. \pkg{Rcpp} defines the \texttt{Rcpp::traits::Exporter} template class as follows : <>= namespace Rcpp { namespace traits { template class Exporter{ public: Exporter( SEXP x ) : t(x){} inline T get(){ return t ; } private: T t ; } ; } } @ This is the reason why the default behavior of \texttt{Rcpp::as} is to invoke the constructor of the type \texttt{T} taking a \texttt{SEXP}. Since partial specialization of class templates is allowed, we can expose a set of classes as follows: <>= #include // third party library that declares template class Bling #include // declaring the partial specialization namespace Rcpp { namespace traits { template class Exporter< Bling >; } } // this must appear after the specialization, // otherwise the specialization will not be seen by Rcpp types #include @ Using this approach, the requirements for the \texttt{Exporter< Bling >} class are: \begin{itemize} \item it should have a constructor taking a \texttt{SEXP} \item it should have a methods called \texttt{get} that returns an instance of the \texttt{Bling} type. \end{itemize} <>= unlink( "code.cpp" ) @ \section{Summary} The \pkg{Rcpp} package greatly facilitates the transfer of objects between \proglang{R} and \proglang{C++}. This note has shown how to extend \pkg{Rcpp} to either user-defined or third-party classes via the \texttt{Rcpp::as} and \texttt{Rcpp::wrap} template functions. Both intrusive and non-intrusive approaches were discussed. \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/inst/doc/Rcpp-introduction.R0000644000000000000000000000053712273452733014730 0ustar ### R code from vignette source 'Rcpp-introduction.Rnw' ################################################### ### code chunk number 1: prelim ################################################### library(Rcpp) rcpp.version <- packageDescription("Rcpp")$Version rcpp.date <- packageDescription("Rcpp")$Date now.date <- strftime(Sys.Date(), "%B %d, %Y") rcpp-0.11.0/inst/doc/Rcpp-unitTests.pdf0000644000000000000000000016265512273452733014573 0ustar %PDF-1.5 % 5 0 obj << /Length 926 /Filter /FlateDecode >> stream xVKS0+|L Id[N'JgBpdB}w#S'å=-߾WUģ;|pgPHL $p"LhJ2k o0)t`X ":>o]nfygETHprZzD *̌xS'K/(/H|D DrUEƙnKeyIY4 j|CH.K.IdYM%R-xMLV/rP 4vnPj}GO43P]9[/)OM* U(dZ2͠ )poLG_l{bO\X8=N֬T+_FޟH /OjsC"IW9tccZ} lܜ֙;\KCл 8tL(`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-w_ PM5;hs}|p91,ϦÀ6 w")c#,$~$s;W풩F,;*2by\H^h2H#nۨtS?kϭU9Z4YAZm.L!^*DLx0כ&5GVS(mE Tn^}ylc  5Nymʑ6]j \\Ux6 $B zwJ޼'>''/32**фL(rIpp+#i,WaZheF̥/|rY)Yfvtu:Msە nvS@zMJ*nOsCrkk Dzǫ2N7𮄊<9F蚠m(*Bu{PJH.ѕNPUK9X}&Xb^wۘ2Jxː&vZAt&p/X& \&3 ۆ(hD[Û5 2ߋy(E, bE"wHp78<&F\wZVB6-g2XiKh¨T?B, Kgi~ kDyRT ,1,P]j0|U=ʙۍ}e `n&)rx(h/ZV反 (M) #YB)&`p|KF=}ى3[U;7B~4X1k&(]. mKNmaXA Nh#|,6v[ͳtFi@R{ Z{}3Ă\|K3 m3p3 s}-bs7f=:~)Yn39Mba0g+!kصwsPUoJm|Cjqj-vY0 ~ .Aස^dΛh@JuBJ&s{:z%5W?7~ y]_5Wd8ƣZl,/5tRrE{.y\cաv_pecctXHkX)@jcoNɓN`أ\9_gآfPI}]%Dirv_Y&s#n7 SrGH :IS*鵆|YiwJ2dڈ9>}4#'^^q=6c[+1WfcK@Obf/yv˹ Nb/e}|n|s^:AGE~Kfߗ"{vЊ'6WKphX)9fKlr 4f Y13Q {J53K8 #gLݮQ4m"}f 2|y'XXz+}Xxr@{pt:{j#U,i#؃;Yl~ qP-ր4^d F3MR;SR'}*QYIX׮SX◤3٬ZSh|m>)t7F.]A; \: endstream endobj 39 0 obj << /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.14)/Keywords() /CreationDate (D:20140202082739-06'00') /ModDate (D:20140202082739-06'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 2 0 obj << /Type /ObjStm /N 30 /First 217 /Length 1629 /Filter /FlateDecode >> stream xXn8}WED*( ҴA6yP%X$~!e[V=g IQL1%eB:1aA &S̈́fRK֥LdLy=<Ҏdʬ2Lbz晔bL*&Rh0Yʤ8tK$fHHjɨF2RfEJSaa8 2JL2Es2!Y{1z1㯫ӊ=v=g/_bxO ƏbwY[چ񓢩h?02ߩY &2ZjL'H36l AsV@RFLĦIYaG M}e}"10"đi h$M,(ADB'?ɸh¹iqײ`̤y/dzNj6tF]~[ѷKt *DGG *L~(~б[d{@-M{ר?{Oe{P俚Mrve$H.gZ%(><$*P"ؙ,K38Ω1%dxqa{ZBb^I螎.Jhmd Wԏt-J-.QAJIUQ͂9f8-SFtv1mޤ=RӱI<<΅>>XIűeHǢ-JAS̈́* bhjmJRh2 $Ltvj6wZ쎆(Q& e1VfZBЧYT}Zfdt-cnn_gQ!rܪ,tq!S .:utSk9sT !![버((d\q;s 4ClY'OnNz&"ǫXqm c.&zx<ͤ.mUs.'{YH LkO-ؖ48rCv3! D*^K0xr=,IZxy'OxK>3^9oxyj.B_vDc)a10>D%Y=ONw!]HX/ ^eӜOۜ_"W /MW6dyQ%CjuJ/ChBbRCcQФ|@ A*9]lO)>Xm‡Ӌxv!c "o&e9)t|7_Q%k3͛~Q,iq. Q!-BQdjVº7jlV6.ᦼ TM]D}wh'opikH,,+`\JVin| lmݷ{7[Ԧi%ހ-ְmm5m\6MYρq34p6~϶@#lKGָ9 c昝nSLڲF,!<-ہʾA@Ns*YQDE@cGe?4E;blm/Z endstream endobj 40 0 obj << /Type /XRef /Index [0 41] /Size 41 /W [1 2 1] /Root 38 0 R /Info 39 0 R /ID [<50D3635D4AC4BFEDBAFB4FA3297F11C9> <50D3635D4AC4BFEDBAFB4FA3297F11C9>] /Length 116 /Filter /FlateDecode >> stream x˽PF(jF`bf+dXYf ޝY3 B"+|Pa1b~a9X"GJ[zލ^GpjnS r endstream endobj startxref 58431 %%EOF rcpp-0.11.0/inst/doc/Rcpp-package.pdf0000644000000000000000000045027412273452733014161 0ustar %PDF-1.5 % 100 0 obj << /Length 3248 /Filter /FlateDecode >> stream xZ[o~ $!G[\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yyԝwI)JT,*$Oy1QD[.zS7ۜ1O򹌋Aa6{ !IR\hL3 n*(}GTD̒?WF4EPs4Y Ǧ؟b?=%Z}[4FJy&X?I|R,=%jfߖF Qkv~:qexv."& ޺k?G_.LM :[g!7XZSx(=.2㌙kI,QYlF4/h~MS}^ɳR \l\Y~\ x1F 3Dޫ$p~|"d`#☀C~RMe4c{{&/H* endstream endobj 206 0 obj << /Length 99 /Filter /FlateDecode >> stream x332V0P04U02!sCB. P"ɥ`U()*Mw pV0wQ6T0tQ Hpzrr;a endstream endobj 207 0 obj << /Length 113 /Filter /FlateDecode >> stream x332V0PP06S02U01SH1*24 (Bes< ͸=\ %E\N \. ц \.  33qzrrJi` endstream endobj 223 0 obj << /Length1 1456 /Length2 12390 /Length3 0 /Length 13394 /Filter /FlateDecode >> stream xڝvstd{mlTlccwA%c6;NvǶmtl]y֚sa=TIQ$icĂ@I)f:XA@G33 jkPsXamLVv1[7{sS3ǿ@dmdhi`2_@2FL 1) /$bi `r;&617Y;-?6 GLL)E y 58@EFJZMG`c?*36v2r|?n?h?7w4Lu߭,m>P?jv4lAVdh`HHG{s">>:r[ v 5()dcbcfdh>~@79p;?Cˏ>J2ؘmWo$faecEhXMC@7?h4rgZ;} uuz+ VN#@r,llLGMA 3Y?Q?1~[#0skᅫ?.6&։hlcm0 0+8~ @&0QRhPbf@6hen&h7 GDM?#sIsWh߿խA %4n rp !13gVRE_NJ@skǿX,oz~,+@w 6166 DEm\\\F6v.+ߡ?>g@ ##:iʰgb~C/kuEM!C`RCcxUBflk `W(R=Il$?$=+34|/]uށ1LV$s,V_gI1>8~83~^=رv50._7ٷ_ =b>-nl5e {rE3qi_K ;VQ(2 _#ů2mwG¥)6rj鈈_8bs 'IG K[F}FF!_U-%Q}1L?JR>C[/If1`j%3}K&n]hFf|6>]r0O߈>-ꚿl IxX'ܱd hyG0d$r , M@pA,!A:(^fv""HKw#ew[J4)p)㖏oq}]k*%d9u/\ovx;>8q'9|zx9c >]۸cũKZ/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S-#j254D6 {E(Gp^ % ڬzVH)ƣ[Z1de3[䍼1shsXB[2~y8[d61CvN^sƆ쎾h ){M&C(2kfF1w,N!c7QigC (Ýp>y+oq)?O{+7^Sˊ79;wlb~G}&.I.@_UkDyߪѵ&op;W2r-F>j9d_qPl>h%3 X>HWZAV}':zqa5gѸ^ ׏>}w\V㝗[;: Ǔ¶Ko+oqר;B&=~(D`ٓ|2||wiwmU!;`Zatě%Y/q-vQ^}.~/>bEW|\-HTǿű8}1b(Fb4ę8ёUDLߪJL?ĹM|_xm>Hڴsw?~Kp8U#N~<]\gZ_!hVJs|%8?k%Jog2Umv:=NND5O_zU8_ħF1>24Ӻ5΃/_ps幛(OAw8_-*5tp )t wtMռ4"K([k E^[68^R__Qx^idžQ5FҮt#?}w{jY{?݅=M%j^Etmtizr. <}sr獒W3Ԍĵ3oq%N/1uݟ&^\ŒCCl9^O-~Z%MnͭZ˱ υ[l5^vA5\x<,чAݨm[θ͍ۯWx'ww}kYkRnFn>eO!ρMep,j,xEL SF)&\k?_dF,*7"/Żn7Nu'~O?8DwJ>ML㫽Ot~0p|d7-JP3%3`#Gz^MyX5FYmWONOl>گ!jkEVZ 3Z-$7㼸K(=| jZ]݊Aua;>ƅhd X`Ň~a҅1M1/W'SF B]eV#{Jle&!3ہIM Hu\hxکPN˹\F%l;ƙ }6q)xDiuD}%J_mB__K6m}P["ƪsF2A2>-(Mc-VT2X٢U\_.td֬_Ͽ\,~ɘ]ІkMo>2^1XߞK-_DK[fК} endstream endobj 262 0 obj << /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.14)/Keywords() /CreationDate (D:20140202082725-06'00') /ModDate (D:20140202082725-06'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 247 0 obj << /Type /ObjStm /N 36 /First 291 /Length 1141 /Filter /FlateDecode >> stream xڭW]o6}ׯc3EEɖv@>(6p,ϢJ<؃As=$eaD1EJe )"J"q1CK$J1KJ$FDHa4EPA0s38T"fYȈ@PRJADȓd `Al3 J8 , ;" Xf .,"  g c69CcHnW1YC2^hS3xq|4I2W@7geK]ޔhs̞$㛼bm*(s?ۯ_hv=qFK2"85qh7$,.۷ŧIM-VYeYSeFWxVA4\ٍ`)#%nzMZE3JtP! ,/ k;?me,Lwf7xdc<Tv֥—s/^K8B2ĉgpT#0L{. 4½\F+Jo%ZBJV@ f#C35NC_x^e={CyGV:N&O+wa塻]5I I/^e[M&NaD62Cq$#1l9ۭߘΚWgrg Owj0\@w,ͮ4Gra_$誀l>W=LL9G+ȩeܖ%40= ] /Length 624 /Filter /FlateDecode >> stream x9SA<7D <炠U; ,3Hhޡ3wznߞsfRJ_N)H}j|*@u`A6P;vv} ^Rۋj{+jT;@ŗ^LQވ nŭ<$Ӌ͋wS1Ժyc8S|$j>e'vOcuUp".+*up0 F( ZnfaT>zXUjCxYBľbHl.<S`́HmOPgSEa|^` ,^<[= +H-V C9"ҠSkﮑ+?9NNYF䄑+9WIN3DD"T46 Wţa[ЈЈЈtgSED4ѵh"";MJەA@50 [-tWnj&gH>ZET׬#Z-DZj)/F Ƚ_V"jFA,WpB  .\(~ϼo{Oyz*h endstream endobj startxref 150860 %%EOF rcpp-0.11.0/inst/doc/Rcpp-attributes.Rnw0000644000000000000000000005374512273452733014753 0ustar \documentclass[11pt]{article} %\VignetteIndexEntry{Rcpp-attributes} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, attributes} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{1.25in}{1.25in}{1.25in}{1.25in} \usepackage{textcomp} \usepackage{color, alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} \newcommand{\code}[1]{\texttt{#1}} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.98\linewidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") @ \author{J.J. Allaire \and Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{\pkg{Rcpp} Attributes} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent \textsl{Rcpp attributes} provide a high-level syntax for declaring \proglang{C++} functions as callable from \proglang{R} and automatically generating the code required to invoke them. Attributes are intended to facilitate both interactive use of \proglang{C++} within \proglang{R} sessions as well as to support \proglang{R} package development. The implementation of attributes is based on previous work in the \pkg{inline} package \citep{CRAN:inline}. } \section{Introduction} Attributes are a new feature of \pkg{Rcpp} version 0.10.0 \citep{CRAN:Rcpp,JSS:Rcpp} that provide infrastructure for seamless language bindings between \proglang{R} and \proglang{C++}. The motivation for attributes is several-fold: \begin{enumerate} \item Reduce the learning curve associated with using C++ and R together \item Eliminate boilerplate conversion and marshaling code wherever possible \item Seamless use of C++ within interactive R sessions \item Unified syntax for interactive work and package development \end{enumerate} The core concept is to add annotations to \proglang{C++} source files that provide the context required to automatically generate \proglang{R} bindings to \proglang{C++} functions. Attributes and their supporting functions include: \begin{itemize} \item \texttt{Rcpp::export} attribute to export a \proglang{C++} function to \proglang{R} \item \texttt{sourceCpp} function to source exported functions from a file \item \texttt{cppFunction} and \texttt{evalCpp} functions for inline declarations and execution \item \texttt{Rcpp::depends} attribute for specifying additional build dependencies for \texttt{sourceCpp} \end{itemize} Attributes can also be used for package development via the \texttt{compileAttributes} function, which automatically generates \texttt{extern "C"} and \texttt{.Call} wrappers for \proglang{C++} functions within pacakges. \section{Using Attributes} Attributes are annotations that are added to C++ source files to provide additional information to the compiler. \pkg{Rcpp} supports attributes to indicate that C++ functions should be made available as R functions, as well as to optionally specify additional build dependencies for source files. \proglang{C++11} specifies a standard syntax for attributes \citep{Maurer+Wong:2008:AttributesInC++}. Since this standard isn't yet fully supported across all compilers, \pkg{Rcpp} attributes are included in source files using specially formatted comments. \subsection{Exporting C++ Functions} The \texttt{sourceCpp} function parses a \proglang{C++} file and looks for functions marked with the \texttt{Rcpp::export} attribute. A shared library is then built and its exported functions are made available as R functions in the specified environment. For example, this source file contains an implementation of convolve (note the \texttt{Rcpp::export} attribute in the comment above the function): <>= #include using namespace Rcpp; // [[Rcpp::export]] 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; } @ The addition of the export attribute allows us to do this from the \proglang{R} prompt: <>= sourceCpp("convolve.cpp") convolveCpp(x, y) @ We can now write \proglang{C++} functions using built-in \proglang{C++} types and \pkg{Rcpp} wrapper types and then source them just as we would an \proglang{R} script. The \texttt{sourceCpp} function performs caching based on the last modified date of the source file so as long as the source file does not change the compilation will occur only once per R session. \subsection{Specifying Argument Defaults} If default argument values are provided in the C++ function definition then these defaults are also used for the exported R function. For example, the following C++ function: <>= DataFrame readData( CharacterVector file, CharacterVector colNames = CharacterVector::create(), std::string commentChar = "#", bool header = true) @ Will be exported to R as: <>= function(file, colNames=character(), commentChar="#", header=TRUE) @ Note that C++ rules for default arguments still apply: they must occur consecutively at the end of the function signature and (unlike R) can't rely on the values of other arguments. Not all \proglang{C++} defualt argument values can be parsed into their \proglang{R} equivalents, however the most common cases are supported, including: \begin{itemize} \item String literals delimited by quotes (e.g. \texttt{"foo"}) \item Decimal numeric values (e.g. \texttt{10} or \texttt{4.5}) \item Pre-defined constants including \texttt{true}, \texttt{false}, \texttt{R\_NilValue}, \texttt{NA\_STRING}, \texttt{NA\_INTEGER}, \texttt{NA\_REAL}, and \texttt{NA\_LOGICAL}. \item Selected vector types (\texttt{CharacterVector}, \texttt{IntegerVector}, and \texttt{NumericVector}) instantiated using the \texttt{::create} static member function. \item \texttt{Matrix} types instantiated using the \texttt{rows}, \texttt{cols} constructor. \end{itemize} \pagebreak \subsection{Signaling Errors} Within \proglang{R} code the \texttt{stop} function is typically used to signal errors. Within \proglang{R} extensions written in \proglang{C} the \texttt{Rf\_error} function is typically used. However, within \proglang{C++} code you cannot safely use \texttt{Rf\_error} because it results in a \texttt{longjmp} over any \proglang{C++} destructors on the stack. The correct way to signal errors within \proglang{C++} functions is to throw an \\\texttt{Rcpp::exception}. For example: <>= if (unexpectedCondition) throw Rcpp::exception("Unexpected condition occurred"); @ There is also an \texttt{Rcpp::stop} function that is shorthand for throwing an \\\texttt{Rcpp::exception}. For example: <>= if (unexpectedCondition) Rcpp::stop("Unexpected condition occurred"); @ In both cases the \proglang{C++} exception will be caught by \pkg{Rcpp} prior to returning control to \proglang{R} and converted into the correct signal to \proglang{R} that execution should stop with the specified message. \subsection{Embedding R Code} Typically \proglang{C++} and \proglang{R} code are kept in their own source files. However, it's often convenient to bundle code from both languages into a common source file that can be executed using single call to \texttt{sourceCpp}. To embed chunks of \proglang{R} code within a \proglang{C++} source file you include the \proglang{R} code within a block comment that has the prefix of \texttt{/*** R}. For example: <>= /*** R # Call the fibonacci function defined in C++ fibonacci(10) */ @ Multiple \proglang{R} code chunks can be included in a \proglang{C++} file. The \texttt{sourceCpp} function will first compile the \proglang{C++} code into a shared library and then source the embedded \proglang{R} code. \pagebreak \subsection{Modifying Function Names} You can change the name of an exported function as it appears to \proglang{R} by adding a name parameter to \texttt{Rcpp::export}. For example: <>= // [[Rcpp::export(".convolveCpp")]] NumericVector convolveCpp(NumericVector a, NumericVector b) @ Note that in this case since the specified name is prefaced by a \code{.} the exported R function will be hidden. \subsection{Function Requirements} Functions marked with the \texttt{Rcpp::export} attribute must meet several requirements to be correctly handled: \begin{itemize} \item Be defined in the global namespace (i.e. not within a C++ namespace declaration) \item Have a return type that is either void or compatible with \texttt{Rcpp::wrap} and parameter types that are compatible with \texttt{Rcpp::as} (see sections 3.1 and 3.2 of the `\textsl{Rcpp-introduction}' vignette for more details). \item Use fully qualified type names for the return value and all parameters. Rcpp types may however appear without a namespace qualifier (i.e. \texttt{DataFrame} is okay as a type name but \texttt{std::string} must be specified fully). \end{itemize} \subsection{Random Number Generation} \proglang{R} functions implemented in \proglang{C} or \proglang{C++} need to be careful to surround use of internal random number geneneration routines (e.g. \texttt{unif\_rand}) with calls to \texttt{GetRNGstate} and \texttt{PutRNGstate}. Within \pkg{Rcpp}, this is typically done using the \texttt{RNGScope} class. However, this is not necessary for \proglang{C++} functions exported using attributes because an \texttt{RNGScope} is established for them automatically. Note that \pkg{Rcpp} implements \texttt{RNGScope} using a counter, so it's still safe to execute code that may establish it's own \texttt{RNGScope} (such as the \pkg{Rcpp} sugar functions that deal with random number generation). \pagebreak \subsection{Importing Dependencies} It's also possible to use the \texttt{Rcpp::depends} attribute to declare dependencies on other packages. For example: <>= // [[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); arma::colvec y(yr.begin(), yr.size(), false); arma::colvec coef = arma::solve(X, y); arma::colvec resid = y - X*coef; double sig2 = arma::as_scalar(arma::trans(resid)*resid/(n-k)); arma::colvec stderrest = arma::sqrt( sig2 * arma::diagvec( arma::inv(arma::trans(X)*X)) ); return List::create(Named("coefficients") = coef, Named("stderr") = stderrest); } @ The inclusion of the \texttt{Rcpp::depends} attribute causes \texttt{sourceCpp} to configure the build environment to correctly compile and link against the \pkg{RcppArmadillo} package. Source files can declare more than one dependency either by using multiple \texttt{Rcpp::depends} attributes or with syntax like this: <>= // [[Rcpp::depends(Matrix, RcppArmadillo)]] @ Dependencies are discovered both by scanning for package include directories and by invoking \pkg{inline} plugins if they are available for a package. Note that while the \texttt{Rcpp::depends} attribute establishes dependencies for \texttt{sourceCpp}, it's important to note that if you include the same source file in an \proglang{R} package these dependencies must still be listed in the \texttt{Depends} and \texttt{LinkingTo} fields of the package \texttt{DESCRIPTION} file. \subsection{Including C++ Inline} Maintaining C++ code in it's own source file provides several benefits including the ability to use \proglang{C++} aware text-editing tools and straightforward mapping of compilation errors to lines in the source file. However, it's also possible to do inline declaration and execution of C++ code. There are several ways to accomplish this, including passing a code string to \texttt{sourceCpp} or using the shorter-form \texttt{cppFunction} or \texttt{evalCpp} functions. For example: <>= cppFunction(' int fibonacci(const int x) { if (x < 2) return x; else return (fibonacci(x - 1)) + fibonacci(x - 2); } ') evalCpp('std::numeric_limits::max()') @ You can also specify a depends parameter to \texttt{cppFunction} or \texttt{evalCpp}: <>= cppFunction(depends = 'RcppArmadillo', code = '...') @ \section{Package Development} One of the goals of \pkg{Rcpp} attributes is to simultaneously facilitate ad-hoc and interactive work with \proglang{C++} while also making it very easy to migrate that work into an \proglang{R} package. There are several benefits of moving code from a standalone \proglang{C++} source file to a package: \begin{enumerate} \item Your code can be made available to users without \proglang{C++} development tools (at least on Windows or Mac OS X where binary packages are common) \item Multiple source files and their dependencies are handled automatically by the \proglang{R} package build system \item Packages provide additional infrastructure for testing, documentation and consistency \end{enumerate} \subsection{Package Creation} To create a package that is based on \pkg{Rcpp} you should follow the guidelines in the `\textsl{Rcpp-package}' vignette. For a new package this is most conveniently done using the \texttt{Rcpp.package.skeleton} function. To generate a new package with a simple hello, world function that uses attributes you can do the following: <>= Rcpp.package.skeleton("NewPackage", attributes = TRUE) @ To generate a package based on \proglang{C++} files that you've been using with \texttt{sourceCpp} you can use the \texttt{cpp\_files} parameter: <>= Rcpp.package.skeleton("NewPackage", example_code = FALSE, cpp_files = c("convolve.cpp")) @ \subsection{Specifying Dependencies} %% TODOD(DE) Rework in terms of Imports: Once you've migrated \proglang{C++} code into a package, the dependencies for source files are derived from the \texttt{Depends} and \texttt{LinkingTo} fields in the package \texttt{DESCRIPTION} file rather than the \texttt{Rcpp::depends} attribute. For every package you import C++ code from (including \pkg{Rcpp}) you need to add these entries. For example, if your package depends on \pkg{Rcpp} and \pkg{RcppArmadillo} you would have the following in your \texttt{DESCRIPTION} file: <>= Depends: Rcpp (>= 0.10.0), RcppArmadillo (>= 0.3.4.4) LinkingTo: Rcpp, RcppArmadillo @ Using a \texttt{Imports} declaration together with an \texttt{import} or \texttt{importFrom} statement in the file \texttt{NAMESPACE} is a more recent alternative. \subsection{Exporting R Functions} Within interactive sessions you call the \texttt{sourceCpp} function on individual files to export \proglang{C++} functions into the global environment. However, for packages you call a single utility function to export all \proglang{C++} functions within the package. The \texttt{compileAttributes} function scans the source files within a package for export attributes and generates code as required. For example, executing this from within the package working directory: <>= compileAttributes() @ Results in the generation of the following two source files: \begin{itemize} \item \texttt{src/RcppExports.cpp} -- The \texttt{extern "C"} wrappers required to call exported \proglang{C++} functions within the package. \item \texttt{R/RcppExports.R} -- The \texttt{.Call} wrappers required to call the \texttt{extern "C"} functions defined in \texttt{RcppExports.cpp}. \end{itemize} You should re-run \texttt{compileAttributes} whenever functions are added, removed, or have their signatures changed. The \texttt{compileAttributes} function deals only with exporting \proglang{C++} functions to \proglang{R}. If you want the functions to additionally be publicly available from your package's namespace another step may be required. Specifically, if your package \texttt{NAMESPACE} file does not use a pattern to export functions then you should add an explicit entry to \texttt{NAMESPACE} for each R function you want publicly available. \subsection{Roxygen Comments} The \pkg{roxygen2} package \citep{CRAN:roxygen2} provides a facility for automatically generating \proglang{R} documentation files based on specially formatted comments in \proglang{R} source code. If you include roxygen comments in your \proglang{C++} source file with a \texttt{//\textquotesingle} prefix then \texttt{compileAttributes} will transpose them into R roxygen comments within \texttt{R/RcppExports.R}. For example the following code in a \proglang{C++} source file: <>= //' The length of a string (in characters). //' //' @param str input character vector //' @return characters in each element of the vector // [[Rcpp::export]] NumericVector strLength(CharacterVector str) @ Results in the following code in the generated \proglang{R} source file: <>= #' The length of a string (in characters). #' #' @param str input character vector #' @return characters in each element of the vector strLength <- function(str) @ \subsection{Providing a C++ Interface} The interface exposed from \proglang{R} packages is most typically a set of \proglang{R} functions. However, the \proglang{R} package system also provides a mechanism to allow the exporting of \proglang{C} and \proglang{C++} interfaces using package header files. This is based on the \texttt{R\_RegisterCCallable} and \texttt{R\_GetCCallable} functions described in `\textsl{Writing R Extensions}' \citep{R:Extensions}. \proglang{C++} interfaces to a package are published within the top level \texttt{include} directory of the package (which within the package source directory is located at \texttt{inst/include}). The \proglang{R} build system automatically adds the required \texttt{include} directories for all packages specified in the \texttt{LinkingTo} field of the package \texttt{DESCRIPTION} file. \subsubsection{Interfaces Attribute} The \texttt{Rcpp::interfaces} attribute can be used to automatically generate a header-only interface to your \proglang{C++} functions within the \texttt{include} directory of your package. The \texttt{Rcpp::interfaces} attribute is specified on a per-source file basis, and indicates which interfaces (\proglang{R}, \proglang{C++}, or both) should be provided for exported functions within the file. For example, the following specifies that both R and \proglang{C++} interfaces should be generated for a source file: <>= // [[Rcpp::interfaces(r, cpp)]] @ Note that the default behavior if an \texttt{Rcpp::interfaces} attribute is not included in a source file is to generate an R interface only. \subsubsection{Generated Code} If you request a \texttt{cpp} interface for a source file then \texttt{compileAttributes} generates the following header files (substituting \emph{Package} with the name of the package code is being generated for): <>= inst/include/Package.h inst/include/Package_RcppExports.h @ The \texttt{Package\_RcppExports.h} file has inline definitions for all exported \proglang{C++} functions that enable calling them using the \texttt{R\_GetCCallable} mechanism. The \texttt{Package.h} file does nothing other than include the \texttt{Package\_RcppExports.h} header. This is done so that package authors can replace the \texttt{Package.h} header with a custom one and still be able to include the automatically generated exports (details on doing this are provided in the next section). The exported functions are defined within a \proglang{C++} namespace that matches the name of the package. For example, an exported \proglang{C++} function \texttt{bar} could be called from package \texttt{MyPackage} as follows: <>= // [[Rcpp::depends(MyPackage)]] #include void foo() { MyPackage::bar(); } @ \subsubsection{Including Additional Code} You might wish to use the \texttt{Rcpp::interfaces} attribute to generate a part of your package's \proglang{C++} interface but also provide additional custom \proglang{C++} code. In this case you should replace the generated \texttt{Package.h} file with one of your own. Note that the way \pkg{Rcpp} distinguishes user verses generated files is by checking for the presence a special token in the file (if it's present then it's known to be generated and thus safe to overwrite). You'll see this token at the top of the generated \texttt{Package.h} file, be sure to remove it if you want to provide a custom header. Once you've established a custom package header file, you need only include the \texttt{Package\_RcppExports.h} file within your header to make available the automatically generated code alongside your own. If you need to include code from your custom header files within the compilation of your package source files, you will also need to add the following entry to \texttt{Makevars} and \texttt{Makevars.win} (both are in the \texttt{src} directory of your package): <>= PKG_CPPFLAGS += -I../inst/include/ @ Note that the R package build system does not automatically force a rebuild when headers in \texttt{inst/include} change, so you should be sure to perform a full rebuild of the package after making changes to these headers. \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/inst/doc/Rcpp-attributes.R0000644000000000000000000000471012273452733014372 0ustar ### R code from vignette source 'Rcpp-attributes.Rnw' ################################################### ### code chunk number 1: Rcpp-attributes.Rnw:39-41 ################################################### prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") ################################################### ### code chunk number 3: Rcpp-attributes.Rnw:147-149 (eval = FALSE) ################################################### ## sourceCpp("convolve.cpp") ## convolveCpp(x, y) ################################################### ### code chunk number 5: Rcpp-attributes.Rnw:176-177 (eval = FALSE) ################################################### ## function(file, colNames=character(), commentChar="#", header=TRUE) ################################################### ### code chunk number 12: Rcpp-attributes.Rnw:368-378 (eval = FALSE) ################################################### ## cppFunction(' ## int fibonacci(const int x) { ## if (x < 2) ## return x; ## else ## return (fibonacci(x - 1)) + fibonacci(x - 2); ## } ## ') ## ## evalCpp('std::numeric_limits::max()') ################################################### ### code chunk number 13: Rcpp-attributes.Rnw:383-384 (eval = FALSE) ################################################### ## cppFunction(depends = 'RcppArmadillo', code = '...') ################################################### ### code chunk number 14: Rcpp-attributes.Rnw:415-416 (eval = FALSE) ################################################### ## Rcpp.package.skeleton("NewPackage", attributes = TRUE) ################################################### ### code chunk number 15: Rcpp-attributes.Rnw:422-424 (eval = FALSE) ################################################### ## Rcpp.package.skeleton("NewPackage", example_code = FALSE, ## cpp_files = c("convolve.cpp")) ################################################### ### code chunk number 17: Rcpp-attributes.Rnw:459-460 (eval = FALSE) ################################################### ## compileAttributes() ################################################### ### code chunk number 19: Rcpp-attributes.Rnw:506-511 (eval = FALSE) ################################################### ## #' The length of a string (in characters). ## #' ## #' @param str input character vector ## #' @return characters in each element of the vector ## strLength <- function(str) rcpp-0.11.0/inst/doc/Rcpp-sugar.R0000644000000000000000000000102512273452733013321 0ustar ### R code from vignette source 'Rcpp-sugar.Rnw' ################################################### ### code chunk number 1: Rcpp-sugar.Rnw:41-43 ################################################### prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") ################################################### ### code chunk number 3: Rcpp-sugar.Rnw:104-107 (eval = FALSE) ################################################### ## foo <- function(x, y){ ## ifelse( x < y, x*x, -(y*y) ) ## } rcpp-0.11.0/inst/doc/Rcpp-extending.R0000644000000000000000000000313512273452733014171 0ustar ### R code from vignette source 'Rcpp-extending.Rnw' ################################################### ### code chunk number 1: Rcpp-extending.Rnw:43-48 ################################################### prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") require(inline) require(highlight) require(Rcpp) ################################################### ### code chunk number 3: Rcpp-extending.Rnw:90-106 ################################################### code <- ' // we get a list from R List input(input_) ; // pull std::vector from R list // this is achieved through an implicit call to Rcpp::as std::vector x = input["x"] ; // return an R list // this is achieved through implicit call to Rcpp::wrap return List::create( _["front"] = x.front(), _["back"] = x.back() ) ; ' writeLines( code, "code.cpp" ) ################################################### ### code chunk number 4: Rcpp-extending.Rnw:108-109 ################################################### external_highlight( "code.cpp", type = "LATEX", doc = FALSE ) ################################################### ### code chunk number 5: Rcpp-extending.Rnw:112-118 ################################################### fx <- cxxfunction( signature( input_ = "list"), paste( readLines( "code.cpp" ), collapse = "\n" ), plugin = "Rcpp" ) input <- list( x = seq(1, 10, by = 0.5) ) fx( input ) ################################################### ### code chunk number 13: Rcpp-extending.Rnw:324-325 ################################################### unlink( "code.cpp" ) rcpp-0.11.0/inst/doc/Rcpp-quickref.R0000644000000000000000000000053012273452733014011 0ustar ### R code from vignette source 'Rcpp-quickref.Rnw' ################################################### ### code chunk number 1: Rcpp-quickref.Rnw:28-32 ################################################### options( width= 50) library( "Rcpp" ) prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") rcpp-0.11.0/inst/doc/Rcpp-package.R0000644000000000000000000000077712273452733013610 0ustar ### R code from vignette source 'Rcpp-package.Rnw' ################################################### ### code chunk number 1: version ################################################### prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") require(Rcpp) require(highlight) ################################################### ### code chunk number 2: tree (eval = FALSE) ################################################### ## Rcpp.package.skeleton("mypackage") rcpp-0.11.0/inst/doc/Rcpp-quickref.Rnw0000644000000000000000000002276112273452733014370 0ustar \documentclass[8pt,twocolumn,a4paper]{article} %\VignetteIndexEntry{Rcpp-quickref} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, reference} %\VignetteDepends{Rcpp} \setlength{\hoffset}{-0.8in} \setlength{\voffset}{-0.8in} \setlength{\marginparwidth}{0pt} \setlength{\marginparsep}{0pt} \setlength{\oddsidemargin}{0pt} \setlength{\headheight}{0pt} \setlength{\topmargin}{0pt} \setlength{\headsep}{0pt} \setlength{\footskip}{0pt} \setlength{\textheight}{27cm} \setlength{\textwidth}{20cm} \usepackage[colorlinks]{hyperref} \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} <>= options( width= 50) library( "Rcpp" ) prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") @ \author{Romain Fran\c{c}ois \and Dirk Eddelbuettel} \title{\pkg{Rcpp} Quick Reference Guide} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \newsavebox{\quickrefbox} \definecolor{quickrefBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{quickrefBorder}{rgb}{0,0,0} \renewenvironment{Hchunk}% {% \vspace{0.5em}\noindent\begin{lrbox}{\quickrefbox}% \begin{minipage}[b]{.42\textwidth}% }% {% \end{minipage}% \end{lrbox}% \fcolorbox{quickrefBorder}{quickrefBg}{\usebox{\quickrefbox}}% \vspace{0.5em}}% \begin{document} \maketitle \thispagestyle{empty} % without the ~, latex does not want to newline % a newline between paragraph and code disconnects them and can orphan heading \paragraph{Important Notes}~ \newline <>= // If you experience compiler errors, please check that you have an appropriate version of g++. See `Rcpp-FAQ' for more information. // Many of the examples here imply the following: using namespace Rcpp; // The inline package adds this for you. Alternately, use e.g.: Rcpp::NumericVector xx(10); @ \paragraph{Create simple vectors}~ \newline <>= SEXP x; std::vector y(10); // from SEXP NumericVector xx(x); // of a given size (filled with 0) NumericVector xx(10); // ... with a default for all values NumericVector xx(10, 2.0); // range constructor NumericVector xx( y.begin(), y.end() ); // using create NumericVector xx = NumericVector::create( 1.0, 2.0, 3.0, 4.0 ); NumericVector yy = NumericVector::create( Named["foo"] = 1.0, _["bar"] = 2.0 ); // short for Named @ \paragraph{Extract and set single elements}~ \newline <>= // extract single values double x0 = xx[0]; double x1 = xx(1); double y0 = yy["foo"]; double y1 = yy["bar"]; // set single values xx[0] = 2.1; xx(1) = 4.2; yy["foo"] = 3.0; // grow the vector yy["foobar"] = 10.0; @ \paragraph{Using matrices}~ \newline <>= // Initializing from SEXP, // dimensions handled automatically SEXP x; NumericMatrix xx(x); // Matrix of 4 rows & 5 columns (filled with 0) NumericMatrix xx(4, 5); // Fill with value int xsize = xx.nrow() * xx.ncol(); for (int i = 0; i < xsize; i++) { xx[i] = 7; } // Same as above, using STL fill std::fill(xx.begin(), xx.end(), 8); // Assign this value to single element // (1st row, 2nd col) xx(0,1) = 4; // Reference the second column // Changes propagate to xx (same applies for Row) NumericMatrix::Column zzcol = xx( _, 1); zzcol = zzcol * 2; // Copy the second column into new object NumericVector zz1 = xx( _, 1); // Copy the submatrix (top left 3x3) into new object NumericMatrix zz2 = xx( Range(0,2), Range(0,2)); @ \paragraph{Inline}~ \newline <>= ## Note - this is R code. inline allows rapid testing. require(inline) testfun = cxxfunction( signature(x="numeric", i="integer"), body = ' NumericVector xx(x); int ii = as(i); xx = xx * ii; return( xx ); ', plugin="Rcpp") testfun(1:5, 3) @ \paragraph{Interface with R}~ \newline <>= ## In R, create a package shell. For details, see the "Writing R Extensions" manual. Rcpp.package.skeleton("myPackage") ## Add R code to pkg R/ directory. Call C++ function. Do type-checking in R. myfunR = function(Rx, Ry) { ret = .Call("myCfun", Rx, Ry, package="myPackage") return(ret) } // Add C++ code to pkg src/ directory. using namespace Rcpp; // Define function as extern with RcppExport RcppExport SEXP myCfun( SEXP x, SEXP y) { // If R/C++ types match, use pointer to x. Pointer is faster, but changes to xx propagate to R ( xx -> x == Rx). NumericVector xx(x); // clone is slower and uses extra memory. Safe, R-like. NumericVector yy(clone(y)); xx[0] = yy[0] = -1.5; int zz = xx[0]; // use wrap() to return non-SEXP objects, e.g: // return(wrap(zz)); // Build and return a list List ret; ret["x"] = xx; ret["y"] = yy; return(ret); } ## From shell, above package directory R CMD check myPackage ## Optional R CMD INSTALL myPackage ## In R: require(myPackage) aa = 1.5; bb = 1.5; cc = myfunR(aa, bb) aa == bb ## FALSE, C++ modifies aa aa = 1:2; bb = 1:2; cc = myfunR(aa, bb) identical(aa, bb) ## TRUE, R/C++ types don't match @ \paragraph{STL interface}~ \newline <>= // sum a vector from beginning to end double s = std::accumulate(x.begin(), x.end(), 0.0); // prod of elements from beginning to end int p = std::accumulate(vec.begin(), vec.end(), 1, std::multiplies()); // inner_product to compute sum of squares double s2 = std::inner_product(res.begin(), res.end(), res.begin(), 0.0); @ \paragraph{Function}~ \newline <>= Function rnorm("rnorm"); rnorm(100, _["mean"] = 10.2, _["sd"] = 3.2 ); @ \paragraph{Environment}~ \newline <>= Environment stats("package:stats"); Environment env( 2 ); // by position // special environments Environment::Rcpp_namespace(); Environment::base_env(); Environment::base_namespace(); Environment::global_env(); Environment::empty_env(); Function rnorm = stats["rnorm"]; glob["x"] = "foo"; glob["y"] = 3; std::string x = glob["x"]; glob.assign( "foo" , 3 ); int foo = glob.get( "foo" ); int foo = glob.find( "foo" ); CharacterVector names = glob.ls() bool b = glob.exists( "foo" ); glob.remove( "foo" ); glob.lockBinding("foo"); glob.unlockBinding("foo"); bool b = glob.bindingIsLocked("foo"); bool b = glob.bindingIsActive("foo"); Environment e = stats.parent(); Environment e = glob.new_child(); @ \paragraph{Modules}~ \newline <>= // Warning -- At present, module-based objects do not persist across quit(save="yes")/reload cycles. To be safe, save results to R objects and remove module objects before exiting R. // To create a module-containing package from R, use: Rcpp.package.skeleton("mypackage",module=TRUE) // You will need to edit the RcppModules: line of the DESCRIPTION file to match your module name (in this example, from yada to mod_bar). class Bar { public: Bar(double x_) : x(x_), nread(0), nwrite(0) {} double get_x( ) { nread++; return x; } void set_x( double x_) { nwrite++; x = x_; } IntegerVector stats() const { return IntegerVector::create( _["read"] = nread, _["write"] = nwrite); } private: double x; int nread, nwrite; }; RCPP_MODULE(mod_bar) { class_( "Bar" ) .constructor() .property( "x", &Bar::get_x, &Bar::set_x, "Docstring for x" ) .method( "stats", &Bar::stats, "Docstring for stats") ;} ## The following is R code. require(mypackage); show(Bar) b <- new(Bar, 10); b$x <- 10 b_persist <- list(stats=b$stats(), x=b$x) rm(b) @ \newpage \paragraph{Rcpp sugar}~ \newline <>= NumericVector x = NumericVector::create( -2.0, -1.0, 0.0, 1.0, 2.0 ); IntegerVector y = IntegerVector::create( -2, -1, 0, 1, 2 ); NumericVector xx = abs( x ); IntegerVector yy = abs( y ); bool b = all( x < 3.0 ).is_true() ; bool b = any( y > 2 ).is_true(); NumericVector xx = ceil( x ); NumericVector xx = ceiling( x ); NumericVector yy = floor( y ); NumericVector yy = floor( y ); NumericVector xx = exp( x ); NumericVector yy = exp( y ); NumericVector xx = head( x, 2 ); IntegerVector yy = head( y, 2 ); IntegerVector xx = seq_len( 10 ); IntegerVector yy = seq_along( y ); NumericVector xx = rep( x, 3 ); NumericVector xx = rep_len( x, 10 ); NumericVector xx = rep_each( x, 3 ); IntegerVector yy = rev( y ); @ \paragraph{Random functions}~ \newline <>= // Set seed RNGScope scope; // For details see Section 6.7.1--Distribution functions of the `Writing R Extensions' manual. In some cases (e.g. rnorm), distribution-specific arguments can be omitted; when in doubt, specify all dist-specific arguments. The use of doubles rather than integers for dist-specific arguments is recommended. Unless explicitly specified, log=FALSE. // Equivalent to R calls NumericVector xx = runif(20); NumericVector xx1 = rnorm(20); NumericVector xx1 = rnorm(20, 0); NumericVector xx1 = rnorm(20, 0, 1); // Example vector of quantiles NumericVector quants(5); for (int i = 0; i < 5; i++) { quants[i] = (i-2); } // in R, dnorm(-2:2) NumericVector yy = dnorm(quants) ; NumericVector yy = dnorm(quants, 0.0, 1.0) ; // in R, dnorm(-2:2, mean=2, log=TRUE) NumericVector yy = dnorm(quants, 2.0, true) ; // Note - cannot specify sd without mean // in R, dnorm(-2:2, mean=0, sd=2, log=TRUE) NumericVector yy = dnorm(quants, 0.0, 2.0, true) ; // To get original R api, use Rf_* double zz = Rf_rnorm(0, 2); @ \end{document} rcpp-0.11.0/inst/doc/Rcpp-package.Rnw0000644000000000000000000004031712273452733014147 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-package} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, package} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color,alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} \newcommand{\code}[1]{\texttt{#1}} \newcommand{\rdoc}[2]{\href{http://www.rdocumentation.org/packages/#1/functions/#2}{\code{#2}}} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") require(Rcpp) require(highlight) @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{Writing a package that uses \pkg{Rcpp} } \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This document provides a short overview of how to use \pkg{Rcpp}~\citep{CRAN:Rcpp,JSS:Rcpp,Eddelbuettel:2013:Rcpp} when writing an \proglang{R} package. It shows how usage of the function \rdoc{Rcpp}{Rcpp.package.skeleton} which creates a complete and self-sufficient example package using \pkg{Rcpp}. All components of the directory tree created by \rdoc{Rcpp}{Rcpp.package.skeleton} are discussed in detail. This document thereby complements the \textsl{Writing R Extensions} manual~\citep{R:Extensions} which is the authoritative source on how to extend \proglang{R} in general. } \section{Introduction} \pkg{Rcpp}~\citep{CRAN:Rcpp,JSS:Rcpp,Eddelbuettel:2013:Rcpp} is an extension package for \proglang{R} which offers an easy-to-use yet featureful interface between \proglang{C++} and \proglang{R}. However, it is somewhat different from a traditional \proglang{R} package because its key component is a \proglang{C++} library. A client package that wants to make use of the \pkg{Rcpp} features must link against the library provided by \pkg{Rcpp}. It should be noted that \proglang{R} has only limited support for \proglang{C(++)}-level dependencies between packages~\citep{R:Extensions}. The \texttt{LinkingTo} declaration in the package \texttt{DESCRIPTION} file allows the client package to retrieve the headers of the target package (here \pkg{Rcpp}), but support for linking against a library is not provided by \proglang{R} and has to be added manually. This document follows the steps of the \rdoc{Rcpp}{Rcpp.package.skeleton} function to illustrate a recommended way of using \pkg{Rcpp} from a client package. We illustrate this using a simple \proglang{C++} function which will be called by an \proglang{R} function. We strongly encourage the reader to become familiar with the material in the \textsl{Writing R Extensions} manual~\citep{R:Extensions}, as well as with other documents on \proglang{R} package creation such as \cite{Leisch:2008:Tutorial}. Given a basic understanding of how to create \proglang{R} package, the present document aims to provide the additional information on how to use \pkg{Rcpp} in such add-on packages. \section{Using \texttt{Rcpp.package.skeleton}} \subsection{Overview} \pkg{Rcpp} provides a function \rdoc{Rcpp}{Rcpp.package.skeleton}, modeled after the base \proglang{R} function \rdoc{utils}{package.skeleton}, which facilitates creation of a skeleton package using \pkg{Rcpp}. \rdoc{Rcpp}{Rcpp.package.skeleton} has a number of arguments documented on its help page (and similar to those of \rdoc{utils}{package.skeleton}). The main argument is the first one which provides the name of the package one aims to create by invoking the function. An illustration of a call using an argument \texttt{mypackage} is provided below. <>= Rcpp.package.skeleton("mypackage") @ \begin{Hchunk} \begin{verbatim} $ ls -1R mypackage/ DESCRIPTION NAMESPACE R Read-and-delete-me man src mypackage/R: RcppExports.R mypackage/man: mypackage-package.Rd rcpp_hello_world.Rd mypackage/src: Makevars ## up until Rcpp 0.10.6, see below Makevars.win ## up until Rcpp 0.10.6, see below RcppExports.cpp rcpp_hello_world.cpp $ \end{verbatim} \end{Hchunk} Using \rdoc{Rcpp}{Rcpp.package.skeleton} is by far the simplest approach as it fulfills two roles. It creates the complete set of files needed for a package, and it also includes the different components needed for using \pkg{Rcpp} that we discuss in the following sections. \subsection{\proglang{C++} code} If the \texttt{attributes} argument is set to \texttt{TRUE}\footnote{Setting \texttt{attributes} to \texttt{TRUE} is the default. This document does not cover the behavior of \texttt{Rcpp.package.skeleton} when \texttt{attributes} is set to \texttt{FALSE} as we try to encourage package developpers to use attributes. }, the following \proglang{C++} file is included in the \texttt{src/} directory: <>= #include using namespace Rcpp; // [[Rcpp::export]] List rcpp_hello_world() { CharacterVector x = CharacterVector::create( "foo", "bar" ) ; NumericVector y = NumericVector::create( 0.0, 1.0 ) ; List z = List::create( x, y ) ; return z ; } @ The file defines the simple \texttt{rcpp\_hello\_world} function that uses a few \pkg{Rcpp} classes and returns a \texttt{List}. This function is preceded by the \texttt{Rcpp::export} attribute to automatically handle argument conversion because \proglang{R} has to be taught how to e.g. handle the \texttt{List} class. \rdoc{Rcpp}{Rcpp.package.skeleton} then invokes \rdoc{Rcpp}{compileAttributes} on the package, which generates the \texttt{RcppExports.cpp} file: <>= // This file was generated by Rcpp::compileAttributes // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include using namespace Rcpp; // rcpp_hello_world List rcpp_hello_world(); RcppExport SEXP mypackage_rcpp_hello_world() { BEGIN_RCPP SEXP __sexp_result; { Rcpp::RNGScope __rngScope; List __result = rcpp_hello_world(); PROTECT(__sexp_result = Rcpp::wrap(__result)); } UNPROTECT(1); return __sexp_result; END_RCPP } @ This file defines a function with the appropriate calling convention, suitable for \rdoc{base}{.Call}. It needs to be regenerated each time functions exposed by attributes are modified. This is the task of the \rdoc{Rcpp}{compileAttributes} function. A discussion on attributes is beyond the scope of this document and more information is available in the attributes vignette \citep{CRAN:Rcpp:Attributes}. \subsection{\proglang{R} code} The \rdoc{Rcpp}{compileAttributes} also generates \proglang{R} code that uses the \proglang{C++} function. <>= # This file was generated by Rcpp::compileAttributes # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 rcpp_hello_world <- function() { .Call('mypackage_rcpp_hello_world', PACKAGE = 'mypackage') } @ This is also a generated file so it should not be modified manually, rather regenerated as needed by \rdoc{Rcpp}{compileAttributes}. \subsection{\texttt{DESCRIPTION}} The skeleton generates an appropriate \texttt{DESCRIPTION} file, using both \texttt{Imports:} and \texttt{LinkingTo} for \pkg{Rcpp}: \begin{Hchunk} \begin{verbatim} Package: mypackage Type: Package Title: What the package does (short line) Version: 1.0 Date: 2013-09-17 Author: Who wrote it Maintainer: Who to complain to Description: More about what it does (maybe more than one line) License: What Licence is it under ? Imports: Rcpp (>= 0.11.0) LinkingTo: Rcpp \end{verbatim} \end{Hchunk} \rdoc{Rcpp}{Rcpp.package.skeleton} adds the three last lines to the \texttt{DESCRIPTION} file generated by \rdoc{utils}{package.skeleton}. The \texttt{Imports} declaration indicates \proglang{R}-level dependency between the client package and \pkg{Rcpp}; code from the latter is being imported into the package described here. The \texttt{LinkingTo} declaration indicates that the client package needs to use header files exposed by \pkg{Rcpp}. \subsection{Now optional: \texttt{Makevars} and \texttt{Makevars.win}} This behaviour changed with \pkg{Rcpp} release 0.11.0. These files used to be mandatory, now they are merely optional. We will describe the old setting first as it was in use for a few years. The new standard, however, is much easier and is described below. \subsubsection{Releases up until 0.10.6} Unfortunately, the \texttt{LinkingTo} declaration in itself was not enough to link to the user \proglang{C++} library of \pkg{Rcpp}. Until more explicit support for libraries is added to \proglang{R}, ones needes to manually add the \pkg{Rcpp} library to the \texttt{PKG\_LIBS} variable in the \texttt{Makevars} and \texttt{Makevars.win} files. (This has now changed with release 0.11.0; see below). \pkg{Rcpp} provides the unexported function \texttt{Rcpp:::LdFlags()} to ease the process: \begin{Hchunk} \begin{verbatim} ## Use the R_HOME indirection to support installations of multiple R version PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` ## As an alternative, one can also add this code in a file 'configure' ## ## PKG_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"` ## ## sed -e "s|@PKG_LIBS@|${PKG_LIBS}|" \ ## src/Makevars.in > src/Makevars ## ## which together with the following file 'src/Makevars.in' ## ## PKG_LIBS = @PKG_LIBS@ ## ## can be used to create src/Makevars dynamically. This scheme is more ## powerful and can be expanded to also check for and link with other ## libraries. It should be complemented by a file 'cleanup' ## ## rm src/Makevars ## ## which removes the autogenerated file src/Makevars. ## ## Of course, autoconf can also be used to write configure files. This is ## done by a number of packages, but recommended only for more advanced users ## comfortable with autoconf and its related tools. \end{verbatim} \end{Hchunk} The \texttt{Makevars.win} is the equivalent, targeting windows. \begin{Hchunk} \begin{verbatim} ## Use the R_HOME indirection to support installations of multiple R version PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()") \end{verbatim} \end{Hchunk} \subsubsection{Releases since 0.11.0} As of release 0.11.0, this is no longer needed as client packages obtain the required code from \pkg{Rcpp} via explicit function registration. The user does not have to do anything. This means that \code{PKG\_LIBS} can now be empty---unless some client libraries are needed. For example, \pkg{RcppCNPy} needs compression support and hence uses \code{PKG\_LIBS= -lz}. Similarly, when a third-party library is required, it can and should be set here. \subsection{\texttt{NAMESPACE}} The \rdoc{Rcpp}{Rcpp.package.skeleton} function also creates a file \texttt{NAMESPACE}. \begin{Hchunk} \begin{verbatim} useDynLib(mypackage) exportPattern("^[[:alpha:]]+") importFrom{Rcpp, evalCpp} \end{verbatim} \end{Hchunk} This file serves three purposes. First, it ensure that the dynamic library contained in the package we are creating via \rdoc{Rcpp}{Rcpp.package.skeleton} will be loaded and thereby made available to the newly created \proglang{R} package. Second, it declares which functions should be globally visible from the namespace of this package. As a reasonable default, we export all functions. Third, it instructs R to import a symbol from \pkg{Rcpp}. This sets up the import of all registered function and, together with the \code{Imports:} statement in \code{DESCRIPTION}, provides what is needed for client packages to access \pkg{Rcpp} functionality. \subsection{Help files} Also created is a directory \texttt{man} containing two help files. One is for the package itself, the other for the (single) \proglang{R} function being provided and exported. The \textsl{Writing R Extensions} manual~\citep{R:Extensions} provides the complete documentation on how to create suitable content for help files. \subsubsection{\texttt{mypackage-package.Rd}} The help file \texttt{mypackage-package.Rd} can be used to describe the new package. \begin{Hchunk} \begin{verbatim} \name{mypackage-package} \alias{mypackage-package} \alias{mypackage} \docType{package} \title{ What the package does (short line) } \description{ More about what it does (maybe more than one line) ~~ A concise (1-5 lines) description of the package ~~ } \details{ \tabular{ll}{ Package: \tab mypackage\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2013-09-17\cr License: \tab What license is it under?\cr } ~~ An overview of how to use the package, including the most important functions ~~ } \author{ Who wrote it Maintainer: Who to complain to } \references{ ~~ Literature or other references for background information ~~ } ~~ Optionally other standard keywords, one per line, from file KEYWORDS in the R documentation directory ~~ \keyword{ package } \seealso{ ~~ Optional links to other man pages, e.g. ~~ ~~ \code{\link[:-package]{}} ~~ } \examples{ %% ~~ simple examples of the most important functions ~~ } \end{verbatim} \end{Hchunk} \subsubsection{\texttt{rcpp\_hello\_world.Rd}} The help file \texttt{rcpp\_hello\_world.Rd} serves as documentation for the example \proglang{R} function. \begin{Hchunk} \begin{verbatim} \name{rcpp_hello_world} \alias{rcpp_hello_world} \docType{package} \title{ Simple function using Rcpp } \description{ Simple function using Rcpp } \usage{ rcpp_hello_world() } \examples{ \dontrun{ rcpp_hello_world() } } \end{verbatim} \end{Hchunk} \section{Using modules} This document does not cover the use of the \texttt{module} argument of \rdoc{Rcpp}{Rcpp.package.skeleton}. It is covered in the modules vignette \citep{CRAN:Rcpp:Modules}. \section{Further examples} The canonical example of a package that uses \pkg{Rcpp} is the \pkg{RcppExamples} \citep{CRAN:RcppExamples} package. \pkg{RcppExamples} contains various examples of using \pkg{Rcpp}. Hence, the \pkg{RcppExamples} package is provided as a template for employing \pkg{Rcpp} in packages. Other CRAN packages using the \pkg{Rcpp} package are \pkg{RcppArmadillo} \citep{CRAN:RcppArmadillo}, and \pkg{minqa} \citep{CRAN:minqa}. Several other packages follow older (but still supported and appropriate) instructions. They can serve examples on how to get data to and from \proglang{C++} routines, but should not be considered templates for how to connect to \pkg{Rcpp}. The full list of packages using \pkg{Rcpp} can be found at the \href{http://CRAN.R-project.org/package=Rcpp}{CRAN page} of \pkg{Rcpp}. \section{Other compilers} Less experienced \proglang{R} users on the Windows platform frequently ask about using \pkg{Rcpp} with the Visual Studio toolchain. That is simply not possible as \proglang{R} is built with the \pkg{gcc} compiler. Different compilers have different linking conventions. These conventions are particularly hairy when it comes to using \proglang{C++}. In short, it is not possible to simply drop sources (or header files) from \pkg{Rcpp} into a \proglang{C++} project built with Visual Studio, and this note makes no attempt at claiming otherwise. \pkg{Rcpp} is fully usable on Windows provided the standard Windows toolchain for \proglang{R} is used. See the \textsl{Writing R Extensions} manual~\citep{R:Extensions} for details. \section{Summary} This document described how to use the \pkg{Rcpp} package for \proglang{R} and \proglang{C++} integration when writing an \proglang{R} extension package. The use of the \rdoc{Rcpp}{Rcpp.package.skeleton} was shown in detail, and references to further examples were provided. \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/inst/doc/Rcpp-sugar.Rnw0000644000000000000000000005673112273452733013704 0ustar \documentclass[10pt]{article} %\VignetteIndexEntry{Rcpp-sugar} %\VignetteEngine{highlight::highlight} %\VignetteKeywords{Rcpp, syntactic sugar} %\VignetteDepends{Rcpp} \usepackage[USletter]{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} \usepackage{color, alltt} \usepackage[authoryear,round,longnamesfirst]{natbib} \usepackage[colorlinks]{hyperref} \definecolor{link}{rgb}{0,0,0.3} %% next few lines courtesy of RJournal.sty \hypersetup{ colorlinks,% citecolor=link,% filecolor=link,% linkcolor=link,% urlcolor=link } \usepackage{microtype} %% cf http://www.khirevich.com/latex/microtype/ \usepackage[T1]{fontenc} %% cf http://www.khirevich.com/latex/font/ \usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/ \newcommand{\proglang}[1]{\textsf{#1}} \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} \newcommand{\sugar}{\textsl{Rcpp sugar}} \newcommand{\ith}{\textsl{i}-\textsuperscript{th}} \newcommand{\code}[1]{\texttt{#1}} %% This corresponds to setting boxes=TRUE for highlight \newsavebox{\hlbox} \definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137} \definecolor{hlBd}{rgb}{0,0,0} \renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}% {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}} <>= prettyVersion <- packageDescription("Rcpp")$Version prettyDate <- format(Sys.Date(), "%B %e, %Y") @ \author{Dirk Eddelbuettel \and Romain Fran\c{c}ois} \title{\pkg{Rcpp} syntactic sugar} \date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \abstract{ \noindent This note describes \sugar~which has been introduced in version 0.8.3 of \pkg{Rcpp} \citep{CRAN:Rcpp,JSS:Rcpp}. \sugar~ brings a higher-level of abstraction to \proglang{C++} code written using the \pkg{Rcpp} API. \sugar~is based on expression templates \citep{Abrahams+Gurtovoy:2004:TemplateMetaprogramming,Vandevoorde+Josuttis:2003:Templates} and provides some 'syntactic sugar' facilities directly in \pkg{Rcpp}. This is similar to how \pkg{RcppArmadillo} \citep{CRAN:RcppArmadillo} offers linear algebra \proglang{C++} classes based on \pkg{Armadillo} \citep{Sanderson:2010:Armadillo}. % TODO: reference to armadillo, blitz, etc ... } \section{Motivation} \pkg{Rcpp} facilitates development of internal compiled code in an \proglang{R} package by abstracting low-level details of the \proglang{R} API \citep{R:Extensions} into a consistent set of \proglang{C++} classes. Code written using \pkg{Rcpp} classes is easier to read, write and maintain, without loosing performance. Consider the following code example which provides a function \texttt{foo} as a \proglang{C++} extension to \proglang{R} by using the \pkg{Rcpp} API: <>= RcppExport SEXP foo( SEXP x, SEXP y){ Rcpp::NumericVector xx(x), yy(y) ; int n = xx.size() ; Rcpp::NumericVector res( n ) ; double x_ = 0.0, y_ = 0.0 ; for( int i=0; i>= foo <- function(x, y){ ifelse( x < y, x*x, -(y*y) ) } @ Put succinctly, the motivation of \sugar~is to bring a subset of the high-level \proglang{R} syntax in \proglang{C++}. Hence, with \sugar, the \proglang{C++} version of \texttt{foo} now becomes: <>= RcppExport SEXP foo( SEXP xs, SEXP ys){ Rcpp::NumericVector x(xs) ; Rcpp::NumericVector y(ys) ; return Rcpp::wrap( ifelse( x < y, x*x, -(y*y) )) ; } @ Apart from the fact that we need to assign the two objects we obtain from \proglang{R}---which is a simple statement each thanks to the template magic in \pkg{Rcpp}---and the need for explicit \texttt{return} and \texttt{Rcpp::wrap} statements, the code is now identical between highly-vectorised \proglang{R} and \proglang{C++}. \sugar~is written using expression templates and lazy evaluation techniques \citep{Abrahams+Gurtovoy:2004:TemplateMetaprogramming,Vandevoorde+Josuttis:2003:Templates}. This not only allows a much nicer high-level syntax, but also makes it rather efficient (as we detail in section~\ref{sec:performance} below). \section{Operators} \sugar~takes advantage of \proglang{C++} operator overloading. The next few sections discuss several examples. \subsection{Binary arithmetic operators} \sugar~defines the usual binary arithmetic operators : \texttt{+}, \texttt{-}, \texttt{*}, \texttt{/}. <>= // two numeric vectors of the same size NumericVector x ; NumericVector y ; // expressions involving two vectors NumericVector res = x + y ; NumericVector res = x - y ; NumericVector res = x * y ; NumericVector res = x / y ; // one vector, one single value NumericVector res = x + 2.0 ; NumericVector res = 2.0 - x; NumericVector res = y * 2.0 ; NumericVector res = 2.0 / y; // two expressions NumericVector res = x * y + y / 2.0 ; NumericVector res = x * ( y - 2.0 ) ; NumericVector res = x / ( y * y ) ; @ The left hand side (lhs) and the right hand side (rhs) of each binary arithmetic expression must be of the same type (for example they should be both \texttt{numeric} expressions). The lhs and the rhs can either have the same size or one of them could be a primitive value of the appropriate type, for example adding a \texttt{NumericVector} and a \texttt{double}. \subsection{Binary logical operators} Binary logical operators create a \texttt{logical} sugar expression from either two sugar expressions of the same type or one sugar expression and a primitive value of the associated type. <>= // two integer vectors of the same size NumericVector x ; NumericVector y ; // expressions involving two vectors LogicalVector res = x < y ; LogicalVector res = x > y ; LogicalVector res = x <= y ; LogicalVector res = x >= y ; LogicalVector res = x == y ; LogicalVector res = x != y ; // one vector, one single value LogicalVector res = x < 2 ; LogicalVector res = 2 > x; LogicalVector res = y <= 2 ; LogicalVector res = 2 != y; // two expressions LogicalVector res = ( x + y ) < ( x*x ) ; LogicalVector res = ( x + y ) >= ( x*x ) ; LogicalVector res = ( x + y ) == ( x*x ) ; @ \subsection{Unary operators} The unary \texttt{operator-} can be used to negate a (numeric) sugar expression. whereas the unary \texttt{operator!} negates a logical sugar expression: <>= // a numeric vector NumericVector x ; // negate x NumericVector res = -x ; // use it as part of a numerical expression NumericVector res = -x * ( x + 2.0 ) ; // two integer vectors of the same size NumericVector y ; NumericVector z ; // negate the logical expression "y < z" LogicalVector res = ! ( y < z ); @ \section{Functions} \sugar~defines functions that closely match the behavior of \proglang{R} functions of the same name. \subsection{Functions producing a single logical result} Given a logical sugar expression, the \texttt{all} function identifies if all the elements are \texttt{TRUE}. Similarly, the \texttt{any} function identifies if any the element is \texttt{TRUE} when given a logical sugar expression. <>= IntegerVector x = seq_len( 1000 ) ; all( x*x < 3 ) ; any( x*x < 3 ) ; @ Either call to \texttt{all} and \texttt{any} creates an object of a class that has member functions \texttt{is\_true}, \texttt{is\_false}, \texttt{is\_na} and a conversion to \texttt{SEXP} operator. One important thing to highlight is that \texttt{all} is lazy. Unlike \proglang{R}, there is no need to fully evaluate the expression. In the example above, the result of \texttt{all} is fully resolved after evaluating only the two first indices of the expression \verb|x * x < 3|. \texttt{any} is lazy too, so it will only need to resolve the first element of the example above. %\subsubsection{Conversion to bool} One important thing to note concernc the conversion to the \texttt{bool} type. In order to respect the concept of missing values (\texttt{NA}) in \proglang{R}, expressions generated by \texttt{any} or \texttt{all} can not be converted to \texttt{bool}. Instead one must use \texttt{is\_true}, \texttt{is\_false} or \texttt{is\_na}: <>= // wrong: will generate a compile error bool res = any( x < y) ) ; // ok bool res = is_true( any( x < y ) ) bool res = is_false( any( x < y ) ) bool res = is_na( any( x < y ) ) @ % FIXME this may need some expanding the trivariate bool and how to use it \subsection{Functions producing sugar expressions} \subsubsection{is\_na} Given a sugar expression of any type, \verb|is_na| (just like the other functions in this section) produces a logical sugar expression of the same length. Each element of the result expression evaluates to \texttt{TRUE} if the corresponding input is a missing value, or \texttt{FALSE} otherwise. <>= IntegerVector x = IntegerVector::create( 0, 1, NA_INTEGER, 3 ) ; is_na( x ) all( is_na( x ) ) any( ! is_na( x ) ) @ \subsubsection{seq\_along} Given a sugar expression of any type, \texttt{seq\_along} creates an integer sugar expression whose values go from 1 to the sire of the input. <>= IntegerVector x = IntegerVector::create( 0, 1, NA_INTEGER, 3 ) ; seq_along( x ) seq_along( x * x * x * x * x * x * x ) @ This is the most lazy function, as it only needs to call the \texttt{size} member function of the input expression. The input expression need not to be resolved. The two examples above gives the same result with the same efficiency at runtime. The compile time will be affected by the complexity of the second expression, since the abstract syntax tree is built at compile time. \subsubsection{seq\_len} \texttt{seq\_len} creates an integer sugar expression whose \ith\ element expands to \texttt{i}. \texttt{seq\_len} is particularly useful in conjunction with \texttt{sapply} and \texttt{lapply}. <>= // 1, 2, ..., 10 IntegerVector x = seq_len( 10 ) ; lapply( seq_len(10), seq_len ) @ \subsubsection{pmin and pmax} Given two sugar expressions of the same type and size, or one expression and one primitive value of the appropriate type, \texttt{pmin} (\texttt{pmax}) generates a sugar expression of the same type whose \ith\ element expands to the lowest (highest) value between the \ith\ element of the first expression and the \ith element of the second expression. <>= IntegerVector x = seq_len( 10 ) ; pmin( x, x*x ) pmin( x*x, 2 ) pmin( x, x*x ) pmin( x*x, 2 ) @ \subsubsection{ifelse} Given a logical sugar expression and either : \begin{itemize} \item two compatible sugar expression (same type, same size) \item one sugar expression and one compatible primitive \end{itemize} \texttt{ifelse} expands to a sugar expression whose \ith\ element is the \ith\ element of the first expression if the \ith\ element of the condition expands to \texttt{TRUE} or the \ith\ of the second expression if the \ith\ element of the condition expands to \texttt{FALSE}, or the appropriate missing value otherwise. <>= IntegerVector x ; IntegerVector y ; ifelse( x < y, x, (x+y)*y ) ifelse( x > y, x, 2 ) @ \subsubsection{sapply} \texttt{sapply} applies a \proglang{C++} function to each element of the given expression to create a new expression. The type of the resulting expression is deduced by the compiler from the result type of the function. The function can be a free \proglang{C++} function such as the overload generated by the template function below: <>= template T square( const T& x){ return x * x ; } sapply( seq_len(10), square ) ; @ Alternatively, the function can be a functor whose type has a nested type called \texttt{result\_type} <>= template struct square : std::unary_function { T operator()(const T& x){ return x * x ; } } sapply( seq_len(10), square() ) ; @ \subsubsection{lapply} \texttt{lapply} is similar to \texttt{sapply} except that the result is allways an list expression (an expression of type \texttt{VECSXP}). \subsubsection{sign} Given a numeric or integer expression, \texttt{sign} expands to an expression whose values are one of 1, 0, -1 or \texttt{NA}, depending on the sign of the input expression. <>= IntegerVector xx; sign( xx ) sign( xx * xx ) @ \subsubsection{diff} The \ith\ element of the result of \texttt{diff} is the difference between the $(i+1)$\textsuperscript{th} and the \ith\ element of the input expression. Supported types are integer and numeric. <>= IntegerVector xx; diff( xx ) @ \subsection{Mathematical functions} For the following set of functions, generally speaking, the \ith\ element of the result of the given function (say, \texttt{abs}) is the result of applying that function to this \ith\ element of the input expression. Supported types are integer and numeric. <>= IntegerVector x; abs( x ) exp( x ) floor( x ) ceil( x ) pow(x, z) # x to the power of z @ % log() and log10() maybe? Or ln() ? \subsection{The d/q/p/q statistical functions} The framework provided by \sugar also permits easy and efficient access the density, distribution function, quantile and random number generation functions function by \proglang{R} in the \code{Rmath} library. Currently, most of these functions are vectorised for the first element which denote size. Consequently, these calls works in \proglang{C++} just as they would in \proglang{R}: <>= x1 = dnorm(y1, 0, 1); // density of y1 at m=0, sd=1 x2 = pnorm(y2, 0, 1); // distribution function of y2 x3 = qnorm(y3, 0, 1); // quantiles of y3 x4 = rnorm(n, 0, 1); // 'n' RNG draws of N(0, 1) @ Similar d/q/p/r functions are provided for the most common distributions: beta, binom, cauchy, chisq, exp, f, gamma, geom, hyper, lnorm, logis, nbeta, nbinom, nbinom\_mu, nchisq, nf, norm, nt, pois, t, unif, and weibull. One point to note is that the programmer using these functions needs to initialize the state of the random number generator as detailed in Section 6.3 of the `Writing R Extensions' manual \citep{R:Extensions}. A nice \proglang{C++} solution for this is to use a \textsl{scoped} class that sets the random number generatator on entry to a block and resets it on exit. We offer the \code{RNGScope} class which allows code such as <>= RcppExport SEXP getRGamma() { RNGScope scope; NumericVector x = rgamma( 10, 1, 1 ); return x; } @ As there is some computational overhead involved in using \code{RNGScope}, we are not wrapping it around each inner function. Rather, the user of these functions (\textsl{i.e.} you) should place an \code{RNGScope} at the appropriate level of your code. \section{Performance} \label{sec:performance} TBD \section{Implementation} This section details some of the techniques used in the implementation of \sugar. Note that the user need not to be familiar with the implementation details in order to use \sugar, so this section can be skipped upon a first read of the paper. Writing \sugar~functions is fairly repetitive and follows a well-structured pattern. So once the basic concepts are mastered (which may take time given the inherent complexities in template programming), it should be possible to extend the set of function further following the established pattern.. \subsection{The curiously recurring template pattern} Expression templates such as those used by \sugar~use a technique called the \emph{Curiously Recurring Template Pattern} (CRTP). The general form of CRTP is: <>= // The Curiously Recurring Template Pattern (CRTP) template struct base { // ... }; struct derived : base { // ... }; @ The \texttt{base} class is templated by the class that derives from it : \texttt{derived}. This shifts the relationship between a base class and a derived class as it allows the base class to access methods of the derived class. \subsection{The VectorBase class} The CRTP is used as the basis for \sugar~with the \texttt{VectorBase} class template. All sugar expression derive from one class generated by the \texttt{VectorBase} template. The current definition of \texttt{VectorBase} is given here: <>= template class VectorBase { public: struct r_type : traits::integral_constant{} ; struct can_have_na : traits::integral_constant{} ; typedef typename traits::storage_type::type stored_type ; VECTOR& get_ref(){ return static_cast(*this) ; } inline stored_type operator[]( int i) const { return static_cast(this)->operator[](i) ; } inline int size() const { return static_cast(this)->size() ; } /* definition ommited here */ class iterator ; inline iterator begin() const { return iterator(*this, 0) ; } inline iterator end() const { return iterator(*this, size() ) ; } } @ The \texttt{VectorBase} template has three parameters: \begin{itemize} \item \texttt{RTYPE}: This controls the type of expression (INTSXP, REALSXP, ...) \item \texttt{na}: This embeds in the derived type information about whether instances may contain missing values. \pkg{Rcpp} vector types (\texttt{IntegerVector}, ...) derive from \texttt{VectorBase} with this parameter set to \texttt{true} because there is no way to know at compile-time if the vector will contain missing values at run-time. However, this parameter is set to \texttt{false} for types that are generated by sugar expressions as these are guaranteed to produce expressions that are without missing values. An example is the \texttt{is\_na} function. This parameter is used in several places as part of the compile time dispatch to limit the occurence of redundant operations. \item \texttt{VECTOR}: This parameter is the key of \sugar. This is the manifestation of CRTP. The indexing operator and the \texttt{size} method of \texttt{VectorBase} use a static cast of \texttt{this} to the \texttt{VECTOR} type to forward calls to the actual method of the derived class. \end{itemize} \subsection{Example : sapply} As an example, the current implementation of \texttt{sapply}, supported by the template class \texttt{Rcpp::sugar::Sapply} is given below: <>= template class Sapply : public VectorBase< Rcpp::traits::r_sexptype_traits< typename ::Rcpp::traits::result_of::type >::rtype , true , Sapply > { public: typedef typename ::Rcpp::traits::result_of::type ; const static int RESULT_R_TYPE = Rcpp::traits::r_sexptype_traits::rtype ; typedef Rcpp::VectorBase VEC ; typedef typename Rcpp::traits::r_vector_element_converter::type converter_type ; typedef typename Rcpp::traits::storage_type::type STORAGE ; Sapply( const VEC& vec_, Function fun_ ) : vec(vec_), fun(fun_){} inline STORAGE operator[]( int i ) const { return converter_type::get( fun( vec[i] ) ); } inline int size() const { return vec.size() ; } private: const VEC& vec ; Function fun ; } ; // sugar template inline sugar::Sapply sapply( const Rcpp::VectorBase& t, Function fun ){ return sugar::Sapply( t, fun ) ; } @ \subsubsection{The sapply function} \texttt{sapply} is a template function that takes two arguments. \begin{itemize} \item The first argument is a sugar expression, which we recognize because of the relationship with the \texttt{VectorBase} class template. \item The second argument is the function to apply. \end{itemize} The \texttt{sapply} function itself does not do anything, it is just used to trigger compiler detection of the template parameters that will be used in the \texttt{sugar::Sapply} template. \subsubsection{Detection of return type of the function} In order to decide which kind of expression is built, the \texttt{Sapply} template class queries the template argument via the \texttt{Rcpp::traits::result\_of} template. <>= typedef typename ::Rcpp::traits::result_of::type result_type ; @ The \texttt{result\_of} type trait is implemented as such: <>= template struct result_of{ typedef typename T::result_type type ; } ; template struct result_of< RESULT_TYPE (*)(INPUT_TYPE) >{ typedef RESULT_TYPE type ; } ; @ The generic definition of \texttt{result\_of} targets functors with a nested \texttt{result\_type} type. The second definition is a partial specialization targetting function pointers. \subsubsection{Indentification of expression type} Based on the result type of the function, the \texttt{r\_sexptype\_traits} trait is used to identify the expression type. <>= const static int RESULT_R_TYPE = Rcpp::traits::r_sexptype_traits::rtype ; @ \subsubsection{Converter} The \texttt{r\_vector\_element\_converter} class is used to convert an object of the function's result type to the actual storage type suitable for the sugar expression. <>= typedef typename Rcpp::traits::r_vector_element_converter::type converter_type ; @ \subsubsection{Storage type} The \texttt{storage\_type} trait is used to get access to the storage type associated with a sugar expression type. For example, the storage type of a \texttt{REALSXP} expression is \texttt{double}. <>= typedef typename Rcpp::traits::storage_type::type STORAGE ; @ \subsubsection{Input expression base type} The input expression --- the expression over which \texttt{sapply} runs --- is also typedef'ed for convenience: <>= typedef Rcpp::VectorBase VEC ; @ \subsubsection{Output expression base type} In order to be part of the \sugar~system, the type generated by the \texttt{Sapply} class template must inherit from \texttt{VectorBase}. <>= template class Sapply : public VectorBase< Rcpp::traits::r_sexptype_traits< typename ::Rcpp::traits::result_of::type >::rtype , true , Sapply > @ The expression built by \texttt{Sapply} depends on the result type of the function, may contain missing values, and the third argument is the manifestation of the \emph{CRTP}. \subsubsection{Constructor} The constructor of the \texttt{Sapply} class template is straightforward, it simply consists of holding the reference to the input expression and the function. <>= Sapply( const VEC& vec_, Function fun_ ) : vec(vec_), fun(fun_){} private: const VEC& vec ; Function fun ; @ \subsubsection{Implementation} The indexing operator and the \texttt{size} member function is what the \texttt{VectorBase} expects. The size of the result expression is the same as the size of the input expression and the i\textsuperscript{th} element of the result is simply retrieved by applying the function and the converter. Both these methods are inline to maximize performance: <>= inline STORAGE operator[]( int i ) const { return converter_type::get( fun( vec[i] ) ); } inline int size() const { return vec.size() ; } @ \section{Summary} TBD \bibliographystyle{plainnat} \bibliography{Rcpp} \end{document} rcpp-0.11.0/inst/prompt/0000755000000000000000000000000012253723677011737 5ustar rcpp-0.11.0/inst/prompt/module.Rd0000644000000000000000000000103412253723677013511 0ustar \name{NAME} \alias{NAME} \title{ Rcpp module: %% ~~ Name of the module ~~ } \description{ Rcpp module %% ~~ A concise description of the module ~~ } \details{ The module contains the following items: FUNCTIONS CLASSES } \source{ %% ~~ reference to a publication or URL ~~ %% ~~ perhaps a reference to the project page of the c++ code being exposed ~~ } \references{ %% ~~ possibly secondary sources and usages ~~ %% ~~ perhaps references to the C++ code that the module exposes ~~ } \examples{ show( NAME ) } \keyword{datasets} rcpp-0.11.0/inst/skeleton/0000755000000000000000000000000012273016501012221 5ustar rcpp-0.11.0/inst/skeleton/stdVector.cpp0000644000000000000000000000566312253723677014735 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // stdVector.cpp: Rcpp R/C++ interface class library -- Rcpp Module class example // // Copyright (C) 2010 - 2012 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 . #include // need to include the main Rcpp header file only // convenience typedef typedef std::vector vec; // helpers void vec_assign( vec* obj, Rcpp::NumericVector data) { obj->assign( data.begin(), data.end() ) ; } void vec_insert( vec* obj, int position, Rcpp::NumericVector data) { vec::iterator it = obj->begin() + position; obj->insert( it, data.begin(), data.end() ); } Rcpp::NumericVector vec_asR( vec* obj) { return Rcpp::wrap( *obj ); } void vec_set( vec* obj, int i, double value) { obj->at( i ) = value; } void vec_resize( vec* obj, int n) { obj->resize( n ); } void vec_push_back( vec* obj, double x ) { obj->push_back( x ); } // Wrappers for member functions that return a reference // Required on Solaris double vec_back(vec *obj){ return obj->back() ; } double vec_front(vec *obj){ return obj->front() ; } double vec_at(vec *obj, int i){ return obj->at(i) ; } RCPP_MODULE(stdVector){ using namespace Rcpp ; // we expose the class std::vector as "vec" on the R side class_("vec") // exposing the default constructor .constructor() // exposing member functions -- taken directly from std::vector .method( "size", &vec::size) .method( "max_size", &vec::max_size) .method( "capacity", &vec::capacity) .method( "empty", &vec::empty) .method( "reserve", &vec::reserve) .method( "pop_back", &vec::pop_back ) .method( "clear", &vec::clear ) // specifically exposing const member functions defined above .method( "back", &vec_back ) .method( "front", &vec_front ) .method( "at", &vec_at ) // exposing free functions taking a std::vector* // as their first argument .method( "assign", &vec_assign ) .method( "insert", &vec_insert ) .method( "as.vector",&vec_asR ) .method( "push_back",&vec_push_back ) .method( "resize", &vec_resize) // special methods for indexing .method( "[[", &vec_at ) .method( "[[<-", &vec_set ) ; } rcpp-0.11.0/inst/skeleton/rcpp_hello_world.cpp0000644000000000000000000000043412253723677016305 0ustar #include "rcpp_hello_world.h" 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-0.11.0/inst/skeleton/zzz.R0000644000000000000000000000073512253723677013227 0ustar ## Up until R 2.15.0, the require("methods") is needed but (now) ## triggers an warning from R CMD check #.onLoad <- function(libname, pkgname){ # #require("methods") ## needed with R <= 2.15.0 # loadRcppModules() #} ## For R 2.15.1 and later this also works. Note that calling loadModule() triggers ## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad(). loadModule("NumEx", TRUE) loadModule("yada", TRUE) loadModule("stdVector", TRUE) rcpp-0.11.0/inst/skeleton/rcpp_hello_world.R0000644000000000000000000000012612273016501015701 0ustar rcpp_hello_world <- function() { .Call("rcpp_hello_world", PACKAGE = "@PKG@") } rcpp-0.11.0/inst/skeleton/rcpp_module.cpp0000644000000000000000000000435212273016501015242 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // rcpp_module.cpp: Rcpp R/C++ interface class library -- Rcpp Module examples // // Copyright (C) 2010 - 2012 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 . #include std::string hello() { throw std::range_error( "boom" ) ; } int bar(int x) { return x*2; } double foo(int x, double y) { return x * y; } void bla() { Rprintf("hello\\n"); } void bla1(int x) { Rprintf("hello (x = %d)\\n", x); } void bla2( int x, double y) { Rprintf("hello (x = %d, y = %5.2f)\\n", x, y); } class World { public: World() : msg("hello") {} void set(std::string msg) { this->msg = msg; } std::string greet() { return msg; } private: std::string msg; }; RCPP_MODULE(yada){ using namespace Rcpp ; function("hello" , &hello , "documentation for hello "); function("bla" , &bla , "documentation for bla "); function("bla1" , &bla1 , "documentation for bla1 "); function("bla2" , &bla2 , "documentation for bla2 "); // with formal arguments specification function("bar" , &bar , List::create( _["x"] = 0.0), "documentation for bar "); function("foo" , &foo , List::create( _["x"] = 1, _["y"] = 1.0), "documentation for foo "); class_("World") // expose the default constructor .constructor() .method("greet", &World::greet , "get the message") .method("set", &World::set , "set the message") ; } rcpp-0.11.0/inst/skeleton/rcpp_hello_world.Rd0000644000000000000000000000033512253723677016070 0ustar \name{rcpp_hello_world} \alias{rcpp_hello_world} \docType{package} \title{ Simple function using Rcpp } \description{ Simple function using Rcpp } \usage{ rcpp_hello_world() } \examples{ \dontrun{ rcpp_hello_world() } } rcpp-0.11.0/inst/skeleton/rcpp_hello_world.h0000644000000000000000000000116612253723677015755 0ustar #ifndef _@PKG@_RCPP_HELLO_WORLD_H #define _@PKG@_RCPP_HELLO_WORLD_H #include /* * note : RcppExport is an alias to `extern "C"` defined by Rcpp. * * It gives C calling convention to the rcpp_hello_world function so that * it can be called from .Call in R. Otherwise, the C++ compiler mangles the * name of the function and .Call cannot find it. * * It is only useful to use RcppExport when the function is intended to be called * by .Call. See the thread http://thread.gmane.org/gmane.comp.lang.r.rcpp/649/focus=672 * on Rcpp-devel for a misuse of RcppExport */ RcppExport SEXP rcpp_hello_world() ; #endif rcpp-0.11.0/inst/skeleton/Num.cpp0000644000000000000000000000271212253723677013507 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // Num.cpp: Rcpp R/C++ interface class library -- Rcpp Module example // // Copyright (C) 2010 - 2012 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 . #include class Num { // simple class with two private variables public: // which have a getter/setter and getter Num() : x(0.0), y(0){} ; double getX() { return x ; } void setX(double value){ x = value ; } int getY() { return y ; } private: double x ; int y ; }; RCPP_MODULE(NumEx){ using namespace Rcpp ; class_( "Num" ) .default_constructor() // read and write property .property( "x", &Num::getX, &Num::setX ) // read-only property .property( "y", &Num::getY ) ; } rcpp-0.11.0/inst/skeleton/rcpp_hello_world_attributes.cpp0000644000000000000000000000044012253723677020550 0ustar #include using namespace Rcpp; // [[Rcpp::export]] List rcpp_hello_world() { CharacterVector x = CharacterVector::create( "foo", "bar" ) ; NumericVector y = NumericVector::create( 0.0, 1.0 ) ; List z = List::create( x, y ) ; return z ; } rcpp-0.11.0/inst/examples/0000755000000000000000000000000012253723677012234 5ustar rcpp-0.11.0/inst/examples/Attributes/0000755000000000000000000000000012253723677014362 5ustar rcpp-0.11.0/inst/examples/Attributes/sourceCpp.R0000644000000000000000000000015712253723677016453 0ustar library(Rcpp) sourceCpp("Export.cpp") fibonacci(5) sourceCpp("Depends.cpp") fastLm(c(1,2,3), matrix(3,3)) rcpp-0.11.0/inst/examples/Attributes/Export.cpp0000644000000000000000000000140712253723677016351 0ustar #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; }rcpp-0.11.0/inst/examples/Attributes/cppFunction.R0000644000000000000000000000240212253723677016773 0ustar 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 ); } ') rcpp-0.11.0/inst/examples/Attributes/Depends.cpp0000644000000000000000000000151012253723677016445 0ustar // [[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 ); } rcpp-0.11.0/inst/examples/Misc/0000755000000000000000000000000012253723677013127 5ustar rcpp-0.11.0/inst/examples/Misc/ifelseLooped.r0000644000000000000000000000601012253723677015721 0ustar #!/usr/bin/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) { RNGScope scope; // ensure RNG gets set/reset NumericVector x = runif(N); NumericVector y = runif(N); NumericVector d = sqrt(x*x + y*y); return 4.0 * sum(d < 1.0) / N; } rcpp-0.11.0/inst/examples/FastLM/0000755000000000000000000000000012253723677013362 5ustar rcpp-0.11.0/inst/examples/FastLM/lmGSL.R0000644000000000000000000000444712253723677014474 0ustar # # lm() via GNU GSL -- building on something from the Intro to HPC tutorials # # 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)) suppressMessages(require(inline)) lmGSL <- 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 <- cfunction(signature(Ysexp="numeric", Xsexp="numeric"), src, includes="#include ", Rcpp=TRUE, cppargs="-I/usr/include", libargs="-lgsl -lgslcblas") } rcpp-0.11.0/inst/examples/FastLM/benchmark.r0000755000000000000000000000324712253723677015510 0ustar #!/usr/bin/r -t # # 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 . 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 rcpp-0.11.0/inst/examples/FastLM/lmArmadillo.R0000644000000000000000000000415712253723677015751 0ustar # # 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)) suppressMessages(require(inline)) lmArmadillo <- 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. source("lmArmadillo.R") checkLmArmadillo <- function(y, X) { fun <- lmArmadillo() 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) } 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") rcpp-0.11.0/inst/examples/FastLM/benchmarkLongley.r0000755000000000000000000000345112253723677017037 0ustar #!/usr/bin/r -t # # 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 rcpp-0.11.0/inst/examples/FastLM/fastLMviaGSL.r0000755000000000000000000000302212253723677016001 0ustar #!/usr/bin/r -t # # 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") rcpp-0.11.0/inst/examples/performance/0000755000000000000000000000000012253723677014535 5ustar rcpp-0.11.0/inst/examples/performance/extractors.R0000644000000000000000000000613312253723677017061 0ustar require( inline ) require( Rcpp ) inc <- ' SEXP direct__( SEXP x_, SEXP y_ ){ NumericVector x( x_ ), y( y_ ), z( x.size() ) ; int n = x.size() ; 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 #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); } rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve14_cpp.cpp0000644000000000000000000000116512253723677021376 0ustar // -*- 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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve11_cpp.cpp0000644000000000000000000000116612253723677021374 0ustar // -*- 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 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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve8_cpp.cpp0000644000000000000000000000230612253723677021317 0ustar // -*- 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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/exampleRCode.r0000755000000000000000000000700012253723677020560 0ustar #!/usr/bin/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() rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve3_cpp.cpp0000644000000000000000000000111112253723677021303 0ustar // -*- 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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve5_cpp.cpp0000644000000000000000000000105212253723677021311 0ustar // -*- 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 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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve10_cpp.cpp0000644000000000000000000000201312253723677021363 0ustar // -*- 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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve2_c.c0000644000000000000000000000120712253723677020410 0ustar /* 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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve7_c.c0000644000000000000000000000120212253723677020410 0ustar // This is from 'Writing R Extensions' section 5.10.1 // BUT slowed down by using REAL() on each access which proves to be rather costly #include #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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/overhead.sh0000644000000000000000000000062512253723677020161 0ustar #!/bin/bash rm -f *.o *.so # build the shared library for the C variant R CMD SHLIB overhead_2.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 overhead_1.cpp # call R so that we get an interactive session Rscript overhead.r rcpp-0.11.0/inst/examples/ConvolveBenchmarks/overhead_1.cpp0000644000000000000000000000076212253723677020553 0ustar // -*- 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 ; 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); } rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve13_cpp.cpp0000644000000000000000000000130612253723677021372 0ustar // -*- 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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve12_cpp.cpp0000644000000000000000000000125112253723677021370 0ustar // -*- 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 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) rcpp-0.11.0/inst/examples/ConvolveBenchmarks/convolve10_cpp.h0000644000000000000000000000104512253723677021034 0ustar 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 ; } ; rcpp-0.11.0/inst/examples/functionCallback/0000755000000000000000000000000012253723677015476 5ustar rcpp-0.11.0/inst/examples/functionCallback/README0000644000000000000000000000166012253723677016361 0ustar A much simpler version of the example is provided in the file newApiExample.r. With littler installed, it can be run 'as is' as a shell script; else it can be sourced into R. -- Dirk Eddelbuettel and Romain Francois, 06 Feb 2010 This directory provides a simple example of how an R function can be passed back and forth between R and C++. We define the function at the R level, pass it to C++ using the Rcpp interface and have C++ call it. This works by subclassing the C++ class RcppFunction (from Rcpp) and adding a new member function transformVector() which is vector-valued. We then instantiate this new class in the C++ function called from R -- and by calling the transformVector() function from C++ we get R to operate on the supplied vector. In this demo, we simply exponeniate the data vector but also plot it as a side effect -- effectively giving us R plotting from a C++ function. -- Dirk Eddelbuettel, 29 Sep 2009 rcpp-0.11.0/inst/examples/functionCallback/newApiExample.r0000755000000000000000000000167612253723677020435 0ustar #!/usr/bin/r -ti suppressMessages(library(Rcpp)) suppressMessages(library(inline)) # R function that will be called from C++ vecfunc <- function(x) { y <- x^1.05 # do a transformation print(y) # but also print plot(y, ylim=c(1,8), type='b') # and even plot Sys.sleep(0.225) # sleep before next call return(y) } # C++ source code to operate on function and vector cpp <- ' int n = as(N); NumericVector numvec(xvec) ; Function f(fun) ; for( int 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 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(n); int thn = as(thin); int i,j; NumericMatrix mat(N, 2); RNGScope scope; // Initialize Random number generator // 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 #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; } rcpp-0.11.0/inst/examples/SugarPerformance/sugarBenchmarks.R0000755000000000000000000001274312253723677020753 0ustar #!/usr/bin/r -t 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. // 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 rcpp-0.11.0/inst/examples/RcppInline/0000755000000000000000000000000012253723677014277 5ustar rcpp-0.11.0/inst/examples/RcppInline/RObject.r0000755000000000000000000002106212253723677016016 0ustar #!/usr/bin/r -t # # Copyright (C) 2009 - 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 . ## 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 ) rcpp-0.11.0/inst/examples/RcppInline/RcppInlineWithLibsExamples.r0000755000000000000000000001231212253723677021674 0ustar #!/usr/bin/r -t # # Copyright (C) 2009 - 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(Rcpp)) suppressMessages(library(inline)) firstExample <- 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 <- cfunction(signature(), gslrng, includes="#include ", Rcpp=FALSE, cppargs="-I/usr/include", libargs="-lgsl -lgslcblas") cat("Calling first example\n") funx() invisible(NULL) } secondExample <- 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 <- cfunction(signature(par="numeric"), gslrng, includes="#include ", Rcpp=TRUE, cppargs="-I/usr/include", libargs="-lgsl -lgslcblas") cat("\n\nCalling second example without -DBeSilent set\n") print(funx(0)) funx <- cfunction(signature(par="numeric"), gslrng, includes="#include ", Rcpp=TRUE, cppargs="-I/usr/include -DBeSilent", libargs="-lgsl -lgslcblas") 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 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;"), Rcpp=TRUE, cppargs="-I/usr/include", libargs="-lgsl -lgslcblas") cat("\n\nCalling fourth example with seed, length and namespaces\n") print(funx(0, 5)) invisible(NULL) } firstExample() secondExample() thirdExample() fourthExample() rcpp-0.11.0/inst/examples/RcppInline/external_pointer.r0000755000000000000000000000404412253723677020051 0ustar #!/usr/bin/r -t # # 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) funx <- 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() stopifnot( identical( typeof( xp ), "externalptr" ) ) # passing the pointer back to C++ funx <- 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(xp) stopifnot( identical( front, 1L ) ) rcpp-0.11.0/inst/examples/RcppInline/RcppSimpleExample.r0000755000000000000000000000120612253723677020056 0ustar #!/usr/bin/r suppressMessages(library(Rcpp)) suppressMessages(library(inline)) foo <- ' 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); ' funx <- cfunction(signature(a="numeric",b="numeric"), foo, Rcpp=FALSE, verbose=FALSE) funx(a=1:20, b=2:11) rcpp-0.11.0/inst/examples/RcppInline/RcppInlineExample.r0000755000000000000000000000111012253723677020035 0ustar #!/usr/bin/r suppressMessages(library(Rcpp)) 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 <- cxxfunction(signature(), foo, plugin = "Rcpp" ) dd.inline.rcpp <- function() { res <- funx() tabulate(res) } print(mean(replicate(100,system.time(dd.inline.rcpp())["elapsed"]),trim=0.05)) rcpp-0.11.0/inst/examples/RcppInline/UncaughtExceptions.r0000755000000000000000000000231612253723677020307 0ustar #!/usr/bin/r -t # # Copyright (C) 2009 - 2010 Romain Francois and Dirk Eddelbuettel # # 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) funx <- cxxfunction( signature(), 'throw std::range_error("boom"); return R_NilValue ; ', plugin = "Rcpp" ) 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) ) rcpp-0.11.0/inst/include/0000755000000000000000000000000012270352603012023 5ustar rcpp-0.11.0/inst/include/Rcpp/0000755000000000000000000000000012273705447012742 5ustar rcpp-0.11.0/inst/include/Rcpp/is.h0000644000000000000000000000363512253723677013540 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // is.h: Rcpp R/C++ interface class library -- test if an R Object can be seen // as one type // // Copyright (C) 2013 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__is__h #define Rcpp__is__h namespace Rcpp{ namespace internal{ // simple implementation, for most default types template bool is__simple( SEXP x) ; // implementation for module objects template bool is__module__object( SEXP x) ; // not a module object template inline bool is__dispatch( SEXP x, Rcpp::traits::false_type ){ return is__simple( x ) ; } template inline bool is__dispatch( SEXP x, Rcpp::traits::true_type ){ return is__module__object( x ) ; } } /** identify if an x can be seen as the T type * * example: * bool is_list = is( x ) ; */ template bool is( SEXP x ){ return internal::is__dispatch( x, typename traits::is_module_object::type() ) ; } } // Rcpp #endif rcpp-0.11.0/inst/include/Rcpp/Benchmark/0000755000000000000000000000000012273061123014616 5ustar rcpp-0.11.0/inst/include/Rcpp/Benchmark/Timer.h0000644000000000000000000001060512273061123016051 0ustar // -*- 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 namespace{ std::string get_first(const std::pair& pair) { return pair.first; } double get_second(const std::pair& pair){ return static_cast(pair.second); } } class Timer { public: Timer() : data(), start_time( get_nanotime() ){} void step( const std::string& name){ nanotime_t now = get_nanotime(); data.push_back(std::make_pair(name, now - start_time)); start_time = get_nanotime(); } operator SEXP() const { size_t n = data.size(); NumericVector out(n); CharacterVector names(n); for (size_t i=0; i Step; typedef std::vector Steps; Steps data; nanotime_t start_time; }; } #endif rcpp-0.11.0/inst/include/Rcpp/DottedPairImpl.h0000644000000000000000000000567412253723677016013 0ustar // Copyright (C) 2013 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_DottedPairImpl_h #define Rcpp_DottedPairImpl_h namespace Rcpp{ template class DottedPairImpl { public: /** * wraps an object and add it at the end of the pairlist * (this require traversing the entire pairlist) * * @param object anything that can be wrapped by one * of the wrap functions, named objects (instances of traits::named_object<> * are treated specially */ template void push_back( const T& object) ; /** * wraps an object and add it in front of the pairlist. * * @param object anything that can be wrapped by one * of the wrap functions, or an object of class Named */ template void push_front( const T& object) ; /** * insert an object at the given position, pushing other objects * to the tail of the list * * @param index index (0-based) where to insert * @param object object to wrap */ template void insert( const size_t& index, const T& object) ; /** * replaces an element of the list * * @param index position * @param object object that can be wrapped */ template void replace( const int& index, const T& object ) ; inline R_len_t length() const { return ::Rf_length(static_cast(*this).get__()) ; } inline R_len_t size() const { return ::Rf_length(static_cast(*this).get__()) ; } /** * Remove the element at the given position * * @param index position where the element is to be removed */ void remove( const size_t& index ); template friend DottedPairImpl& operator<<(DottedPairImpl& os, const T& t){ os.push_back( t ) ; return os ; } template friend DottedPairImpl& operator>>( const T& t, DottedPairImpl& s){ s.push_front(t); return s ; } } ; } #endif rcpp-0.11.0/inst/include/Rcpp/Extractor.h0000644000000000000000000000217712253723677015100 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // Extractor.h: Rcpp R/C++ interface class library -- faster vectors (less interface) // // Copyright (C) 2010 - 2012 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__Extractor_h #define Rcpp__Extractor_h namespace Rcpp { namespace traits { template struct Extractor { typedef VECTOR type ; } ; } // traits } // Rcpp #endif rcpp-0.11.0/inst/include/Rcpp/String.h0000644000000000000000000004413712266564515014373 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // String.h: Rcpp R/C++ interface class library -- single string // // Copyright (C) 2012 - 2013 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__String_h #define Rcpp__String_h #ifndef RCPP_STRING_DEBUG_LEVEL #define RCPP_STRING_DEBUG_LEVEL 0 #endif #if RCPP_STRING_DEBUG_LEVEL > 0 #define RCPP_STRING_DEBUG_FORMAT "%40s:%4d " #define RCPP_STRING_DEBUG( MSG ) Rprintf( RCPP_STRING_DEBUG_FORMAT "%s\n" , short_file_name(__FILE__), __LINE__, MSG ) ; #define RCPP_STRING_DEBUG_1( fmt, MSG ) Rprintf( RCPP_STRING_DEBUG_FORMAT fmt "\n" , short_file_name(__FILE__), __LINE__, MSG ) ; #define RCPP_STRING_DEBUG_2( fmt, M1, M2 ) Rprintf( RCPP_STRING_DEBUG_FORMAT fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2 ) ; #define RCPP_STRING_DEBUG_3( fmt, M1, M2, M3 ) Rprintf( RCPP_STRING_DEBUG_FORMAT fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2, M3) ; #else #define RCPP_STRING_DEBUG( MSG ) #define RCPP_STRING_DEBUG_1( fmt, MSG ) #define RCPP_STRING_DEBUG_2( fmt, M1, M2 ) #define RCPP_STRING_DEBUG_3( fmt, M1, M2, M3 ) #endif namespace Rcpp { /** * A single string, i.e. an element of a character vector. * This represents CHARSXP SEXP */ class String { public: typedef internal::string_proxy StringProxy; typedef internal::const_string_proxy const_StringProxy; /** default constructor */ String( ): data( Rf_mkChar("") ), buffer(), valid(true), buffer_ready(true) { RCPP_STRING_DEBUG( "String()" ) ; } /** copy constructor */ String( const String& other) : data( other.get_sexp()), valid(true), buffer_ready(false) { RCPP_STRING_DEBUG( "String(const String&)" ) ; } /** construct a string from a single CHARSXP SEXP */ String(SEXP charsxp) : data(charsxp), valid(true), buffer_ready(false) { RCPP_STRING_DEBUG( "String(SEXP)" ) ; } /** from string proxy */ String( const StringProxy& proxy ): data( proxy.get() ), valid(true), buffer_ready(false){ RCPP_STRING_DEBUG( "String( const StringProxy&)" ) ; } /** from string proxy */ String( const const_StringProxy& proxy ): data( proxy.get() ), valid(true), buffer_ready(false){ RCPP_STRING_DEBUG( "String( const const_StringProxy&)" ) ; } /** from a std::string */ String( const std::string& s) : buffer(s), valid(false), buffer_ready(true) { RCPP_STRING_DEBUG( "String(const std::string& )" ) ; } String( const std::wstring& s) : data(internal::make_charsexp(s)), valid(true), buffer_ready(false) { RCPP_STRING_DEBUG( "String(const std::wstring& )" ) ; } /** from a const char* */ String( const char* s) : buffer(s), valid(false), buffer_ready(true){ RCPP_STRING_DEBUG( "String(const char*)" ) ; } String( const wchar_t* s) : data(internal::make_charsexp(s)), valid(true), buffer_ready(false) { RCPP_STRING_DEBUG( "String(const wchar_t* s)" ) ; } /** constructors from R primitives */ String( int x ) : data( internal::r_coerce(x) ), valid(true), buffer_ready(false) {} String( double x ) : data( internal::r_coerce(x) ), valid(true), buffer_ready(false){} String( bool x ) : data( internal::r_coerce(x) ), valid( true ) , buffer_ready(false){} String( Rcomplex x ) : data( internal::r_coerce(x) ), valid( true ), buffer_ready(false){} String( Rbyte x ) : data( internal::r_coerce(x) ), valid(true), buffer_ready(false){} inline String& operator=( int x ){ data = internal::r_coerce( x ) ; valid = true ; buffer_ready = false ; return *this ; } inline String& operator=( double x ){ data = internal::r_coerce( x ) ; valid = true ; buffer_ready = false ; return *this ; } inline String& operator=( Rbyte x ){ data = internal::r_coerce( x ) ; valid = true ; buffer_ready = false ; return *this ; } inline String& operator=( bool x ){ data = internal::r_coerce( x ) ; valid = true ; buffer_ready = false ; return *this ; } inline String& operator=( Rcomplex x){ data = internal::r_coerce( x ) ; valid = true ; buffer_ready = false ; return *this ; } inline String& operator=( SEXP x){ data = x ; valid = true ; buffer_ready = false ; return *this ; } inline String& operator=( const StringProxy& proxy){ data = proxy.get() ; valid = true ; buffer_ready=false ; return *this ; } inline String& operator=( const String& other ){ data = other.get_sexp() ; valid = true ; buffer_ready = false ; return *this ; } inline String& operator=( const std::string& s){ buffer = s ; valid = false ; buffer_ready = true ; return *this ; } inline String& operator=( const char* s){ buffer = s ; valid = false ; buffer_ready = true ; return *this ; } private: template inline String& assign_wide_string( const T& s){ data = internal::make_charsexp( s ) ; valid = true ; buffer_ready = false ; return *this ; } public: inline String& operator=( const std::wstring& s){ return assign_wide_string(s) ; } inline String& operator=( const wchar_t* s){ return assign_wide_string(s) ; } inline String& operator+=( const std::string& s){ RCPP_STRING_DEBUG( "String::operator+=( std::string )" ) ; if( is_na() ) return *this ; setBuffer() ; buffer += s ; valid = false ; return *this ; } inline String& operator+=( const char* s){ RCPP_STRING_DEBUG( "String::operator+=( const char*)" ) ; if( is_na() ) return *this ; setBuffer() ; buffer += s ; valid = false ; return *this ; } private: template inline String& append_wide_string( const T& s){ RCPP_STRING_DEBUG_1( "String::operator+=( %s )", DEMANGLE(T) ) ; setData() ; if( is_na() ) return *this ; const char* buf = CHAR( data ); std::wstring tmp( buf, buf + strlen(buf ) ) ; tmp += s ; data = internal::make_charsexp( tmp ) ; valid = true ; buffer_ready = false ; return *this ; } public: inline String& operator+=( const std::wstring& s){ return append_wide_string( s ); } inline String& operator+=( const wchar_t* s){ return append_wide_string( s ); } inline String& operator+=( const String& other ){ RCPP_STRING_DEBUG( "String::operator+=( const char*)" ) ; if( is_na() ) return *this ; if( other.is_na() ){ data = NA_STRING ; valid = true ; buffer_ready = false ; return *this ; } setBuffer() ; buffer += other ; valid = false ; return *this ; } inline String& operator+=( const StringProxy& proxy){ RCPP_STRING_DEBUG( "String::operator+=( const StringProxy& )" ) ; if( is_na() ) return *this ; SEXP proxy_sexp = proxy ; if( proxy_sexp == NA_STRING ) { data = NA_STRING ; valid = true; buffer_ready = false ; return *this ;} setBuffer() ; buffer += CHAR(proxy_sexp) ; valid = false ; return *this ; } inline String& operator+=( SEXP x){ RCPP_STRING_DEBUG( "String::operator+=( SEXP )" ) ; if( is_na() ) return *this ; if( x == NA_STRING ) { data = NA_STRING ; valid = true; buffer_ready = false ; return *this ;} setBuffer() ; buffer += CHAR(x) ; valid = false ; return *this ; } // inline String& operator+=( int x ){ data += char_nocheck(internal::r_coerce( x ) ) ; return *this ; } // inline String& operator+=( double x ){ data += char_nocheck(internal::r_coerce( x ) ) ; return *this ; } // inline String& operator+=( Rbyte x ){ data += char_nocheck(internal::r_coerce( x ) ) ; return *this ; } // inline String& operator+=( bool x ){ data += char_nocheck(internal::r_coerce( x ) ) ; return *this ; } // inline String& operator+=( Rcomplex x){ data += char_nocheck(internal::r_coerce( x ) ) ; return *this ; } inline String& replace_first( const char* s, const char* news ){ RCPP_STRING_DEBUG_2( "String::replace_first( const char* = '%s' , const char* = '%s')", s, news ) ; if( is_na() ) return *this ; setBuffer() ; size_t index = buffer.find_first_of( s ) ; if( index != std::string::npos ) buffer.replace( index, strlen(s), news ) ; valid = false ; return *this ; } inline String& replace_first( const Rcpp::String& s, const char* news ){ // replace NA -> do nothing if( s.is_na() ) return *this ; return replace_first( s.get_cstring(), news ) ; } inline String& replace_first( const char* s, const Rcpp::String& news ){ // replace NA -> do nothing if( news.is_na() ) return *this ; return replace_first( s, news.get_cstring() ) ; } inline String& replace_first( const Rcpp::String& s, const Rcpp::String& news ){ // replace NA -> do nothing if( s.is_na() || news.is_na() ) return *this ; return replace_first( s.get_cstring(), news.get_cstring() ) ; } inline String& replace_last( const char* s, const char* news ){ RCPP_STRING_DEBUG_2( "String::replace_last( const char* = '%s' , const char* = '%s')", s, news ) ; if( is_na() ) return *this ; setBuffer() ; size_t index = buffer.find_last_of( s ) ; if( index != std::string::npos ) buffer.replace( index, strlen(s), news ) ; valid = false ; return *this ; } inline String& replace_last( const Rcpp::String& s, const char* news ){ // replace NA -> do nothing if( s.is_na() ) return *this ; return replace_last( s.get_cstring(), news ) ; } inline String& replace_last( const char* s, const Rcpp::String& news ){ // replace NA -> do nothing if( news.is_na() ) return *this ; return replace_last( s, news.get_cstring() ) ; } inline String& replace_last( const Rcpp::String& s, const Rcpp::String& news ){ // replace NA -> do nothing if( s.is_na() || news.is_na() ) return *this ; return replace_last( s.get_cstring(), news.get_cstring() ) ; } inline String& replace_all( const char* s, const char* news ){ RCPP_STRING_DEBUG_2( "String::replace_all( const char* = '%s' , const char* = '%s')", s, news ) ; if( is_na() ) return *this ; setBuffer() ; size_t lens = strlen(s), len_news = strlen(news), index = buffer.find( s ) ; while( index != std::string::npos ){ buffer.replace( index, lens, news ) ; index = buffer.find( s, index + len_news ) ; } valid = false ; return *this ; } template inline String& replace_all( const LHS& s, const RHS& news ){ return replace_all( String( s ), String(news) ) ; } inline String& replace_all( const Rcpp::String& s, const char* news ){ // replace NA -> do nothing if( s.is_na() ) return *this ; return replace_all( s.get_cstring(), news ) ; } inline String& replace_all( const char* s, const Rcpp::String& news ){ // replace NA -> do nothing if( news.is_na() ) return *this ; return replace_all( s, news.get_cstring() ) ; } inline String& replace_all( const Rcpp::String& s, const Rcpp::String& news ){ // replace NA -> do nothing if( s.is_na() || news.is_na() ) return *this ; return replace_all( s.get_cstring(), news.get_cstring() ) ; } inline String& push_back( const char* s){ if( is_na() ) return *this ; setBuffer() ; valid = false ; buffer += s ; return *this ; } inline String& push_back( const std::string& s){ return push_back( s.c_str() ) ; } inline String& push_back( const Rcpp::String& s){ if( is_na() ) return *this ; if( s.is_na() ){ set_na(); return *this ; } return push_back( s.get_cstring() ) ; } inline String& push_front( const char* s){ if( is_na() ) return *this ; setBuffer() ; valid = false ; buffer += s ; return *this ; } inline String& push_front( const std::string& s){ return push_front( s.c_str() ) ; } inline String& push_front( const Rcpp::String& s){ if( is_na() ) return *this ; if( s.is_na() ){ set_na(); return *this ; } return push_front( s.get_cstring() ) ; } inline void set_na(){ data = NA_STRING ; valid = true; buffer_ready = false ; } inline SEXP get_sexp() const { RCPP_STRING_DEBUG_1( "String::get_sexp const ( valid = %d) ", valid ) ; return valid ? data : Rf_mkChar( buffer.c_str() ) ; } inline SEXP get_sexp() { RCPP_STRING_DEBUG_1( "String::get_sexp ( valid = %d) ", valid ) ; setData() ; return data ; } inline operator std::string() const { return get_cstring() ; } inline operator std::wstring() const { const char* s = get_cstring() ; return std::wstring( s, s + strlen(s) ); } inline const char* get_cstring() const { return buffer_ready ? buffer.c_str() : CHAR(data) ; } bool operator<( const Rcpp::String& other ) const { return strcmp( get_cstring(), other.get_cstring() ) < 0; } bool operator==( const Rcpp::String& other) const { return get_sexp() == other.get_sexp() ; } bool operator!=( const Rcpp::String& other) const { return get_sexp() != other.get_sexp() ; } bool operator>( const Rcpp::String& other ) const { return strcmp( get_cstring(), other.get_cstring() ) > 0; } private: /** the CHARSXP this String encapsulates */ SEXP data ; /** a buffer used to do string operations withough going back to the SEXP */ std::string buffer ; /** is data in sync with buffer */ bool valid ; /** is the buffer initialized */ bool buffer_ready ; inline bool is_na() const { return data == NA_STRING ; } inline void setBuffer(){ if( !buffer_ready){ buffer = char_nocheck(data) ; buffer_ready = true ; } } inline void setData(){ RCPP_STRING_DEBUG( "setData" ) ; if(!valid) { data = Rf_mkChar(buffer.c_str()) ; valid = true ; } } template void append( const T& s){ buffer += s ;} } ; namespace traits{ template<> struct r_type_traits{ typedef r_type_RcppString_tag r_category ; } ; template<> struct r_sexptype_traits{ enum{ rtype = STRSXP } ; } ; } namespace internal { template string_proxy& string_proxy::operator=( const String& s){ set( s.get_sexp() ); return *this ; } template SEXP string_element_converter::get( const Rcpp::String& input) { RCPP_DEBUG( "string_element_converter::get< Rcpp::String >()" ) return input.get_sexp() ; } template <> inline SEXP make_charsexp( const Rcpp::String& s){ return s.get_sexp() ; } template template string_proxy& string_proxy::operator+=(const T& rhs) { String tmp = get() ; tmp += rhs ; set( tmp ) ; return *this ; } } template <> inline SEXP wrap( const Rcpp::String& object) { RCPP_STRING_DEBUG( "wrap()" ) ; Shield res( Rf_allocVector( STRSXP, 1 ) ) ; SEXP data = object.get_sexp(); SET_STRING_ELT( res, 0, data ) ; return res ; } } // Rcpp #endif rcpp-0.11.0/inst/include/Rcpp/clone.h0000644000000000000000000000227612253723677014225 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // clone.h: Rcpp R/C++ interface class library -- clone RObject's // // Copyright (C) 2010 - 2012 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_clone_h #define Rcpp_clone_h #include namespace Rcpp{ /* cloning type T is possible if : - T can be converted to SEXP - T has a SEXP constructor */ template T clone(const T& object) { SEXP x = const_cast(object) ; return T( Rf_duplicate( x ) ) ; } } // namespace Rcpp #endif rcpp-0.11.0/inst/include/Rcpp/Vector.h0000644000000000000000000000407712253723677014370 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // // Vector.h: Rcpp R/C++ interface class library -- vectors // // Copyright (C) 2010 - 2013 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__Vector_h #define Rcpp__Vector_h #include #include #include namespace Rcpp{ namespace traits{ template struct Extractor ; } template class MatrixRow ; template class MatrixColumn ; template class SubMatrix ; class Dimension ; template class SingleLogicalResult ; } #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif rcpp-0.11.0/inst/include/Rcpp/api/0000755000000000000000000000000012253723677013516 5ustar rcpp-0.11.0/inst/include/Rcpp/api/meat/0000755000000000000000000000000012267115647014441 5ustar rcpp-0.11.0/inst/include/Rcpp/api/meat/is.h0000644000000000000000000001361712253723677015240 0ustar // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // // is.h: Rcpp R/C++ interface class library -- is implementations // // Copyright (C) 2013 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_api_meat_is_h #define Rcpp_api_meat_is_h namespace Rcpp{ namespace internal{ inline bool is_atomic( SEXP x){ return Rf_length(x) == 1 ; } inline bool is_matrix(SEXP x){ SEXP dim = Rf_getAttrib( x, R_DimSymbol) ; return dim != R_NilValue && Rf_length(dim) == 2 ; } template <> inline bool is__simple( SEXP x ){ return is_atomic(x) && TYPEOF(x) == INTSXP ; } template <> inline bool is__simple( SEXP x ){ return is_atomic(x) && TYPEOF(x) == REALSXP ; } template <> inline bool is__simple( SEXP x ){ return is_atomic(x) && TYPEOF(x) == LGLSXP ; } template <> inline bool is__simple( SEXP x ){ return is_atomic(x) && TYPEOF(x) == STRSXP ; } template <> inline bool is__simple( SEXP x ){ return is_atomic(x) && TYPEOF(x) == STRSXP ; } template <> inline bool is__simple(SEXP x) { return TYPEOF(x) == STRSXP; } template <> inline bool is__simple(SEXP x) { return TYPEOF(x) == STRSXP && is_matrix(x); } template <> inline bool is__simple(SEXP) { return true ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == INTSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == CPLXSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == RAWSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == REALSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == LGLSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == LANGSXP ; } template <> inline bool is__simple( SEXP x ){ return (TYPEOF(x) == LANGSXP) || (TYPEOF(x) == LISTSXP); } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == VECSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == INTSXP && is_matrix(x) ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == CPLXSXP && is_matrix(x) ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == RAWSXP && is_matrix(x) ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == REALSXP && is_matrix(x) ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == LGLSXP && is_matrix(x) ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == VECSXP && is_matrix(x) ; } template <> inline bool is__simple( SEXP x ){ if( TYPEOF(x) != VECSXP ) return false ; return Rf_inherits( x, "data.frame" ) ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == WEAKREFSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == SYMSXP ; } template <> inline bool is__simple( SEXP x ){ return ::Rf_isS4(x); } template <> inline bool is__simple( SEXP x ){ if( ! ::Rf_isS4(x) ) return false ; return ::Rf_inherits(x, "envRefClass" ) ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == PROMSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == LISTSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == CLOSXP || TYPEOF(x) == SPECIALSXP || TYPEOF(x) == BUILTINSXP ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == ENVSXP ; } template <> inline bool is__simple( SEXP x ){ if( TYPEOF(x) != LANGSXP ) return false ; return Rf_inherits( x, "formula" ) ; } template <> inline bool is__simple( SEXP x ){ return is_atomic(x) && TYPEOF(x) == REALSXP && Rf_inherits( x, "Date" ) ; } template <> inline bool is__simple( SEXP x ){ return is_atomic(x) && TYPEOF(x) == REALSXP && Rf_inherits( x, "POSIXt" ) ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == REALSXP && Rf_inherits( x, "Date" ) ; } template <> inline bool is__simple( SEXP x ){ return TYPEOF(x) == REALSXP && Rf_inherits( x, "POSIXt" ) ; } inline bool is_module_object_internal(SEXP obj, const char* clazz){ Environment env(obj) ; XPtr xp( env.get(".cppclass") ); return xp->has_typeinfo_name( clazz ) ; } template bool is__module__object( SEXP x){ typedef typename Rcpp::traits::un_pointer::type CLASS ; return is_module_object_internal(x, typeid(CLASS).name() ) ; } } // namespace internal } // namespace Rcpp #endif rcpp-0.11.0/inst/include/Rcpp/api/meat/DottedPairImpl.h0000644000000000000000000000613212253723677017500 0ustar // Copyright (C) 2013 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_api_meat_DottedPairImpl_h #define Rcpp_api_meat_DottedPairImpl_h namespace Rcpp{ template template void DottedPairImpl::push_front( const T& object){ CLASS& ref = static_cast(*this) ; ref.set__( grow(object, ref.get__() ) ) ; } template template void DottedPairImpl::push_back( const T& object){ CLASS& ref = static_cast(*this) ; if( ref.isNULL() ){ ref.set__( grow( object, ref.get__() ) ) ; } else { SEXP x = ref.get__() ; /* traverse the pairlist */ while( !Rf_isNull(CDR(x)) ){ x = CDR(x) ; } Shield tail( grow( object, R_NilValue ) ); SETCDR( x, tail ) ; } } template template void DottedPairImpl::insert( const size_t& index, const T& object) { CLASS& ref = static_cast(*this) ; if( index == 0 ) { push_front( object ) ; } else { if( ref.isNULL( ) ) throw index_out_of_bounds() ; if( static_cast(index) > ::Rf_length(ref.get__()) ) throw index_out_of_bounds() ; size_t i=1; SEXP x = ref.get__() ; while( i < index ){ x = CDR(x) ; i++; } Shield tail( grow( object, CDR(x) ) ); SETCDR( x, tail ) ; } } template template void DottedPairImpl::replace( const int& index, const T& object ) { CLASS& ref = static_cast(*this) ; if( static_cast(index) >= ::Rf_length(ref.get__()) ) throw index_out_of_bounds() ; Shield x( pairlist( object ) ); SEXP y = ref.get__() ; int i=0; while( i void DottedPairImpl::remove( const size_t& index ) { CLASS& ref = static_cast(*this) ; if( static_cast(index) >= Rf_length(ref.get__()) ) throw index_out_of_bounds() ; if( index == 0 ){ ref.set__( CDR( ref.get__() ) ) ; } else{ SEXP x = ref.get__() ; size_t i=1; while( i. #ifndef Rcpp_api_meat_Vector_h #define Rcpp_api_meat_Vector_h namespace Rcpp{ template class StoragePolicy> Vector::Vector() { Storage::set__( Rf_allocVector(RTYPE, 0 ) ); init() ; } template class StoragePolicy> template Vector::Vector( const VectorBase& other ) { RCPP_DEBUG_2( "Vector<%d>( const VectorBase& ) [VEC = %s]", RTYPE, DEMANGLE(VEC) ) import_sugar_expression( other, typename traits::same_type::type() ) ; } template class StoragePolicy> Vector::Vector( const int& size ) { Storage::set__( Rf_allocVector( RTYPE, size) ) ; init() ; } template class StoragePolicy> Vector::Vector( const Dimension& dims ) { Storage::set__( Rf_allocVector( RTYPE, dims.prod() ) ) ; init() ; if( dims.size() > 1 ){ AttributeProxyPolicy::attr( "dim" ) = dims; } } template class StoragePolicy> template Vector::Vector( const Dimension& dims, const U& u) { RCPP_DEBUG_2( "Vector<%d>( const Dimension& (%d), const U& )", RTYPE, dims.size() ) Storage::set__( Rf_allocVector( RTYPE, dims.prod() ) ) ; fill(u) ; if( dims.size() > 1 ){ AttributeProxyPolicy::attr( "dim" ) = dims; } } template class StoragePolicy> template Vector::Vector( const int& size, const U& u) { RCPP_DEBUG_2( "Vector<%d>( const int& size, const U& u )", RTYPE, size ) Storage::set__( Rf_allocVector( RTYPE, size) ) ; fill_or_generate( u ) ; } template class StoragePolicy> template Vector::Vector( const int& siz, stored_type (*gen)(U1), const U1& u1) { Storage::set__( Rf_allocVector( RTYPE, siz) ) ; RCPP_DEBUG_2( "const int& siz, stored_type (*gen)(U1), const U1& u1 )", RTYPE, siz ) iterator first = begin(), last = end() ; while( first != last ) *first++ = gen(u1) ; } template class StoragePolicy> template Vector::Vector( const int& siz, stored_type (*gen)(U1,U2), const U1& u1, const U2& u2) { Storage::set__( Rf_allocVector( RTYPE, siz) ) ; RCPP_DEBUG_2( "const int& siz, stored_type (*gen)(U1,U2), const U1& u1, const U2& u2)", RTYPE, siz ) iterator first = begin(), last = end() ; while( first != last ) *first++ = gen(u1,u2) ; } template class StoragePolicy> template Vector::Vector( const int& siz, stored_type (*gen)(U1,U2,U3), const U1& u1, const U2& u2, const U3& u3) { Storage::set__( Rf_allocVector( RTYPE, siz) ) ; RCPP_DEBUG_2( "const int& siz, stored_type (*gen)(U1,U2,U3), const U1& u1, const U2& u2, const U3& u3)", RTYPE, siz ) iterator first = begin(), last = end() ; while( first != last ) *first++ = gen(u1,u2,u3) ; } template class StoragePolicy> template Vector::Vector( InputIterator first, InputIterator last) { RCPP_DEBUG_1( "Vector<%d>( InputIterator first, InputIterator last", RTYPE ) Storage::set__( Rf_allocVector(RTYPE, std::distance(first, last) ) ) ; std::copy( first, last, begin() ) ; } template class StoragePolicy> template Vector::Vector( InputIterator first, InputIterator last, int n) { Storage::set__(Rf_allocVector(RTYPE, n)) ; RCPP_DEBUG_2( "Vector<%d>( InputIterator first, InputIterator last, int n = %d)", RTYPE, n ) std::copy( first, last, begin() ) ; } template class StoragePolicy> template Vector::Vector( InputIterator first, InputIterator last, Func func) { Storage::set__( Rf_allocVector( RTYPE, std::distance(first,last) ) ); RCPP_DEBUG_1( "Vector<%d>( InputIterator, InputIterator, Func )", RTYPE ) std::transform( first, last, begin(), func) ; } template class StoragePolicy> template Vector::Vector( InputIterator first, InputIterator last, Func func, int n) { Storage::set__( Rf_allocVector( RTYPE, n ) ); RCPP_DEBUG_2( "Vector<%d>( InputIterator, InputIterator, Func, int n = %d )", RTYPE, n ) std::transform( first, last, begin(), func) ; } template class StoragePolicy> template Vector::Vector( const sugar::SingleLogicalResult& obj ) { Storage::set__( r_cast( const_cast&>(obj).get_sexp() ) ) ; RCPP_DEBUG_2( "Vector<%d>( const sugar::SingleLogicalResult& ) [T = %s]", RTYPE, DEMANGLE(T) ) } template class StoragePolicy> template Vector& Vector::operator=( const T &x ){ assign_object( x, typename traits::is_sugar_expression::type() ) ; return *this ; } template class StoragePolicy> template inline void Vector::assign_sugar_expression( const T& x ){ int n = size() ; if( n == x.size() ){ // just copy the data import_expression(x, n ) ; } else{ // different size, so we change the memory Storage::set__( r_cast( wrap(x) ) ); } } // sugar template class StoragePolicy> template inline void Vector::assign_object( const T& x, traits::true_type ){ assign_sugar_expression( x.get_ref() ) ; } // anything else template class StoragePolicy> template inline void Vector::assign_object( const T& x, traits::false_type ){ Storage::set__( r_cast( wrap(x) ) ) ; } template class StoragePolicy> template inline void Vector::import_sugar_expression( const Rcpp::VectorBase& other, traits::false_type ){ RCPP_DEBUG_4( "Vector<%d>::import_sugar_expression( VectorBase<%d,%d,%s>, false_type )", RTYPE, NA, RTYPE, DEMANGLE(VEC) ) ; int n = other.size() ; Storage::set__( Rf_allocVector( RTYPE, n ) ) ; import_expression( other.get_ref() , n ) ; } template class StoragePolicy> template inline void Vector::import_sugar_expression( const Rcpp::VectorBase& other, traits::true_type ){ RCPP_DEBUG_4( "Vector<%d>::import_sugar_expression( VectorBase<%d,%d,%s>, true_type )", RTYPE, NA, RTYPE, DEMANGLE(VEC) ) ; Storage::set__( other.get_ref() ) ; } template class StoragePolicy> template inline void Vector::import_expression( const T& other, int n ){ iterator start = begin() ; RCPP_LOOP_UNROLL(start,other) } template class StoragePolicy> template inline void Vector::fill_or_generate( const T& t){ fill_or_generate__impl( t, typename traits::is_generator::type() ) ; } template class StoragePolicy> template inline void Vector::fill_or_generate__impl( const T& gen, traits::true_type){ iterator first = begin() ; iterator last = end() ; while( first != last ) *first++ = gen() ; } template class StoragePolicy> template inline void Vector::fill_or_generate__impl( const T& t, traits::false_type){ fill(t) ; } template class StoragePolicy> typename Vector::iterator Vector::erase_single__impl( iterator position ){ if( position < begin() || position > end() ) throw index_out_of_bounds( ) ; int n = size() ; Vector target( n - 1 ) ; iterator target_it(target.begin()) ; iterator it(begin()) ; iterator this_end(end()) ; SEXP names = RCPP_GET_NAMES(Storage::get__()) ; if( Rf_isNull(names) ){ int i=0; for( ; it < position; ++it, ++target_it, i++){ *target_it = *it; } ++it ; for( ; it < this_end ; ++it, ++target_it){ *target_it = *it; } Storage::set__( target.get__() ) ; return begin()+i ; } else { Shield newnames(::Rf_allocVector( STRSXP, n-1 )); int i= 0 ; for( ; it < position; ++it, ++target_it,i++){ *target_it = *it; SET_STRING_ELT( newnames, i , STRING_ELT(names,i) ) ; } int result=i ; ++it ; i++ ; for( ; it < this_end ; ++it, ++target_it, i++){ *target_it = *it; SET_STRING_ELT( newnames, i-1, STRING_ELT(names,i) ) ; } target.attr( "names" ) = newnames ; Storage::set__( target.get__() ) ; return begin()+result ; } } template class StoragePolicy> typename Vector::iterator Vector::erase_range__impl( iterator first, iterator last ){ if( first > last ) throw std::range_error("invalid range") ; if( last > end() || first < begin() ) throw index_out_of_bounds() ; iterator it = begin() ; iterator this_end = end() ; int nremoved = std::distance(first,last) ; int target_size = size() - nremoved ; Vector target( target_size ) ; iterator target_it = target.begin() ; SEXP names = RCPP_GET_NAMES(Storage::get__()) ; iterator result ; if( Rf_isNull(names) ){ int i=0; for( ; it < first; ++it, ++target_it, i++ ){ *target_it = *it ; } result = begin() + i + 1 ; for( it = last ; it < this_end; ++it, ++target_it ){ *target_it = *it ; } } else{ Shield newnames( ::Rf_allocVector(STRSXP, target_size) ) ; int i= 0 ; for( ; it < first; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ); } result = begin() + i + 1 ; for( it = last ; it < this_end; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i + nremoved ) ); } target.attr("names" ) = newnames ; } Storage::set__( target.get__() ) ; return result ; } template class StoragePolicy> void Vector::push_back__impl(const stored_type& object, traits::false_type){ int n = size() ; Vector target( n + 1 ) ; SEXP names = RCPP_GET_NAMES(Storage::get__()) ; iterator target_it( target.begin() ) ; iterator it(begin()) ; iterator this_end(end()); if( Rf_isNull(names) ){ for( ; it < this_end; ++it, ++target_it ){ *target_it = *it ; } } else { Shield newnames( ::Rf_allocVector( STRSXP, n + 1) ) ; int i = 0 ; for( ; it < this_end; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ; } SET_STRING_ELT( newnames, i, Rf_mkChar("") ) ; target.attr("names") = newnames ; } *target_it = object; Storage::set__( target.get__() ) ; } template class StoragePolicy> void Vector::push_back__impl(const stored_type& object, traits::true_type){ Shield object_sexp( object ) ; int n = size() ; Vector target( n + 1 ) ; SEXP names = RCPP_GET_NAMES(Storage::get__()) ; iterator target_it( target.begin() ) ; iterator it(begin()) ; iterator this_end(end()); if( Rf_isNull(names) ){ for( ; it < this_end; ++it, ++target_it ){ *target_it = *it ; } } else { Shield newnames( ::Rf_allocVector( STRSXP, n + 1) ) ; int i = 0 ; for( ; it < this_end; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ; } SET_STRING_ELT( newnames, i, Rf_mkChar("") ) ; target.attr("names") = newnames ; } *target_it = object_sexp; Storage::set__( target.get__() ) ; } template class StoragePolicy> void Vector::push_back_name__impl(const stored_type& object, const std::string& name, traits::false_type ){ int n = size() ; Vector target( n + 1 ) ; iterator target_it( target.begin() ) ; iterator it(begin()) ; iterator this_end(end()); SEXP names = RCPP_GET_NAMES(Storage::get__()) ; Shield newnames( ::Rf_allocVector( STRSXP, n+1 ) ) ; int i=0; if( Rf_isNull(names) ){ Shield dummy( Rf_mkChar("") ); for( ; it < this_end; ++it, ++target_it,i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i , dummy ); } } else { for( ; it < this_end; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ; } } SET_STRING_ELT( newnames, i, Rf_mkChar( name.c_str() ) ); target.attr("names") = newnames ; *target_it = object; Storage::set__( target.get__() ) ; } template class StoragePolicy> void Vector::push_back_name__impl(const stored_type& object, const std::string& name, traits::true_type ){ Shield object_sexp( object ) ; int n = size() ; Vector target( n + 1 ) ; iterator target_it( target.begin() ) ; iterator it(begin()) ; iterator this_end(end()); SEXP names = RCPP_GET_NAMES(Storage::get__()) ; Shield newnames( ::Rf_allocVector( STRSXP, n+1 ) ) ; int i=0; if( Rf_isNull(names) ){ for( ; it < this_end; ++it, ++target_it,i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i , R_BlankString ); } } else { for( ; it < this_end; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ; } } SET_STRING_ELT( newnames, i, Rf_mkChar( name.c_str() ) ); target.attr("names") = newnames ; *target_it = object_sexp; Storage::set__( target.get__() ) ; } template class StoragePolicy> void Vector::push_front__impl(const stored_type& object, traits::false_type ){ int n = size() ; Vector target( n+1); iterator target_it(target.begin()); iterator it(begin()); iterator this_end(end()); *target_it = object ; ++target_it ; SEXP names = RCPP_GET_NAMES(Storage::get__()) ; if( Rf_isNull(names) ){ for( ; it newnames( ::Rf_allocVector( STRSXP, n + 1) ); int i=1 ; SET_STRING_ELT( newnames, 0, Rf_mkChar("") ) ; for( ; it class StoragePolicy> void Vector::push_front__impl(const stored_type& object, traits::true_type ){ Shield object_sexp( object ) ; int n = size() ; Vector target( n+1); iterator target_it(target.begin()); iterator it(begin()); iterator this_end(end()); *target_it = object_sexp ; ++target_it ; SEXP names = RCPP_GET_NAMES(Storage::get__()) ; if( Rf_isNull(names) ){ for( ; it newnames( ::Rf_allocVector( STRSXP, n + 1) ); int i=1 ; SET_STRING_ELT( newnames, 0, Rf_mkChar("") ) ; for( ; it class StoragePolicy> void Vector::push_front_name__impl(const stored_type& object, const std::string& name, traits::false_type ){ int n = size() ; Vector target( n + 1 ) ; iterator target_it( target.begin() ) ; iterator it(begin()) ; iterator this_end(end()); SEXP names = RCPP_GET_NAMES(Storage::get__()) ; Shield newnames( ::Rf_allocVector( STRSXP, n+1 ) ) ; int i=1; SET_STRING_ELT( newnames, 0, Rf_mkChar( name.c_str() ) ); *target_it = object; ++target_it ; if( Rf_isNull(names) ){ for( ; it < this_end; ++it, ++target_it,i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i , R_BlankString ); } } else { for( ; it < this_end; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i-1 ) ) ; } } target.attr("names") = newnames ; Storage::set__( target.get__() ) ; } template class StoragePolicy> void Vector::push_front_name__impl(const stored_type& object, const std::string& name, traits::true_type ){ Shield object_sexp(object) ; int n = size() ; Vector target( n + 1 ) ; iterator target_it( target.begin() ) ; iterator it(begin()) ; iterator this_end(end()); SEXP names = RCPP_GET_NAMES(Storage::get__()) ; Shield newnames( ::Rf_allocVector( STRSXP, n+1 ) ) ; int i=1; SET_STRING_ELT( newnames, 0, Rf_mkChar( name.c_str() ) ); *target_it = object_sexp; ++target_it ; if( Rf_isNull(names) ){ for( ; it < this_end; ++it, ++target_it,i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i , R_BlankString ); } } else { for( ; it < this_end; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i-1 ) ) ; } } target.attr("names") = newnames ; Storage::set__( target.get__() ) ; } template class StoragePolicy> typename Vector::iterator Vector::insert__impl( iterator position, const stored_type& object, traits::false_type){ int n = size() ; Vector target( n+1 ) ; iterator target_it = target.begin(); iterator it = begin() ; iterator this_end = end() ; SEXP names = RCPP_GET_NAMES(Storage::get__()) ; iterator result ; if( Rf_isNull(names) ){ for( ; it < position; ++it, ++target_it){ *target_it = *it ; } result = target_it; *target_it = object ; ++target_it ; for( ; it < this_end; ++it, ++target_it ){ *target_it = *it ; } } else{ Shield newnames( ::Rf_allocVector( STRSXP, n + 1 ) ) ; int i=0; for( ; it < position; ++it, ++target_it, i++){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ; } result = target_it; *target_it = object ; SET_STRING_ELT( newnames, i, ::Rf_mkChar("") ) ; i++ ; ++target_it ; for( ; it < this_end; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i - 1) ) ; } target.attr( "names" ) = newnames ; } Storage::set__( target.get__() ) ; return result ; } template class StoragePolicy> typename Vector::iterator Vector::insert__impl( iterator position, const stored_type& object_, traits::true_type){ Shield object( object_ ) ; int n = size() ; Vector target( n+1 ) ; iterator target_it = target.begin(); iterator it = begin() ; iterator this_end = end() ; SEXP names = RCPP_GET_NAMES(Storage::get__()) ; iterator result ; if( Rf_isNull(names) ){ for( ; it < position; ++it, ++target_it){ *target_it = *it ; } result = target_it; *target_it = object ; ++target_it ; for( ; it < this_end; ++it, ++target_it ){ *target_it = *it ; } } else{ Shield newnames( ::Rf_allocVector( STRSXP, n + 1 ) ) ; int i=0; for( ; it < position; ++it, ++target_it, i++){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ; } result = target_it; *target_it = object ; SET_STRING_ELT( newnames, i, ::Rf_mkChar("") ) ; i++ ; ++target_it ; for( ; it < this_end; ++it, ++target_it, i++ ){ *target_it = *it ; SET_STRING_ELT( newnames, i, STRING_ELT(names, i - 1) ) ; } target.attr( "names" ) = newnames ; } Storage::set__( target.get__() ) ; return result ; } template class StoragePolicy> template Vector& Vector::operator+=( const VectorBase& rhs ){ const EXPR_VEC& ref = rhs.get_ref() ; iterator start = begin() ; int n = size() ; // TODO: maybe unroll this stored_type tmp ; for( int i=0; i( left ) ){ tmp = ref[i] ; left = traits::is_na( tmp ) ? tmp : ( left + tmp ) ; } } return *this ; } template class StoragePolicy> template Vector& Vector::operator+=( const VectorBase& rhs ){ const EXPR_VEC& ref = rhs.get_ref() ; iterator start = begin() ; int n = size() ; stored_type tmp ; for( int i=0; i(start[i]) ){ start[i] += ref[i] ; } } return *this ; } // template