pluck_dataframe: Pluck a data-frame from a named list of key-value pairs

View source: R/glfishr_utils.R

pluck_dataframeR Documentation

Pluck a data-frame from a named list of key-value pairs

Description

This is a helper function that is used to extract or pluck a data-frame from a named list of key-values pairs. Api endpoints for lookup-values are often in the form of key-value pairs. This function selects the named element from list and returns it as a data-frame with the columns 'value' and 'label'. This function is not expected to be called directly, but is used by other convenience functions (get_tag_colours(), get_tag_types()).

Usage

pluck_dataframe(payload, what = "tag_type")

Arguments

payload

list

what

string

Value

dataframe

Author(s)

Adam Cottrill adam.cottrill@ontario.ca


AdamCottrill/glfishr documentation built on Aug. 9, 2024, 5:47 p.m.