read_ref: Read and Validate Habitat References Files

View source: R/io.R

read_refR Documentation

Read and Validate Habitat References Files

Description

This function reads and checks files with reference values

Usage

read_ref(filename, indicators = c("S", "H", "AMBI"))

validate_ref(.data, indicators = c("S", "H", "AMBI"))

Arguments

filename

name of the habitat reference file (character)

indicators

indicators to be processed (character, see details)

.data

table in REF-format

Details

The function performs the following tasks:

  • checks the existence of filename;

  • checks availablitity of required columns (case insensitive);

  • removes redundant spaces

  • removes duplicated records

Argument indicators is a character vector of additional benthic indicators to be checked for. For example, if indicators = "ITI", then the habitat reference file should also contain columns ITIREF and ITIBAD. Implemented indicators are N, LNN, S, D, SN, SNA, H, L, AMBI, ITI, PIE, N2 (see package vignette).

The format of the habitat reference file is documented in the BEQI2-package vignette.

Functions

  • validate_ref(): validator for REF-format

References

Van Loon, W, 2013. Loon2013-BEQI2-Specs-Ecotopes-27nov.doc


benthos documentation built on Aug. 22, 2022, 5:07 p.m.