~showard314/ubuntu/karmic/r-base/remove_start_comments

« back to all changes in this revision

Viewing changes to src/library/base/man/Math.Rd

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2009-04-17 06:56:48 UTC
  • mfrom: (1.3.1 upstream) (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090417065648-9mgm2udb2eanluot
* New upstream version released this morning

* debian/rules: Turn optimisation back to -O3 on alpha (as elsewhere) 
  with thanks to Kurt Roeckx for applying a fix to gcc

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
5
 
 
6
 
\name{MathFun}
7
 
\title{Miscellaneous Mathematical Functions}
8
 
\usage{
9
 
abs(x)
10
 
sqrt(x)
11
 
}
12
 
\alias{abs}
13
 
\alias{sqrt}
14
 
\description{
15
 
  These functions compute miscellaneous mathematical functions.
16
 
  The naming follows the standard for computer languages
17
 
  such as C or Fortran.
18
 
}
19
 
\arguments{
20
 
  \item{x}{a numeric or \code{\link{complex}} vector or array.}
21
 
}
22
 
\details{
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}.
27
 
 
28
 
  \code{abs(x)} returns an \code{\link{integer}} vector when \code{x} is
29
 
  \code{integer} or \code{\link{logical}}.
30
 
}
31
 
\section{S4 methods}{
32
 
  Both are S4 generic and members of the
33
 
  \code{\link[methods:S4groupGeneric]{Math}} group generic.
34
 
}
35
 
\seealso{
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.
39
 
 
40
 
  \sQuote{\link{plotmath}} for the use of \code{sqrt} in plot annotation.
41
 
}
42
 
\references{
43
 
  Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
44
 
  \emph{The New S Language}.
45
 
  Wadsworth \& Brooks/Cole.
46
 
}
47
 
\examples{
48
 
require(stats) # for spline
49
 
require(graphics)
50
 
xx <- -9:9
51
 
plot(xx, sqrt(abs(xx)),  col = "red")
52
 
lines(spline(xx, sqrt(abs(xx)), n=101), col = "pink")
53
 
}
54
 
\keyword{math}