R/zzz.R

#' @useDynLib hashmap, .registration = TRUE
# @exportPattern "^[[:alpha:]]+"
#' @importFrom Rcpp evalCpp
#' @importFrom Rcpp cpp_object_initializer
#' @importFrom Rcpp sourceCpp
#' @importClassesFrom Rcpp "C++Object"

.onLoad <- function(libname, pkgname) {

    opts <- options()
    hm_opts <- list(
        hashmap.max.print = 6
    )

    new_opts <- !(names(hm_opts) %in% names(opts))
    if(any(new_opts)) {
        options(hm_opts[new_opts])
    }

    Rcpp::loadModule("Hashmap", TRUE)
    Rcpp::registerPlugin("hashmap", .plugin)

    invisible()
}

Try the hashmap package in your browser

Any scripts or data that you put into this service are public.

hashmap documentation built on May 1, 2019, 10:13 p.m.