Response: Process service responses to tibble and other data...

ResponseR Documentation

Process service responses to tibble and other data structures.

Description

Process service responses to tibble and other data structures.

Usage

flatten(x)

## S4 method for signature 'response'
str(object)

## S3 method for class 'response'
as.list(x, ..., as = c("text", "raw", "parsed"))

Arguments

x

A response object returned by the service.

object

A response object returned by the service.

...

not currently used

as

character(1); one of 'raw', 'text', 'parsed'

Value

flatten() returns a tibble where each row correseponds to a top-level list element of the return value, and columns are the unlisted second and more-nested elements.

str() displays a compact representation of the list-like JSON response; it returns NULL.

as.list() retruns the content of the web service request as a list.

Examples

if (gcloud_exists()) {
    leonardo <- Leonardo()
    leonardo$listClusters() %>% flatten()
}

if (gcloud_exists())
   leonardo$getSystemStatus() %>% str()

if (gcloud_exists())
    leonardo$getSystemStatus() %>% as.list()


Bioconductor/AnVIL documentation built on June 25, 2022, 9:42 p.m.