The R Project SVN R

Rev

Rev 5188 | Rev 39508 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5188 Rev 25118
Line 1... Line 1...
1
\name{Primitive}
1
\name{Primitive}
2
\title{Call a ``Primitive'' Internal Function}
-
 
3
\usage{
-
 
4
.Primitive(name)
-
 
5
}
-
 
6
\alias{.Primitive}
2
\alias{.Primitive}
7
\arguments{
-
 
8
\item{name}{name of the \R function.}
3
\title{Call a ``Primitive'' Internal Function}
9
}
-
 
10
\description{
4
\description{
11
  \code{.Primitive} returns an entry point to a ``primitive''
5
  \code{.Primitive} returns an entry point to a \dQuote{primitive}
12
  (internally implemented) function.
6
  (internally implemented) function.
13
 
7
 
14
  The advantage of \code{.Primitive} over \code{\link{.Internal}}
8
  The advantage of \code{.Primitive} over \code{\link{.Internal}}
15
  functions is the potential efficiency of argument passing.
9
  functions is the potential efficiency of argument passing.
16
}
10
}
-
 
11
\usage{
-
 
12
.Primitive(name)
-
 
13
}
-
 
14
\arguments{
-
 
15
  \item{name}{name of the \R function.}
-
 
16
}
17
\seealso{
17
\seealso{
18
\code{\link{.Internal}}.
18
  \code{\link{.Internal}}.
19
}
19
}
20
\examples{
20
\examples{
21
mysqrt <- .Primitive("sqrt")
21
mysqrt <- .Primitive("sqrt")
22
c
22
c
23
.Internal # this one *must* be primitive!
23
.Internal # this one *must* be primitive!
24
get("if") # just `if' or `print(if)' are not syntactically ok.
24
get("if") # just 'if' or 'print(if)' are not syntactically ok.
25
}
25
}
26
\keyword{interface}
26
\keyword{interface}