| is_hosted_session | R Documentation |
Determines whether the current R session is running in a hosted environment such as Google Colab or RStudio Server (non-localhost).
is_hosted_session()
This function checks for:
Google Colab: presence of the COLAB_RELEASE_TAG 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
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.