check_input: Check input data

Description Usage Arguments Value Examples

View source: R/check_input.R

Description

Check that the input data is usable as a CTD cast (not fully missing and of compatible length). Used by other functions.

Usage

1

Arguments

x

vector of the variable of interest.

depth

vector of depths at which x is measured.

Value

TRUE when the data is ok, FALSE when it is fully missing, FALSE and throws an error when depth is not the same length as x.

Examples

1
2
3
4
5
castr:::check_input(c(22.1, 23.4, 23.2), c(1, 2, 3))
castr:::check_input(c(NA, NA, NA), c(1, 2, 3))
## Not run: 
castr:::check_input(c(22.1, 23.4, 23.2), c(1, 2))
## End(Not run)

jiho/castr documentation built on April 5, 2020, 2:12 p.m.