prepare_payload: Perform transformations to api payload before return data...

View source: R/populate_template.R

prepare_payloadR Documentation

Perform transformations to api payload before return data frame

Description

This function takes the data-frame returned from the api call and preforms any required transformations before returning it. Currently the function optionally removes is and slug from the data frame (if they exist), and transforms all of the field names to uppercase so that they match names that have been traditionally used in FISHNET-2. Other transformations or modifications could be added in the future.

Usage

prepare_payload(payload, show_id = FALSE, to_upper = TRUE)

Arguments

payload

dataframe

show_id

When 'FALSE', the default, the 'id' and 'slug' fields are hidden from the data frame. To return these columns as part of the data frame, use 'show_id = TRUE'.

to_upper
  • should the names of the dataframe be converted to upper case?

Value

dataframe

Author(s)

Adam Cottrill adam.cottrill@ontario.ca


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