The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8193 ripley 1
\name{abs}
2 r 2
\title{Miscellaneous Mathematical Functions}
3
\usage{
4
abs(x)
5
sqrt(x)
6
}
7
\alias{abs}
8
\alias{sqrt}
9
\description{
10
These functions compute miscellaneous mathematical functions.
11
The naming follows the standard for computer languages
12
such as C or Fortran.
13
}
15518 ripley 14
\arguments{
15
  \item{x}{a numeric vector}
16
}
27273 ripley 17
\details{
18
  These are generic functions: methods can be defined for them
19
  individually or via the \code{\link{Math}} group generic.
20
}
2 r 21
\seealso{
838 maechler 22
\code{\link{Arithmetic}} for simple, \code{\link{log}} for logarithmic,
23
\code{\link{sin}} for trigonometric, and \code{\link{Special}} for
24
special mathematical functions.
2 r 25
}
24300 ripley 26
\references{
27
  Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
28
  \emph{The New S Language}.
29
  Wadsworth \& Brooks/Cole.
30
}
2 r 31
\examples{
27712 ripley 32
require(stats) # for spline
2 r 33
xx <- -9:9
34
plot(xx, sqrt(abs(xx)),  col = "red")
27712 ripley 35
lines(spline(xx, sqrt(abs(xx)), n=101), col = "pink")
2 r 36
}
286 maechler 37
\keyword{math}