flag_salinity: Identify and flag invalid ("anomalous") data based on...

Description Usage Arguments Value

View source: R/flag_salinity.R

Description

Calculates the salinity error based on the innate loggger conductivity and temperature error margins. Determines if dataset's error margins fall within an acceptable range. Data is "anomylous" if data +C+T error is below the freezing line.

Usage

1
2
3
flag_salinity(data, tempcol = "temperature", condcol = "conductivity",
  Terror, Cerror, flag_colname = "anomalous", flag_scheme = c("valid",
  "invalid"))

Arguments

data

(data.frame) Data to be flagged.

tempcol

(character) Name of column for temperature. Defaults to "temperature".

condcol

(character) Name of column for conductivity. Defaults to "conductivity".

Terror

(numeric) Precision for temperature.

Cerror

(numeric) Precision for conductivity.

flag_colname

(character) Column name to give the new flag column, defaults to "anomalous".

flag_scheme

(character) Scheme for flagging anomalous salinity values. Supply a vector of character flags to denote good/bad data respectively, e.g. c("valid", "invalid"). The first two will be used. IF NULL function will output a logical TRUE/FALSE column.

Value

(data.frame) The input dataframe with a new column added, named by the flag_colname argument, defaults to "anomalous" (character or logical) indicating anomalous values.


BLE-LTER/insitu documentation built on Feb. 5, 2021, 5:28 p.m.