R/plugin.R

.plugin <- Rcpp:::Rcpp.plugin.maker(
    libs = (function() {
        libs_path <- sprintf(
            "%s/hashmap/libs",
            installed.packages()["hashmap","LibPath"][1]
        )

        pattern <- sprintf("*hashmap%s", .Platform$dynlib.ext)
        lib_files <- list.files(
            libs_path,
            pattern = pattern,
            full.names = TRUE,
            recursive = TRUE
        )

        if (length(lib_files) < 1) {
            res <- "failed-to-locate-hashmap-shared-library"
        } else {
            res <- lib_files[1]
        }

        res
    })(),
    package = "hashmap"
)

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.