getSampleTree {neonOS} | R Documentation |
Find all relatives (parents, children, and outward) of a given sample.
Description
Find all samples in the sample tree of a given sample.
Usage
getSampleTree(
sampleNode,
idType = "tag",
sampleClass = NA_character_,
token = NA_character_
)
Arguments
sampleNode |
A NEON sample identifier. [character] |
idType |
Is sampleNode a tag, barcode, or guid? Defaults to tag. [character] |
sampleClass |
The NEON sampleClass of sampleNode. Required if sampleNode is a tag and there are multiple valid classes. [character] |
token |
User specific API token (generated within neon.datascience user accounts). Optional. [character] |
Details
Related NEON samples can be connected to each other in a parent-child hierarchy. Parents can have one or many children, and children can have one or many parents. Sample hierarchies can be simple or complex - for example, particulate mass samples (dust filters) have no parents or children, whereas water chemistry samples can be subsampled for dissolved gas, isotope, and microbial measurements. This function finds all ancestors and descendants of the focal sample (the sampleNode), and all of their relatives, and so on recursively, to provide the entire hierarchy. See documentation for each data product for more specific information.
Value
A table of sample identifiers, their classes, and their parent samples.
Author(s)
Claire Lunch clunch@battelleecology.org
References
License: GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
Examples
# Find related samples for a soil nitrogen transformation sample
## Not run:
soil_samp <- getSampleTree(sampleNode="B00000123538", idType="barcode")
## End(Not run)