civis_platform {civis}R Documentation

Evaluate an expression in Civis Platform

Description

This is used as with the future API as an argument to plan.

Usage

civis_platform(...)

Arguments

...

Arguments to CivisFuture and then scripts_post_containers

Value

The result of evaluating expr.

Examples

## Not run: 

 plan(civis_platform)

 # Specify required resources, image, and tag.
 fut <- future({2 + 2},
   required_resources = list(cpu = 1024, memory = 2048),
   docker_image_name = "civisanalytics/datascience-r",
   docker_image_tag = "3")

 # Evaluate the future later
 fut <- future({2 + 2}, lazy = TRUE)
 run(fut)

 # check if a future has resolved
 resolved(fut)

 # block until the future resolves, and return the value or throw error
 value(fut)

 # cancel the job
 cancel(fut)

 # grab the run logs
 fetch_logs(fut)

 # handle errors
 fut <- future({stop("Error!")})
 e <- tryCatch(value(fut), error = function(e) e)
 get_error(e)

## End(Not run)


[Package civis version 3.1.2 Index]