Learn R Programming

⚠️There's a newer version (1.2.1) of this package.Take me there.

RstoxData

Introduction

RstoxData is a package to parse and manipulate various data formats for fisheries.

The package contains functions for reading, filtering and writing fisheries' trawl survey samples (biotic), acoustic trawl survey and commercial catch samples (landings) data in XML formats.

Loaded data can also be filtered by using any supported R conditional syntax such as longitude > 10, or by user pre-defined functions such as inside().

Supported formats:

A. Norwegian Institute of Marine Research (IMR) (data definitions):

  1. Biotic (fish trawl survey) XML format (up to version 3.1).
  2. Acoustic (acoustic/echosounder trawl surveys) XML format (version 1).
  3. Landings (commercial catch samples) XML format (version 2).

B. Norwegian Directorate of Fisheries:

  1. Sales Notes data in the LSS format.
  2. Electronic logbooks (ERS) in tabular format.

C. International Council for the Exploration of the Sea (ICES) (data definitions):

  1. Biotic (fish trawl survey) XML format.
  2. Acoustic (acoustic/echosounder trawl surveys) XML format.

Installation

  1. Install from CRAN:

    install.packages("RstoxData")
  2. Install the latest release from our local repository:

    install.packages("RstoxData", repos = c("https://stoxproject.github.io/repo/", "https://cloud.r-project.org/"))
  3. Install the latest version from GitHub:

    devtools::install_github("https://github.com/StoXProject/RstoxData")

On computers that return errors when trying to run the Rtools through RStudio (most institutional Windows machines), install the binary directly from https://github.com/StoXProject/RstoxData/releases. Download the newest RstoxData zip file, click the Packages tab -> Install -> Install from: Package Archive File -> Install. If the installer does not complain, the package is installed correctly.

License

LGPL-3 © Norwegian Institute of Marine research (IMR) (homepage).

The development of RstoxData package is mainly supported by IMR's REDUS and SEA2DATA projects.

RstoxData is part of the bigger StoX ecosystem.


For historical release notes, see: https://github.com/StoXProject/RstoxData/blob/master/NEWS.md

Copy Link

Version

Install

install.packages('RstoxData')

Monthly Downloads

66

Version

1.2.0

License

LGPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Ibrahim Umar

Last Published

June 24th, 2021

Functions in RstoxData (1.2.0)

DefineTranslation

Define translation
DataTypes

StoX data types of the RstoxData package
AddToStoxBiotic

Add variables to StoxBioticData from BioticData
ConvertAcoustic

Convert AcousticData
ConvertBiotic

Convert BioticData
AcousticData

StoX data type AcousticData
FilterAcoustic

Filter (raw) Acoustic data
BioticData

StoX data type BioticData
ConvertStoxBiotic

Convert StoxBioticData
ICESAcousticData

StoX data type ICESAcousticData
ICESDatrasData

StoX data type ICESDatrasData
FilterStoxAcoustic

Filter StoxAcoustic data
FilterBiotic

Filter (raw) Biotic data
ReadAcoustic

Read acoustic XML files
ReadBiotic

Read biotic XML files
ConvertStoxAcoustic

Convert StoxAcousticData
FilterLanding

Filter LandingData
RstoxData

Tools to Read and Manipulate Fisheries Data
StoxAcoustic

Convert AcousticData to StoxAcousticData
ICESBioticData

StoX data type ICESBioticData
ICESDatras

Convert BioticData to ICESDatras format
MergeStoxBiotic

Merge StoxBioticData
TranslateStoxBiotic

Translate StoxBioticData
TranslateStoxLanding

Translate StoxLandingData
MergeStoxBioticData

StoX data type MergeStoxBioticData
ReadLanding

Read landing XML files
LandingData

LandingData
RedefineStoxBiotic

Redefine StoxBioticData variables by data from BioticData
TranslateLanding

Translate LandingData
mergeByIntersect

Merge two data tables by the intersect of the names
filterData

Run filter on any StoX related data source
generalSamplingHierarhcy

General sampling hierarchy of StoX
FilterStoxBiotic

Filter StoxBiotic data
TranslateStoxAcoustic

Translate StoxAcousticData
MergeStoxAcoustic

Merge StoxAcousticData
parseInterCatch

Parses InterCatch
mergeDataTables

Merge list of data tables recursively
processPropertyFormats

Define the process property formats:
ICESBiotic

Convert BioticData to ICESBiotic format
StoxLanding

Convert landing data
TranslateAcoustic

Translate AcousticData
StoxLandingData

StoxLandingData
StoxAcousticData

StoX data type StoxAcousticData
MergeStoxAcousticData

StoX data type MergeStoxAcousticData
StoxBiotic

Convert BioticData to StoxBioticData
readErsFile

Parses logbooks (ERS)
TranslateICESAcoustic

Translate ICESAcousticData
mergeByStoxKeys

Merge two data tables by StoX keys
xsdObjects

xsdObjects
TranslateICESBiotic

Translate ICESBioticData
TranslateBiotic

Translate BioticData
FilterStoxLanding

Filter StoxLanding data
ICESAcoustic

Convert AcousticData to ICESAcousticData.
Translation

Translation definition (from file or from table).
ModelData

StoX data types of the RstoxData package
StoxBioticData

StoX data type StoxBioticData
StoxBioticFormat

StoxBiotic data format.
ProcessData

Process data used in estimation models in StoX
WriteICESBioticData

Rbind ICESBioticData to a string matrix.
lapplyOnCores

Run a function on all elements of x on one or more cores
WriteICESDatras

Writes ICESDatrasData to a csv file for each input acoustic file used to create the ICESDatras
general_arguments

General parameters of RstoxData.
WriteICESDatrasData

Rbind ICESDatrasData to a string matrix.
getRstoxDataDefinitions

Get RstoxData definitions
getStoxKeys

Get the keys of a StoX format
WriteICESAcoustic

Writes ICESAcousticData to a csv file for each input acoustic file used to create the ICESAcousticData
backwardCompatibility

Backward compabitibility actions:
WriteICESAcousticData

Rbind ICESAcousticData to a string matrix.
WriteICESBiotic

Writes ICESBioticData to a csv file for each input acoustic file used to create the ICESBioticData
mapplyOnCores

Run a function on all elements of x on one or more cores
getNumberOfCores

Pick a suitable number of cores
stoxBioticObject

stoxBioticObject
is.LandingData

Check if argument is LandingData
setorderv_numeric

Order a data.table (by reference) by interpreting characters as numeric if possible
setRstoxPrecisionLevel

Round off to number of digits
is.StoxLandingData

Check if argument is StoxLandingData
stoxFunctionAttributes

Function specification for inclusion in StoX projects
readXmlFile

Read fisheries XML data format file
readLssFile

Parses landings (sales notes)