droplet_execute: Execute R code on a droplet.

Description Usage Arguments Details Examples

View source: R/droplet_execute.R

Description

Execute R code on a droplet.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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)

analogsea documentation built on June 2, 2021, 1:07 a.m.