rvar_is_finite {posterior} | R Documentation |
Special value predicates for random variables
Description
Compute special value predicates (checking for finite / infinite values, NaN
, and NA
)
on all draws within a random variable, returning a random variable.
Usage
rvar_is_finite(x)
rvar_is_infinite(x)
rvar_is_nan(x)
rvar_is_na(x)
Arguments
x |
(rvar) An |
Details
These functions return a new rvar
that is the result of applying
is.finite()
, is.infinite()
, is.nan()
, or is.na()
to every draw
in the input random variable.
Value
A logical rvar
of the same length as the input.
See Also
rvar-summaries-over-draws for summary functions across draws, including
implementations of is.finite()
, is.infinite()
, is.nan()
, and is.na()
for
rvar
s.
Other rvar-summaries:
rvar-summaries-over-draws
,
rvar-summaries-within-draws
Examples
x <- rvar(c(1, Inf, -Inf, NaN, NA))
x
rvar_is_finite(x)
rvar_is_infinite(x)
rvar_is_nan(x)
rvar_is_na(x)
[Package posterior version 1.6.0 Index]