1\name{Rdo_get_args}
2\alias{Rdo_get_args}
3\alias{Rdo_get_arg}
4\title{
5  Extract argument description from a help topic
6}
7\description{
8  Extract argument description from a help topic.
9}
10\usage{
11Rdo_get_args(rd, args, ...)
12Rdo_get_arg(rd, arg)
13}
14\arguments{
15  \item{rd}{the documentation for the topic, typically an Rd object but
16    may be anything that \code{\link{Rd_fun}} accepts.}
17  \item{arg}{an argument name, a string}
18  \item{args}{names of arguments to describe, a character vector, see
19    also Details section}
20  \item{\dots}{not used}
21}
22\details{
23  If \code{arguments} is missing, descriptions of all arguments are
24  returned.
25
26  Effort is made to handle the case when two or more arguments are
27  described in a single entry. In that case it is not possible to
28  disentangle the description automatically. So, the description is
29  returned as is. Also, only one copy of the description is returned,
30  see the examples with the \code{from} and \code{to} arguments of
31  function \code{seq}.
32
33  The \code{...} argument is handled, as well, give it as the string
34  \verb{...} in \code{args}.
35
36  \code{Rdo_get_arg} simply calls \code{Rdo_get_args} and returns the
37  first element of its value. This means that \code{arg} is expected to
38  be of length one, but this is not enforced. Note also that
39  \code{Rdo_get_arg} is not completely equivalent to calling
40  \code{Rdo_get_args} with \code{length(args)=1}.
41}
42\value{
43  For \code{Rdo_get_args}, an Rd fragment representing the (part of)
44  help section \verb{\arguments} containing descriptions of the requested
45  arguments.
46
47  For \code{Rdo_get_arg} an Rd fragment representing the help for a
48  single argument.
49}
50% \references{
51% %% ~put references to the literature/web site here ~
52% }
53% \author{
54% %%  ~~who you are~~
55% }
56\author{Georgi N. Boshnakov}
57% \note{
58% %%  ~~further notes~~
59% }
60%
61% %% ~Make other sections like Warning with \section{Warning }{....} ~
62%
63% \seealso{
64% %% ~~objects to See Also as \code{\link{help}}, ~~~
65% }
66\examples{
67h1 <- help("seq")
68Rdo_get_args(h1)
69Rdo_get_args(h1,"by")
70Rdo_get_args(h1,"length.out")
71Rdo_get_args(h1,"...")
72Rdo_get_args(h1,"from")
73Rdo_get_args(h1,c("from","by"))
74Rdo_get_args(h1,c("from", "to"))
75
76Rdo_get_args("seq")
77Rdo_get_args("seq","by")
78Rdo_get_args("seq","length.out")
79Rdo_get_args("seq","...")
80Rdo_get_args("seq","from")
81Rdo_get_args("seq",c("from","by"))
82Rdo_get_args("seq",c("from", "to"))
83}
84\keyword{ Rd }
85