1
% File src/library/base/man/Math.Rd
2
% Part of the R package, http://www.R-project.org
3
% Copyright 1995-2007 R Core Development Team
4
% Distributed under GPL 2 or later
7
\title{Miscellaneous Mathematical Functions}
15
These functions compute miscellaneous mathematical functions.
16
The naming follows the standard for computer languages
20
\item{x}{a numeric or \code{\link{complex}} vector or array.}
23
These are generic functions: methods can be defined for them
24
individually or via the \code{\link[base:groupGeneric]{Math}}
25
group generic. For complex arguments (and the default method), \code{z},
26
\code{abs(z) == \link{Mod}(z)} and \code{sqrt(z) == z^0.5}.
28
\code{abs(x)} returns an \code{\link{integer}} vector when \code{x} is
29
\code{integer} or \code{\link{logical}}.
32
Both are S4 generic and members of the
33
\code{\link[methods:S4groupGeneric]{Math}} group generic.
36
\code{\link{Arithmetic}} for simple, \code{\link{log}} for logarithmic,
37
\code{\link{sin}} for trigonometric, and \code{\link{Special}} for
38
special mathematical functions.
40
\sQuote{\link{plotmath}} for the use of \code{sqrt} in plot annotation.
43
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
44
\emph{The New S Language}.
45
Wadsworth \& Brooks/Cole.
48
require(stats) # for spline
51
plot(xx, sqrt(abs(xx)), col = "red")
52
lines(spline(xx, sqrt(abs(xx)), n=101), col = "pink")