# NOT RUN {
require(stats)
# }
# NOT RUN {
<!-- %% some of these have enormous output that varies a lot by version -->
# }
# NOT RUN {
apropos("lm")
# }
# NOT RUN {
apropos("GLM") # several
apropos("GLM", ignore.case = FALSE) # not one
apropos("lq")
cor <- 1:pi
find("cor") #> ".GlobalEnv" "package:stats"
find("cor", numeric = TRUE) # numbers with these names
find("cor", numeric = TRUE, mode = "function") # only the second one
rm(cor)
# }
# NOT RUN {
apropos(".", mode="list") # a long list
# }
# NOT RUN {
# need a DOUBLE backslash '\\' (in case you don't see it anymore)
apropos("\\[")
# }
# NOT RUN {
# everything % not diff-able
length(apropos("."))
# those starting with 'pr'
apropos("^pr")
# the 1-letter things
apropos("^.$")
# the 1-2-letter things
apropos("^..?$")
# the 2-to-4 letter things
apropos("^.{2,4}$")
# the 8-and-more letter things
apropos("^.{8,}$")
table(nchar(apropos("^.{8,}$")))
# }
Run the code above in your browser using DataLab