Computes \(\psi^{(n)}(x)\) where \(n\) is the derivative order. The derivative of \(\psi^{(n)}(x)\) is \(\psi^{(n+1)}(x)\).
psigamma(x, deriv = 0L)
# S4 method for class 'numeric'
psigamma(x, deriv = 0L)
# S4 method for class 'dualr'
psigamma(x, deriv = 0L)The polygamma function value.
psigamma(1, deriv = 0) # digamma(1)
#> [1] -0.5772157
x <- dual_variable(2)
value(psigamma(x, deriv = 1)) # trigamma(2)
#> [1] 0.6449341