How to get Euler–Mascheroni's constant in R?
r
Solution
Mathmatically we can write the constant of interest as the negative of the derivative of the gamma function evaluated at 1. R has the derivative of the gamma function as `digamma` so it's just a matter of plugging this in.
-digamma(1)
#[1] 0.5772157
Problem
Is Euler–Mascheroni's constant $\gamma \approx 0.577$ available in R, similarly to $\pi$ with `pi` or $e$ with `exp(1)`?