ggplot2ヘルプ ファイル (または、少なくともggplot2によってエクスポートされた関数の 1 つを参照する、と入力して表示できるヘルプ ファイル) で言及されているすべての..*..
オプションを次に示します。?"<func>"
"<func>"
library(ggplot2)
## Read all of the ggplot2 help files and convert them to character vectors
ex <- unlist(lapply(ls("package:ggplot2"), function(g) {
p = utils:::index.search(g, find.package(), TRUE)
capture.output(tools::Rd2txt(utils:::.getHelpFile(p)))
}))
## Extract all mentions of "..*.." from the character vectors
pat <- "\\.\\.\\w*\\.\\."
m <- gregexpr(pat, ex)
unique(unlist(regmatches(ex,m)))
# [1] "..density.." "..count.." "..level.." "..scaled.." "..quantile.."
# [6] "..n.."
または、どのヘルプ ファイルがどの を説明しているかを調べるには、次のコマンドを..*..
実行します。
library(ggplot2)
ex <- sapply(ls("package:ggplot2"), function(g) {
p = utils:::index.search(g, find.package(), TRUE)
capture.output(tools::Rd2txt(utils:::.getHelpFile(p)))
}, simplify=FALSE, USE.NAMES=TRUE)
res <- lapply(ex, function(X) {
m <- gregexpr("\\.\\.\\w*\\.\\.", X)
unique(unlist(regmatches(X, m)))
})
res[sapply(res, length) > 0]