Searches all .Rd files in a package's man/ directory for a
given topic (matched against \\alias entries) and returns its
\\title string.
Value
a single character string with the title, trimmed of leading and
trailing whitespace. Stops with an error if topic is not found.
See also
Other pkg.funinfo:
funArgs(),
funCalls(),
funKeywords(),
funList(),
rdLabels()
Examples
# a minimal man/ directory to search in
man <- file.path(tempdir(), "man")
dir.create(man, showWarnings = FALSE)
writeLines(c("\\\\name{foo}", "\\\\alias{foo}", "\\\\alias{bar}",
"\\\\title{A Minimal Help Page}",
"\\\\description{Nothing to see here.}"),
file.path(man, "foo.Rd"))
rdTitle("foo", man = man)
#> Warning: /tmp/RtmpR25AXN/man/foo.Rd:1: unexpected '{'
#> [1] NA
rdTitle("bar", man = man) # aliases are matched as well
#> Warning: /tmp/RtmpR25AXN/man/foo.Rd:1: unexpected '{'
#> [1] NA
rdTitle("nothing", man = man) # NA
#> Warning: /tmp/RtmpR25AXN/man/foo.Rd:1: unexpected '{'
#> [1] NA
unlink(man, recursive = TRUE)
