Skip to contents

A wrapper for readXmlFile to enable further use in the BioticExplorer

Usage

processBioticFile(
  file,
  lengthUnit = "cm",
  weightUnit = "g",
  removeEmpty = TRUE,
  coreDataOnly = FALSE,
  returnOriginal = TRUE,
  dataTable = TRUE,
  convertColumns = FALSE,
  missionidPrefix = NULL
)

Arguments

file

character string specifying the file path to the xml file. Accepts only one file at the time.

lengthUnit

character string specifying the unit for length output. Alternatives: "mm", "cm" or "m".

weightUnit

character string specifying the unit for weight output. Alternatives: "g" or "kg".

removeEmpty

logical indicating whether empty columns should be removed from the output. This option also influences "coreData" columns.

coreDataOnly

logical indicating whether only important core columns should be picked from data. See coreDataList for list of core columns for each data type.

returnOriginal

logical indicating whether the original data ($mission through $agedetermination) should be returned together with combined data.

dataTable

logical indicating whether the output should be returned as data.tables instead of data.frames. Setting this to TRUE speeds up further calculations using the data (but requires the data.table syntax).

convertColumns

logical indicating whether the column types should be converted. See link{convertColumnTypes}. Setting this to FALSE considerably speeds up the function, but leads to problems with non-unicode characters.

missionidPrefix

A prefix for the missionid identifier, which separates cruises. Used in processBioticFiles function when several xml files are put together. NULL (default) omits the prefix. Not needed in processBioticFile function.

Value

Returns a list of Biotic data with $mission, $fishstation, $catchsample, $individual and $agedetermination data frames. The $stnall and $indall data frames are merged from $fishstation and $catchsample (former) and $fishstation, $catchsample, $individual and $agedetermination (latter).

See also

Other Biotic functions: print.bioticProcData(), processBioticFiles()

Author

Mikko Vihtakari (Institute of Marine Research)