ppo_traits: Get the traits data from the [ppo_data()] event ids.

View source: R/ppo_traits.R

ppo_traitsR Documentation

Get the traits data from the [ppo_data()] event ids.

Description

Get the traits data from the [ppo_data()] event ids.

Usage

ppo_traits(x, sorted = TRUE, flatten_traits = TRUE, flatten_all = FALSE)

Arguments

x

(object) As returned from link(rppo)[ppo_data]

sorted

(logical) Should the output traits be sorted by category. Default : TRUE

flatten_traits

(logical) Should the traits list be melted in a data.frame. Default : TRUE

flatten_all

(logical) Should the output list be melted in a data.frame. Default : FALSE

Value

If sorted is TRUE, a list for each event id containing a list with the following elements:

  • 'metadata': A data frame containing metadata

  • 'taxonomy': A data.frame containing the taxonomy

  • 'traits': if flatten_traits is TRUE, a melted data.frame, else a list containing the traits value

Else, a list of data.frames for each event id. IF flatten_all is TRUE, the list is flatten to a data.frame

Examples

r1 <- ppo_data(genus = "Quercus", termID='obo:PPO_0002313', limit=10, timeLimit = 4)
r1_traits <- ppo_traits(r1)

biocodellc/rppo documentation built on July 8, 2023, 12:45 p.m.