The R Project SVN R

Rev

Rev 23645 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23645 Rev 30945
Line 1... Line 1...
1
 
1
 
2
R : Copyright 2003, The R Development Core Team
2
R : Copyright 2004, The R Foundation for Statistical Computing
3
Version 1.7.0 Under development (unstable) (2003-03-14)
3
Version 2.0.0 Under development (unstable) (2004-08-30), ISBN 3-900051-00-3
4
 
4
 
5
R is free software and comes with ABSOLUTELY NO WARRANTY.
5
R is free software and comes with ABSOLUTELY NO WARRANTY.
6
You are welcome to redistribute it under certain conditions.
6
You are welcome to redistribute it under certain conditions.
7
Type `license()' or `licence()' for distribution details.
7
Type 'license()' or 'licence()' for distribution details.
8
 
8
 
9
R is a collaborative project with many contributors.
9
R is a collaborative project with many contributors.
10
Type `contributors()' for more information.
10
Type 'contributors()' for more information and
-
 
11
'citation()' on how to cite R in publications.
11
 
12
 
12
Type `demo()' for some demos, `help()' for on-line help, or
13
Type 'demo()' for some demos, 'help()' for on-line help, or
13
`help.start()' for a HTML browser interface to help.
14
'help.start()' for a HTML browser interface to help.
14
Type `q()' to quit R.
15
Type 'q()' to quit R.
15
 
16
 
16
> #### Which functions in R  are	.Primitive()  / which should be ?
17
> #### Which functions in R  are	.Primitive()  / which should be ?
17
> #### ------------------------------------------------------------
18
> #### ------------------------------------------------------------
18
> #### M.Maechler, May, 1998.
19
> #### M.Maechler, May, 1998.
19
> ####
20
> ####
20
> #### text was in ../doc/manual/primitive-funs.tex , now
21
> #### text was in ../doc/manual/primitive-funs.tex , now
21
> #### ==> ../doc/manual/R-exts.texi "@appendix R (internal) ...
22
> #### ==> ../doc/manual/R-exts.texi "@appendix R (internal) ...
22
> ####	 ~~~~~~~~~~~~~~~~~~~~~~~~~
23
> ####	 ~~~~~~~~~~~~~~~~~~~~~~~~~
23
> 
24
> 
24
> bpos <- match("package:base",search())
25
> bpos <- match("package:base",search())
25
> nn <- ls(pos=bpos)
26
> nn <- ls(pos=bpos, all = TRUE)
26
> length(nn) # 844 [R 0.62.0, March 25, 1998;  1067 R 0.64.0 March 1999]
27
> length(nn) # 844 [R 0.62.0, March 25, 1998;  1067 R 0.64.0 March 1999]
27
[1] 1636
28
[1] 1063
28
> 
29
> 
29
> is.primitive <- function (obj) is.function(obj) && is.null(args(obj))
30
> is.primitive <- function (obj) is.function(obj) && is.null(args(obj))
30
> is.special <- function(obj) typeof(obj) == "special"
31
> is.special <- function(obj) typeof(obj) == "special"
31
> 
32
> 
32
> Primf <- nn[sapply(nn, function(N) is.primitive(get(N, pos=bpos)))]
33
> Primf <- nn[sapply(nn, function(N) is.primitive(get(N, pos=bpos)))]