The R Project SVN R

Rev

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

Rev 73028 Rev 76382
Line 1... Line 1...
1
% File src/library/base/man/mode.Rd
1
% File src/library/base/man/mode.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2007 R Core Team
3
% Copyright 1995-2019 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{mode}
6
\name{mode}
7
\alias{mode}
7
\alias{mode}
8
\alias{mode<-}
8
\alias{mode<-}
Line 81... Line 81...
81
 
81
 
82
cex3 <- c("NULL", "1", "1:1", "1i", "list(1)", "data.frame(x = 1)",
82
cex3 <- c("NULL", "1", "1:1", "1i", "list(1)", "data.frame(x = 1)",
83
  "pairlist(pi)", "c", "lm", "formals(lm)[[1]]",  "formals(lm)[[2]]",
83
  "pairlist(pi)", "c", "lm", "formals(lm)[[1]]",  "formals(lm)[[2]]",
84
  "y ~ x","expression((1))[[1]]", "(y ~ x)[[1]]",
84
  "y ~ x","expression((1))[[1]]", "(y ~ x)[[1]]",
85
  "expression(x <- pi)[[1]][[1]]")
85
  "expression(x <- pi)[[1]][[1]]")
86
lex3 <- sapply(cex3, function(x) eval(parse(text = x)))
86
lex3 <- sapply(cex3, function(x) eval(str2lang(x)))
87
mex3 <- t(sapply(lex3,
87
mex3 <- t(sapply(lex3,
88
                 function(x) c(typeof(x), storage.mode(x), mode(x))))
88
                 function(x) c(typeof(x), storage.mode(x), mode(x))))
89
dimnames(mex3) <- list(cex3, c("typeof(.)","storage.mode(.)","mode(.)"))
89
dimnames(mex3) <- list(cex3, c("typeof(.)","storage.mode(.)","mode(.)"))
90
mex3
90
mex3
91
 
91