Element-wise psigamma function, like base::psigamma(): the deriv-th
derivative of the digamma function, i.e. the (deriv + 1)-th derivative of
the log-gamma function. For deriv = 0 this is the digamma function; for
deriv = 1, trigamma() dispatches here.
Usage
nv_psigamma(x, deriv = 0L)
# S3 method for class 'AnvlArray'
trigamma(x)Arguments
- x, deriv
(
arrayish)
The value to evaluate at and the order of the derivative.derivtypically holds non-negative whole numbers. Can be any numeric data type: the two are promoted to a common data type and that is then converted to the default float data type (seedefault_dtypes()) where it is not a float already, since a float is allprim_psigamma()takes. An R value assumes the other operand's data type within its data type category, and settles on the default float when neither has one. Scalars are broadcast to the shape of the other, sonv_psigamma(x, 1)works for any floatx.
Value
(arrayish)
Has the inputs' broadcast shape, and their common data type – or the
default float data type (see default_dtypes()) where that was an
integer one.
The trigamma() generic
trigamma(x) is nv_psigamma(x, 1L).
See also
prim_psigamma() for the underlying primitive.