Learn R Programming

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.1

License

LGPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Ibrahim Umar

Last Published

July 17th, 2021

Functions in RstoxData (1.2.1)

DataTypes

StoX data types of the RstoxData package
AcousticData

StoX data type AcousticData
ConvertBiotic

Convert BioticData
ConvertAcoustic

Convert AcousticData
ConvertStoxAcoustic

Convert StoxAcousticData
BioticData

StoX data type BioticData
DefineTranslation

Define translation
ConvertStoxBiotic

Convert StoxBioticData
AddToStoxBiotic

Add variables to StoxBioticData from BioticData
FilterStoxAcoustic

Filter StoxAcoustic data
FilterStoxBiotic

Filter StoxBiotic data
LandingData

LandingData
ICESDatrasData

StoX data type ICESDatrasData
StoxBioticData

StoX data type StoxBioticData
StoxBioticFormat

StoxBiotic data format.
ReadBiotic

Read biotic XML files
StoxBiotic

Convert BioticData to StoxBioticData
StoxAcousticData

StoX data type StoxAcousticData
ReadAcoustic

Read acoustic XML files
ICESBioticData

StoX data type ICESBioticData
ICESDatras

Convert BioticData to ICESDatras format
MergeStoxBioticData

StoX data type MergeStoxBioticData
MergeStoxBiotic

Merge StoxBioticData
FilterStoxLanding

Filter StoxLanding data
ICESAcoustic

Convert AcousticData to ICESAcousticData.
TranslateAcoustic

Translate AcousticData
ICESBiotic

Convert BioticData to ICESBiotic format
ICESAcousticData

StoX data type ICESAcousticData
general_arguments

General parameters of RstoxData.
MergeStoxAcousticData

StoX data type MergeStoxAcousticData
MergeStoxAcoustic

Merge StoxAcousticData
RedefineStoxBiotic

Redefine StoxBioticData variables by data from BioticData
ReadLanding

Read landing XML files
TranslateICESAcoustic

Translate ICESAcousticData
mergeDataTables

Merge list of data tables recursively
getNumberOfCores

Pick a suitable number of cores
FilterAcoustic

Filter (raw) Acoustic data
WriteICESBioticData

Rbind ICESBioticData to a string matrix.
TranslateBiotic

Translate BioticData
FilterBiotic

Filter (raw) Biotic data
ModelData

StoX data types of the RstoxData package
StoxLanding

Convert landing data
FilterLanding

Filter LandingData
ProcessData

Process data used in estimation models in StoX
parseInterCatch

Parses InterCatch
TranslateStoxAcoustic

Translate StoxAcousticData
TranslateLanding

Translate LandingData
stoxFunctionAttributes

Function specification for inclusion in StoX projects
TranslateICESBiotic

Translate ICESBioticData
stoxBioticObject

stoxBioticObject
WriteICESAcousticData

Rbind ICESAcousticData to a string matrix.
readErsFile

Parses logbooks (ERS)
processPropertyFormats

Define the process property formats:
WriteICESAcoustic

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

StoxLandingData
Translation

Translation definition (from file or from table).
WriteICESDatrasData

Rbind ICESDatrasData to a string matrix.
is.LandingData

Check if argument is LandingData
is.StoxLandingData

Check if argument is StoxLandingData
WriteICESDatras

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

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

Get RstoxData definitions
getStoxKeys

Get the keys of a StoX format
readLssFile

Parses landings (sales notes)
lapplyOnCores

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

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

Backward compabitibility actions:
xsdObjects

xsdObjects
setRstoxPrecisionLevel

Round off to number of digits
setorderv_numeric

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

Read fisheries XML data format file
RstoxData

Tools to Read and Manipulate Fisheries Data
filterData

Run filter on any StoX related data source
StoxAcoustic

Convert AcousticData to StoxAcousticData
TranslateStoxBiotic

Translate StoxBioticData
generalSamplingHierarhcy

General sampling hierarchy of StoX
mergeByIntersect

Merge two data tables by the intersect of the names
TranslateStoxLanding

Translate StoxLandingData
mergeByStoxKeys

Merge two data tables by StoX keys