View source: R/defineCapHistCols.R
defineCapHistCols | R Documentation |
Based on a parent-child table, this returns a vector of column names to help create a consistent capture history matrix. By default, it will sort using the paths constructed from 'buildNodeOrder()'. If river kilometer ('rkm') is included as a column in the configuration file, this function could use that to help determine the column order.
defineCapHistCols(
parent_child = NULL,
configuration = NULL,
use_rkm = FALSE,
bottom_sites = NULL,
incl_all_nodes = TRUE
)
parent_child |
parent-child table. Could be created from 'buildParentChild()' from 'PITcleanr' package. |
configuration |
configuration file. Could be created from 'buildConfig()' from 'PITcleanr' package. |
use_rkm |
if the river kilometer code exists in the configuration file (in a column named 'rkm'), use those codes to help establish the order of capture history columns. Default value is 'FALSE'. |
bottom_sites |
If provided, represents a character vector of sites to use as "bottom sites". All upstream sites of each bottom site will be grouped just after that bottom site in the capture history matrix. |
incl_all_nodes |
if some 'bottom_sites' are supplied, should all the nodes in the parent-child table be included (default is 'TRUE'), or only nodes upstream of those bottom sites be returned ('FALSE'). The initial site will always be returned. If no 'bottom_sites' are supplied, this is set to 'TRUE'. |
Kevin See
defineCapHistCols()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.