Description Usage Arguments Details Functions Examples
Canonical form is simply described as that which would come out from reading
an Rd file via, tools::parse_Rd()
.
1 2 3 4 5 | Rd_canonize(rd, ..., .check = TRUE)
Rd_canonize_text(rd, .check = TRUE, ...)
Rd_canonize_code(rd, .check = TRUE, ...)
|
rd |
the Rd container object to put in canonical form. |
... |
Arguments passed on to
|
.check |
Perform input checks? |
Canonical Rd Text has:
One line per element, with attr(., 'Rd_tag')=='TEXT'
The indents are merged with content if the first content is text.
Newlines are contained with the content provided the content is 'TEXT', but the newline must be the last character in the string and cannot appear anywhere else.
Comments are a separate class and do not include the newline.
Canonical R code follows the following rules:
One element per line of code.
newline is included at the end of the line string, not as a separate element.
if there are multiple lines they are bound together in an Rd or Rd_tag list.
Rd_canonize_text
: Put text in canonical form.
Rd_canonize_code
: Put R code in canonical form.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.