Parse an Rd file
This function reads an R documentation (Rd) file and parses it, for processing by other functions.
parse_Rd(file, srcfile = NULL, encoding = "unknown", verbose = FALSE, fragment = FALSE, warningCalls = TRUE) "print"(x, deparse = FALSE, ...) "as.character"(x, deparse = FALSE, ...)
- A filename or text-mode connection. At present filenames work best.
NULL, or a
"srcfile"object. See the Details section.
- Encoding to be assumed for input strings.
- Logical indicating whether detailed parsing information should be printed.
- Logical indicating whether file represents a complete Rd file, or a fragment.
- Logical: should parser warnings include the call?
- An object of class Rd.
TRUE, attempt to reinstate the escape characters so that the resulting characters will parse to the same object.
- Further arguments to be passed to or from other methods.
This function parses Rd files according to the specification given in http://developer.r-project.org/parseRd.pdf.
It generates a warning for each parse error and attempts to continue
parsing. In order to continue, it is generally necessary to drop some
parts of the file, so such warnings should not be ignored.
Files without a marked encoding are by default assumed to be in the
native encoding. An alternate default can be set using the
encoding argument. All text in files is translated to the
UTF-8 encoding in the parsed object.
parse_Rdreturns an object of class
"Rd". The internal format of this object is subject to change. The
print()methods defined for the class return character vectors and print them, respectively.Files without a marked encoding are by default assumed to be in the native encoding. An alternate default can be set using the
encodingargument. All text in files is translated to the UTF-8 encoding in the parsed object.
Rd2HTML for the converters that use the output of