expand_column: Expand information of columns in JSON format

View source: R/frontend.R

expand_columnR Documentation

Expand information of columns in JSON format

Description

Expand all information contained in a JSON formatted column in a query object. Information is presented as nested data frames if needed.

Usage

expand_column(query, column_name)

Arguments

query

The query object with a JSON formatted column to be expanded.

column_name

(character) The name of the column to be expanded.

Value

Nothing.

Examples

library(ArctosR)

if (interactive()) {
  # Request to download all available data
  query <- get_records(
    scientific_name = "Canis lupus", guid_prefix = "MSB:Mamm",
    columns = list("guid", "parts", "partdetail")
  )

  # The partdetail column is a JSON list of parts and their attributes
  # This will convert the column to dataframes:
  expand_column(query, "partdetail")
}


ArctosR documentation built on Sept. 16, 2025, 1:10 a.m.