indivsInfo_ExtractStart: Extract info on individuals at start of initial life stage

View source: R/indivsInfo_ExtractStart.R

indivsInfo_ExtractStartR Documentation

Extract info on individuals at start of initial life stage

Description

Function to extract info on individuals at start of initial life stage.

Usage

indivsInfo_ExtractStart(
  sf_indivs,
  addVars = "",
  hasSuccessful = FALSE,
  verbose = FALSE
)

Arguments

sf_indivs

- sf dataframe for the initial life stage from call to indivsInfo_ReorderResults

addVars

- character vector with names of additional (non-default) variables to extract

hasSuccessful

- flag indicating that sfs_indivs include a "successful" column

verbose

- flag to print debugging info

Details

The input sf dataframe should be the one returned by indivsInfo_ReorderResults for the initial life stage. For each individual, the initial location is identified by the record when startTime == time.

Value

sf dataframe with columns:

  • startTime

  • origID - original (starting) individual ID

  • startLHS - starting life stage

  • startGridCell - ID of starting ROMS grid cell

  • startLon - starting longitude

  • startLat - starting latitude

  • startDepth - starting depth (m)

  • startBathym - bathymetric depth (m) at starting location

  • startAge - starting depth

  • startNum - starting depth

  • startTemp - starting temperature

  • start..AddVars - columns corresponding to additional variables (names converted to camel case)

  • successful - flag indicating "success" (TRUE) or failure (FALSE) (e.g., settlement) [if hasSuccessful]=TRUE

  • startGeom - starting 2d location as SF_POINT

Note

If additional variables (addVars) are requested in the output dataframe, the names are prepended by "end" and converted to camel case.


wStockhausen/rDisMELS documentation built on March 27, 2022, 1 a.m.