area package:MASS R Documentation _A_d_a_p_t_i_v_e _N_u_m_e_r_i_c_a_l _I_n_t_e_g_r_a_t_i_o_n _D_e_s_c_r_i_p_t_i_o_n: Integrate a function of one variable over a finite range using a recursive adaptive method. This function is mainly for demonstration purposes. _U_s_a_g_e: area(f, a, b, ..., fa = f(a, ...), fb = f(b, ...), limit = 10, eps = 1e-05) _A_r_g_u_m_e_n_t_s: f: The integrand as an 'S' function object. The variable of integration must be the first argument. a: Lower limit of integration. b: Upper limit of integration. ...: Additional arguments needed by the integrand. fa: Function value at the lower limit. fb: Function value at the upper limit. limit: Limit on the depth to which recursion is allowed to go. eps: Error tolerance to control the process. _D_e_t_a_i_l_s: The method divides the interval in two and compares the values given by Simpson's rule and the trapezium rule. If these are within eps of each other the Simpson's rule result is given, otherwise the process is applied separately to each half of the interval and the results added together. _V_a_l_u_e: The integral from 'a' to 'b' of 'f(x)'. _R_e_f_e_r_e_n_c_e_s: Venables, W. N. and Ripley, B. D. (1994) _Modern Applied Statistics with S-Plus._ Springer. pp. 105-110. _E_x_a_m_p_l_e_s: area(sin, 0, pi) # integrate the sin function from 0 to pi.