# Load rJava and jars, initialize JVM
mgm_init <- function(){

  # Initalize JVM

  jarPath <- paste(getwd(), "tetradLite.jar", sep=.Platform$file.sep)

    file_url <- 'https://cdn.rawgit.com/benoslab/tetradLite/7c16abbd/out/artifacts/tetradLite_jar/tetradLite.jar'
    download.file(url=file_url, mode='wb', destfile = jarPath)

  # Add tetrad jar

  javaPaths <- .jclassPath()

  if(tail(javaPaths, n=1) != jarPath){
    print("Error: tetrad.jar not loaded")

Try the causalMGM package in your browser

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

causalMGM documentation built on May 2, 2019, 5:42 a.m.