#' @import rJava RProtoBuf
NULL
.onLoad <- function(libname, pkgname) {
# For debugging: to see if Jars are effectively loaded
# options(java.parameters = "-verbose:class")
# TODO : devtools will look only in RJDemetra3\java for JAR files so copied them there too
result <- .jpackage(pkgname, lib.loc=libname)
if (!result) stop("Loading java packages failed")
# what's your java version? Need > 1.5.0.
jversion <- .jcall('java.lang.System','S','getProperty','java.version')
if (jversion < "1.8.0") {
stop(paste("Your java version is ", jversion,
". Need 1.8.0 or higher.", sep=""))
} else {
cat("Java requirements fullfilled, found version ",jversion,"\n")
}
proto.dir <- system.file("proto", package = pkgname)
readProtoFiles2(protoPath = proto.dir)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.