droplet_execute {analogsea}R Documentation

Execute R code on a droplet.

Description

Execute R code on a droplet.

Usage

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

## Not run: 
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)

## End(Not run)

[Package analogsea version 1.0.0 Index]