kitagawa-utilities | R Documentation |
General utility functions
.nullchk(X)
.in0to1(X)
is.wrsp(X)
is.owrsp(X)
X |
something to be checked (vector, scalar, wrsp object, ...) |
.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
.
A. J. Barbour <andy.barbour@gmail.com>
kitagawa-package
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.