Learn R Programming

kitagawa (version 3.1.2)

kitagawa-utilities: 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, ...)

Author

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

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.

See Also

kitagawa-package

Examples

Run this code
if (FALSE) {
.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
}

Run the code above in your browser using DataLab