kitagawa-utilities: General utility functions

Description Usage Arguments Details Author(s) See Also Examples

Description

General utility functions

Usage

1
2
3
4
5
6
7

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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)

kitagawa documentation built on July 2, 2020, 1:47 a.m.