MathFun package:base R Documentation _M_i_s_c_e_l_l_a_n_e_o_u_s _M_a_t_h_e_m_a_t_i_c_a_l _F_u_n_c_t_i_o_n_s _D_e_s_c_r_i_p_t_i_o_n: These functions compute miscellaneous mathematical functions. The naming follows the standard for computer languages such as C or Fortran. _U_s_a_g_e: abs(x) sqrt(x) _A_r_g_u_m_e_n_t_s: x: a numeric or 'complex' vector or array. _D_e_t_a_i_l_s: These are generic functions: methods can be defined for them individually or via the 'Math' group generic. For complex arguments (and the default method), 'z', 'abs(z) == Mod(z)' and 'sqrt(z) == z^0.5'. 'abs(x)' returns an 'integer' vector when 'x' is 'integer' or 'logical'. _S_4 _m_e_t_h_o_d_s: Both are S4 generic and members of the 'Math' group generic. _R_e_f_e_r_e_n_c_e_s: Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S Language_. Wadsworth & Brooks/Cole. _S_e_e _A_l_s_o: 'Arithmetic' for simple, 'log' for logarithmic, 'sin' for trigonometric, and 'Special' for special mathematical functions. 'plotmath' for the use of 'sqrt' in plot annotation. _E_x_a_m_p_l_e_s: require(stats) # for spline require(graphics) xx <- -9:9 plot(xx, sqrt(abs(xx)), col = "red") lines(spline(xx, sqrt(abs(xx)), n=101), col = "pink")