R/get_neptune.R

Defines functions get_neptune

get_neptune <- function() {
  npt <- options("neptune")
  if (is.null(npt$neptune)) {
    tryCatch({
      neptune <- reticulate::import("neptune.new")
    }, error = function(e) {
      message("couldn't import neptune client. Trying to install")
      neptune_install()
      neptune <- reticulate::import("neptune.new")
    })
    options(neptune = neptune)
  }
  
  npt <- options("neptune")$neptune
  return(npt)
}

Try the neptune package in your browser

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

neptune documentation built on April 13, 2022, 5:14 p.m.