| is_hosted_session | R Documentation |
Determines whether the current R session is running in a hosted environment such as Google Colab, VS Code, Kubernetes, or RStudio Server (non-localhost).
is_hosted_session()
This function checks for (in order):
Option override: if azr.hosted option is set, returns isTRUE() of its value
Google Colab: presence of the COLAB_RELEASE_TAG environment variable
VS Code: presence of the VSCODE_INJECTION or VSCODE_PROXY_URI environment variable
Kubernetes: presence of the KUBERNETES_SERVICE_HOST environment variable
RStudio Server: RSTUDIO_PROGRAM_MODE is "server" and
RSTUDIO_HTTP_REFERER does not contain "localhost"
A logical value: TRUE if running in a hosted session (Google Colab,
VS Code, Kubernetes, or remote RStudio Server), FALSE otherwise.
if (is_hosted_session()) {
message("Running in a hosted environment")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.