R/plotsViewer.R

Defines functions plotsViewer jslib

Documented in plotsViewer

jslib <- function(){
    dir <- tempdir()
    lib <- file.path(dir, "library")
    if (!dir.exists(lib)) {
        dir.create(lib)
    }
    file.copy(system.file(file.path("js", "plotly-latest.min.js"),
                          package = "JuliaCall",
                          mustWork = TRUE),
              file.path(lib, "plotly-latest.min.js"))
}

#' Julia plots viewer in R.
#'
#' \code{plotsViewer} lets you view julia plots in R.
#'
#' @export
plotsViewer <- function(){
    jslib()
    julia_command("pushdisplay(JuliaCall.viewer_display);")
}

Try the JuliaCall package in your browser

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

JuliaCall documentation built on Sept. 8, 2022, 5:10 p.m.