Pi in R: Built-in Constants

Pi in R Tutorial

Pi is a built-in R constant with a value of approximately 3.141593. It is the ratio of the circumference of a circle to its diameter. Syntax pi Basic usage print(pi) # [1] 3.141593 Exponential value of pi To calculate the exponential value of pi, use the exp() function. exp(pi) # [1] 23.14069 Cos To calculate … Read more