This chapter explains how to use R as a scientific calculator, including its use of trigonometric functions. We’ll also plot some of the functions for illustrative purposes.
R has a series of commands that all perform quite similarly. The only real issue is to find out what actual commands get what we want. First of all, we need to know how R will work with degrees or radians.
So our experiment shows us that R is working in radians.
The functions sin(), cos(), and tan() give the sine, cosine, and tangent respectively. To find the inverse sine, sometimes called the arcsine, we use the asin() command. The hyperbolic functions associated with these functions also exist; use sinh(), cosh() and tanh() and for the inverse, just add an extra a before the command named here.