Functions and Programming
The base installation of R has many built-in functions, including sort and order to arrange vectors or arrays in ascending or descending order; all the standard trigonometric and hyperbolic functions log(base e), log10, exp, sqrt, abs, etc.; and more sophisticated mathematical functions such as factorial, gamma, bessel, fft (Fourier transform), etc. Additional mathematical functions, the orthogonal polynomials used in mathematical physics and chemistry, are available in the contributed package orthopolynom, available through the CRAN web site. The functions uniroot (Section 3.4.1) and polyroot (Section 3.4.2) are used to solve for the zeros of general functions and polynomials, respectively. In addition to those mathematical functions, R has numerous others that are useful to scientists.We’ll discuss three of them here in this section: sorting, splines, and sampling. At the end of this chapter, we’ll introduce some of the R functions that are commonly used in numerical analysis.
KeywordsNumerical Differentiation Numerical Integration Method Titratable Group Base Installation Simultaneous Linear Equation
Unable to display preview. Download preview PDF.