All functions

H1Example

A dataset containing test RDBES data for H1 in the RDBESDataObject structure

H5Example

A dataset containing test RDBES data for H5 in the RDBESDataObject structure

H8ExampleEE1

A dataset containing test RDBES data for H8 in the RDBESDataObject structure

MadeUpData_for_SL_SA_tests_v1

A made-up dataset for testing manipulations of SA based on SL

Pckg_SDAResources_agsrs_H1

A RDBESDataObject converted from package SDAResources dataset agsrs

Pckg_SDAResources_agstrat_H1

A RDBESDataObject converted from package SDAResources dataset agstrat

Pckg_SDAResources_algebra_H1

A RDBESDataObject converted from package SDAResources dataset algebra

Pckg_SDAResources_coots_H1

A RDBESDataObject converted from package SDAResources dataset coots

Pckg_SDAResources_coots_multistage_H1

A Multi-stage RDBESDataObject from package SDAResources dataset coots

Pckg_SDAResources_gpa_H1

A RDBESDataObject converted from package SDAResources dataset gpa

Pckg_SDAResources_schools_H1

A RDBESDataObject converted from package SDAResources dataset schools

Pckg_survey_apiclus1_v2_H1

A RDBESDataObject converted from package survey dataset apiclus1

Pckg_survey_apiclus2_H1

A Multi-Stage RDBESDataObject converted from package survey dataset apiclus2

Pckg_survey_apiclus2_v2_H1

A Clustered RDBESDataObject converted from package survey dataset apiclus2

Pckg_survey_apistrat_H1

A RDBESDataObject converted from package survey dataset apistrat

print(<RDBESDataObject>) sort(<RDBESDataObject>) summary(<RDBESDataObject>)

Print method for RDBESDataObject

applyGenerateProbs()

Generate probabilities missing from RDBES Data

check_key_column()

Check if a column exists in a data table and has unique values

combineRDBESDataObjects()

Combine Two RDBES Raw Objects combines 2 RDBESDataObjects into a single RDBESDataObject by merging individual tables one by one

createDBEPrepObj()

Load raw object and create prepared object Function relies on the data being correctly named following established hierarchy

createRDBESDataObject()

Create an RDBES Data Object

createRDBESEstObject()

Creates an rdbesEStObject from prepared RDBES data

createTableOfRDBESIds()

Create a table of RDBES Ids

designVariables

A dataset containing the RDBES "design variable" names

doDBEestimantionObjUpp()

Generates the DBE estimation object for the upper hierarchy tables

doDBestimation()

Create design-based point and variance estimates from RDBES estimation object (rdbesEstimObj)

doEstimationForAllStrata()

Estimate totals and means, and try to generate samples variances for all strata in an RDBESEstObject

estim()

Generic function for estimation of population total and variance

estimMC()

Multiple Count Estimator for Population Total and Variance

filterAndTidyRDBESDataObject()

Filter and remove orphan records in an RDBESDataObject

filterRDBESDataObject()

Filter an RDBESDataObject

findAndKillOrphans()

This function finds and removed any orphan records in an RDBESDataObject. Normally data that has been downloaded from the RDBES will not contain orphan records - however if the data is subsequently filtered it is possible to introduce orphan records.

findOrphansByTable()

Internal function to identify orphan records in a given RDBESDataObject table

fixSLids()

Fixes SLid in SL table (facilitating SS-SL joins).

generateMissingSSRows()

Generate any missing SS rows. When FOcatchReg=="All" it is expected that SScatchFraction is either "Catch" OR "Lan"+"Dis". In the latter case, if one is missing the other is to be assumed 0. This function generates SS rows for any missing catch fractions.

generateNAsUsingSL()

Generate NAs in samples using Species List information

generateProbs()

Generate vector of selection or inclusion probabilities

generateSSRows()

Private function to generate SS rows

generateTestTbls()

Generate a List of Related Data Tables

generateZerosUsingSL()

Generate zeros in samples using Species List information

getEstimForStratum()

Private function used by doEstimationForAllStrata to get the estimates

getMissingSSCatchFraction()

Private function to find which FO rows are not matching SS

getSubSampleLevel()

Private function to get sub-sample level and top-level SAid for SA data

getTablesInRDBESHierarchy()

Returns the tables for a given hierarchy

icesSpecWoRMS

A dataset containing a copy of the icesSpecWoRMS code list. The latest code list data can be downloaded from https://vocab.ices.dk/

killOrphans()

Internal function to remove orphan records from an RDBESDataObject

makeTbl()

Generate a Data Table

mapColNamesFieldR

A dataset containing the mapping from database column names to R field names

newRDBESDataObject()

Constructor for RDBESDataObject class

procRDBESEstObjLowHier()

Private function to process the lower hierarchies when creating the RDBESEstObject

procRDBESEstObjUppHier()

Private function to process the upper hierarchies when creating the RDBESEstObject

removeBrokenSpeciesListLinks()

Remove rows which are not pointing to a valid SpecliestListDetails (SL) records i.e.those rows which have a value of SpeciesListName that does not exist in the SL table.

removeBrokenVesselLinks()

Remove rows which are not pointing to a valid VesselDetails (VD) records i.e. those rows which have a value of VDid that does not exist in the VD table.

removePrefixFromVarNames()

Remove table prefix from variable names

runChecksOnSelectionAndProbs()

Run basic checks on selection methods and probabilities

setRDBESDataObjectDataTypes()

For a given RDBESDataObject convert the required columns to the correct data types. (This function can cause an error if we have data in the columns that can't be cast to the desired data type.)

shrimps

One quarter of sample data from swedish shrimp landings of the SWE_OTB_CRU_32-69_0_0 fishery

shrimpsStrat

One quarter of sample data from swedish shrimp catches of the SWE_OTB_CRU_32-69_0_0 fishery

tablesInRDBESHierarchies

The tables required for each RDBES hierarchy.

validateRDBESDataObject() checkRDBESDataObject()

Check Whether an RDBESDataObject is in a Valid Format

validateRDBESDataObjectDataTypes()

Checks the data types of the columns in an RDBESDataObject against an expected list of data types. Any differences are returned

validateRDBESDataObjectDuplicates()

check RDBES Raw Object Content Private function to do some basic checks on the content of the RDBESDataObject (e.g. all required field names are present). Function is only used by checkRDBESDataObject and should only be passed a list of non-null objects

validateRDBESDataObjectFieldNames()

check RDBES Data Object field names Private function to do some checks on the columns of an RDBESDataObject -

  1. are all required fields present? 2) are there any extra fields present? It is used by validateRDBESDataObject() and should only be passed a list of non-null objects

validateRDBESEstObject()

Check whether an object is a valid RDBESEstObject

wormsAphiaRecord

A dataset containing aphia records for species found in icesSpecWoRMS