Description Usage Arguments Details Value Examples
This lets you specify templates for the VM you want to launch It passes the template on to gce_vm_container
1 2 3 4 |
template |
The template available |
username |
username if needed (RStudio) |
password |
password if needed (RStudio) |
dynamic_image |
Supply an alternative to the default Docker image for the template |
image_family |
An image-family. It must come from the |
wait |
Whether to wait for the VM to launch before returning. Default |
... |
Arguments passed on to
|
Templates available are:
rstudio An RStudio server docker image with tidyverse and devtools
rstudio-gpu An RStudio server with popular R machine learning libraries and GPU driver. Will launch a GPU enabled VM.
rstudio-shiny An RStudio server with Shiny also installed, proxied to /shiny
shiny A Shiny docker image
opencpu An OpenCPU docker image
r_base Latest version of R stable
dynamic Supply your own docker image within dynamic_image
For dynamic
templates you will need to launch the docker image with any ports you want opened,
other settings etc. via docker_run.
Use dynamic_image
to override the default rocker images e.g. rocker/shiny
for shiny, etc.
The VM object, or the VM startup operation if wait=FALSE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
library(googleComputeEngineR)
## make instance using R-base
vm <- gce_vm_template("r-base", predefined_type = "f1-micro", name = "rbase")
## run an R function on the instance within the R-base docker image
docker_run(vm, "rocker/r-base", c("Rscript", "-e", "1+1"), user = "mark")
#> [1] 2
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.