combineData: Combines radii data from multiple files into one data.frame

View source: R/combineData.R

combineDataR Documentation

Combines radii data from multiple files into one data.frame

Description

Combines radial measurements made on calcified structures and saved to an R data file with digitizeRadii into a single data.frame that can then be post-processed (e.g., back-calculate length at a previous age).

Usage

combineData(
  nms,
  formatOut = c("long", "wide"),
  typeOut = c("radii", "increments"),
  deletePlusGrowth = TRUE
)

Arguments

nms

A string (or vector of strings) that indicates the R data file(s) created with digitizeRadii. If missing the user will be provided a dialog box from which to choose the file(s). The file(s) must be in the current working directory (see getwd result). May also be a single RFishBC object created with digitizeRadii.

formatOut

A string that indicates the output format for the combined data. The "wide" (DEFAULT) format has one-radius-per-line (i.e., each radial measurement for a fish in on a separate row), whereas the "long" format has one-fish-per-line (i.e., each radial measurement for a fish is in a separate column).

typeOut

A string that indicated output type for the combined data. The "radii" (DEFAULT) type will output the radial measurements, whereas the "increments" will output incremental measurements.

deletePlusGrowth

A logical that indicates whether the radial measurement that corresponds to “plus-growth” should be deleted from the returned data.frame (TRUE; DEFAULT) or not (FALSE).

Details

A detailed description of its use is in this vignette on the RFishBC website. The list of R data file names may be efficiently created with listFiles as described in that vignette. The R data file names may also be selected from a dialog box if using Windows.

Value

A data.frame that contains the radii data created with digitizeRadii for all files given in nms.

Author(s)

Derek H. Ogle, derek@derekogle.com

Examples

## See the link to the extensive documentation in the Details.


RFishBC documentation built on Aug. 29, 2023, 9:06 a.m.

Related to combineData in RFishBC...