toRd: Convert an object to Rd

Description Usage Arguments Examples

Description

This provides the generic for converting objects to Rd. It extends the core function toRd.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
toRd(obj, ...)

\S3method{toRd}{NULL}(obj, ...)

\S3method{toRd}{list}(obj, ..., unnest=NA)

\S3method{toRd}{Rd_string}(obj, ...)

\S3method{toRd}{Rd_tag}(obj, ...)

\S3method{toRd}{Rd}(obj, ...)

\S3method{toRd}{person}(obj, ..., include = c('given', 'family', 'email'))

\S3method{toRd}{name}(obj, ...)

Arguments

obj

object to convert

...

passed on to methods

unnest

Should the results be unlisted to remove nesting? A value of FALSE indicates that nesting should never be removed, TRUE implies always remove nested elements with class Rd, and when NA, the default, nesting will be removed only if all elements are Rd.

include

The parts of the person object to include.

Examples

1
2
3
4
5
str(toRd(NULL))
toRd(person('John' , 'Doe', email="john@email.com"))
toRd(c( person('John' , 'Doe', email="john@email.com")
      , person('Jane' , 'Poe', email="jane@email.com")
      ))

Rd documentation built on May 23, 2019, 9:03 a.m.

Related to toRd in Rd...