Rd2HTML {tools}R Documentation

Work with an Rd object

Description

These experimental functions take the output of the parse_Rd function and check it or produce an HTML help page from it. Their interfaces (and existence!) are subject to change.

Usage

Rd2HTML(Rd, out = "", package = "", defines = .Platform$OS.type,
        encoding = "unknown")
checkRd(Rd, defines = .Platform$OS.type, encoding = "unknown",
        unknownOK = FALSE, listOK = TRUE)

Arguments

Rd the Rd object.
out a filename or connection object to which to write the output.
package the package to list in the output.
defines string(s) to use in "#ifdef" tests.
encoding encoding to use if the file does not specify one.
unknownOK unrecognized macros are treated as errors if FALSE, otherwise warnings.
listOK unnecessary non-empty braces (e.g. around text, not as an argument) are treated as errors if FALSE, otherwise warnings.

Details

The Rd2HTML converter is still in development, and currently has the following known deficiencies:

Value

Rd2HTML is executed mainly for the side effect of writing the HTML page. Its value is the name of that page.
checkRd returns TRUE if the file has no errors; it generates an R error otherwise.

Author(s)

Duncan Murdoch

References

http://developer.r-project.org/parseRd.pdf

See Also

parse_Rd

Examples


  toolsRd <- Rd_db("tools")
  con <- textConnection(toolsRd[[grep("Rd2HTML.Rd", names(toolsRd))]], "rt")
  outfile <- paste(tempfile(), ".html", sep="")
  browseURL(Rd2HTML(con, outfile, package="tools"))
  close(con)
  
  con <- textConnection(toolsRd[["Rd2HTML.Rd"]], "rt")
  checkRd(con) # A stricter test than Rd2HTML uses
  close(con)
  

[Package tools version 2.9.0 Index]