Execute R code on a droplet.

droplet_execute(droplet, code, verbose = TRUE)

Arguments

droplet

A droplet, or object that can be coerced to a droplet by as.droplet.

code

Code to execute on a droplet.

verbose

(logical) Print messages. Default: TRUE

Details

Assumes that the droplet has R installed.

Examples

if (FALSE) { d <- droplet_create() %>% debian_add_swap() %>% droplet_ssh("apt-get update") %>% debian_install_r() results <- d %>% droplet_execute({ x <- letters numbers <- runif(1000) }) results$x results$numbers droplet_delete(d) }