Rdo_get_args | R Documentation |
Extract argument description from a help topic.
Rdo_get_args(rd, args, ...)
Rdo_get_arg(rd, arg)
rd |
the documentation for the topic, typically an Rd object but
may be anything that |
arg |
an argument name, a string |
args |
names of arguments to describe, a character vector, see also Details section |
... |
not used |
If arguments
is missing, descriptions of all arguments are
returned.
Effort is made to handle the case when two or more arguments are
described in a single entry. In that case it is not possible to
disentangle the description automatically. So, the description is
returned as is. Also, only one copy of the description is returned,
see the examples with the from
and to
arguments of
function seq
.
The ...
argument is handled, as well, give it as the string
...
in args
.
Rdo_get_arg
simply calls Rdo_get_args
and returns the
first element of its value. This means that arg
is expected to
be of length one, but this is not enforced. Note also that
Rdo_get_arg
is not completely equivalent to calling
Rdo_get_args
with length(args)=1
.
For Rdo_get_args
, an Rd fragment representing the (part of)
help section \arguments
containing descriptions of the requested
arguments.
For Rdo_get_arg
an Rd fragment representing the help for a
single argument.
Georgi N. Boshnakov
h1 <- help("seq")
Rdo_get_args(h1)
Rdo_get_args(h1,"by")
Rdo_get_args(h1,"length.out")
Rdo_get_args(h1,"...")
Rdo_get_args(h1,"from")
Rdo_get_args(h1,c("from","by"))
Rdo_get_args(h1,c("from", "to"))
Rdo_get_args("seq")
Rdo_get_args("seq","by")
Rdo_get_args("seq","length.out")
Rdo_get_args("seq","...")
Rdo_get_args("seq","from")
Rdo_get_args("seq",c("from","by"))
Rdo_get_args("seq",c("from", "to"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.