kitagawa-utilities: General utility functions

kitagawa-utilitiesR Documentation

General utility functions

Description

General utility functions

Usage

.nullchk(X)

.in0to1(X)

is.wrsp(X)

is.owrsp(X)

Arguments

X

something to be checked (vector, scalar, wrsp object, ...)

Details

.nullchk quickly checks for NULL and NA, and raises an error if TRUE; This function is not likely to be needed by the user.

.in0to1 checks if values are numeric and in [0,1] (inclusive).

is.wrsp and is.owrsp report whether an object has S3 class 'wrsp' or 'owrsp', respectively. Such an object would be returned by, for example, well_response.

Author(s)

A. J. Barbour <andy.barbour@gmail.com>

See Also

kitagawa-package

Examples

## Not run: 
.nullchk(1:10) # OK
.nullchk(NULL) # error
.nullchk(c(1:10,NULL)) # error
.nullchk(NA) # error
.nullchk(c(1:10,NA)) # error

.in0to1(1:10) # error
.in0to1(NULL) # error
.in0to1(c(1:10,NULL)) # error
.in0to1(NA) # error
.in0to1(c(1:10,NA)) # error
.in0to1(c(1,NA)) # error

is.wrsp(1) # FALSE

## End(Not run)

abarbour/kitagawa documentation built on Feb. 1, 2024, 2:49 p.m.