The R Project SVN R

Rev

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

Rev 59039 Rev 61150
Line 51... Line 51...
51
  \emph{Programming with Data}.
51
  \emph{Programming with Data}.
52
  Springer.\cr
52
  Springer.\cr
53
  (\code{rapply} is only described briefly there.)
53
  (\code{rapply} is only described briefly there.)
54
}
54
}
55
\examples{
55
\examples{
56
X <- list(list(a=pi, b=list(c=1:1)), d="a test")
56
X <- list(list(a = pi, b = list(c = 1:1)), d = "a test")
57
rapply(X, function(x) x, how="replace")
57
rapply(X, function(x) x, how = "replace")
58
rapply(X, sqrt, classes="numeric", how="replace")
58
rapply(X, sqrt, classes = "numeric", how = "replace")
59
rapply(X, nchar, classes="character",
59
rapply(X, nchar, classes = "character",
60
       deflt = as.integer(NA), how="list")
60
       deflt = as.integer(NA), how = "list")
61
rapply(X, nchar, classes="character",
61
rapply(X, nchar, classes = "character",
62
       deflt = as.integer(NA), how="unlist")
62
       deflt = as.integer(NA), how = "unlist")
63
rapply(X, nchar, classes="character", how="unlist")
63
rapply(X, nchar, classes = "character", how = "unlist")
64
rapply(X, log, classes="numeric", how="replace", base=2)
64
rapply(X, log, classes = "numeric", how = "replace", base = 2)
65
}
65
}
66
\keyword{iteration}
66
\keyword{iteration}
67
\keyword{list}
67
\keyword{list}