.cloudstanr <- new.env(parent = emptyenv())
.cloudstanr$PATH <- NULL
#' Return the default Cloudstan CLI installation
#' path.
#'
#' @export
#'
default_path <- function() {
file.path(Sys.getenv("HOME"), ".cloudstan")
}
#' Returns the path of the Cloudstan CLI executable.
#'
#' @export
#'
bin_path <- function() {
p <- paste0(default_path(), "/bin/cloudstan-proxy")
if(get_os() == "windows") {
paste0(p, ".exe")
} else {
p
}
}
bin_exists <- function() {
file.exists(bin_path())
}
set_cloudstan_sys_env <- function() {
Sys.setenv(CLOUDSTAN=default_path())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.