Read and process a NMD Biotic xml file for further use in the BioticExplorer
Source:R/processBiotic_functions.R
processBioticFile.RdA 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
coreDataListfor list of core columns for each data type.- returnOriginal
logical indicating whether the original data (
$missionthrough$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
TRUEspeeds 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 toFALSEconsiderably speeds up the function, but leads to problems with non-unicode characters.- missionidPrefix
A prefix for the
missionididentifier, which separates cruises. Used inprocessBioticFilesfunction when several xml files are put together.NULL(default) omits the prefix. Not needed inprocessBioticFilefunction.
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()