extract_be_content: Extracts simplified content from response.

View source: R/monarchr.R

extract_be_contentR Documentation

Extracts simplified content from response.

Description

Extracts simplified content from response.

Usage

extract_be_content(df)

Arguments

df

a data.frame obtained by flattening the json response's content.

Value

a tibble with just the core information of interest.

Examples

gene <-"NCBIGene:8314"
gene <- utils::URLencode(gene, reserved = TRUE)
query <- list(rows=100, fetch_objects="true")
url <- build_monarch_url(path = list("/api/bioentity/gene",
                                     gene,
                                     "diseases/"),
                         query = query)
resp <- monarch_api(url)
resp <- jsonlite::flatten(resp$content$associations,
                          recursive=TRUE)
extract_be_content(resp)

charlieccarey/monarchr documentation built on Dec. 12, 2023, 12:57 p.m.