Execute R code on a droplet.
droplet_execute(droplet, code, verbose = TRUE)
A droplet, or object that can be coerced to a droplet
by as.droplet
.
Code to execute on a droplet.
(logical) Print messages. Default: TRUE
Assumes that the droplet has R installed.
if (FALSE) {
d <- droplet_create() %>%
ubuntu_add_swap() %>%
droplet_ssh("apt-get update") %>%
ubuntu_install_r()
results <- d %>% droplet_execute({
x <- letters
numbers <- runif(1000)
})
results$x
results$numbers
droplet_delete(d)
}