R/onLoad.R

Defines functions .onLoad

#' @importFrom V8 v8
ct <- NULL
rand <- NULL
ht <- NULL

.onLoad <- function(libname, pkgname){
  ct <<- V8::v8();
  ct$source(system.file("js/turf516.js", package = pkgname))
  ct$source(system.file("js/turf-meta.js", package = pkgname))
  ct$source(system.file("js/turf-invariant.js", package = pkgname))
  ct$source(system.file("js/cloner.js", package = pkgname))
  ct$source(system.file("js/simple-statistics.js", package = pkgname))

  rand <<- V8::v8();
  rand$source(system.file("js/geojson_random.js", package = pkgname))

  ht <<- V8::v8();
  ht$source(system.file("js/geojsonhint-v201.js", package = pkgname))
}

Try the lawn package in your browser

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

lawn documentation built on Jan. 6, 2021, 5:07 p.m.