## Generated by ‘rhelium’ from Rd files: do not edit here ## Edit documentation in ‘rhelium’ source files #format wiki #language en #pragma section-numbers off #acl IanRiley:read,write,delete,revert,admin All:read #pragma keywords IanRiley R-project package rhelium roxygen2 devtools #pragma supplementation-page on = R Package ‘rhelium’ = Documentation for package ‘rhelium’ version 2018.09.01. [[attachment:desc.txt|DESCRIPTION|target='_blank']] <> ------ == rhelium-package == Format R Help Pages from Package Documentation === Description === This package was developed to allow additional formats for help pages created from R package documentation (viz., DESCRIPTION and Rd files in the 'man' folder). It includes a wrapper for the standard formats provided in 'tools' package (text, HTML, Latex and examples), but at this stage only for single Rd files. Currently the only additional format provided is MoinMoin wiki markup. For MoinMoin and for PDF, pages can be made for both single Rd files and for whole packages (with header and footers). === Details === This package is work-in-progress, so do not expect all Rd features to be converted to MoinMoin markup at this stage. The package name, 'rhelium', is in honour of 'roxygen2' that creates the Rd files used. Helium is ligher than oxygen, so the name has both illustrative and metaphorical meanings. For a complete list, use library(help = "rhelium"). === Version === 2018.9.1 === Note === 'tools' does not export the functions used in this package, so this are subject to change, and if so, this package will need to be revised accordingly. 'rhelium' uses some general functions from 'local' package, see http://rileylink.net/moin.cgi/R_coding/local-package. === Author(s) === Ian Riley <> === See Also === Useful links: * [[http://rileylink.net/moin.cgi/R_coding/rhelium-package]] ------ == moinDoc == Create MoinMoin Page to Document Package === Description === See [[http://moinmo.in]] for details on MoinMoin markup. === Usage === {{{#!highlight r moinDoc(x = ".", out = "", silent = FALSE, internals = FALSE, ...) }}} === Arguments === x:: a filename or Rd object to use as input for single Rd file conversion, or a package name, a path to package top level directory for combined file conversion. Default is working directory. out:: out a filename (with or without a path) or connection object to which to write the output. If there is no path, then the file will written to the current directory. If `out` is not specified, a file will be written to the current directory as "name.moin", where name is the package name. silent:: logical: if `TRUE`, messages are suppressed. internals:: logical: if `TRUE`, Rd files with a keyword set to "internal" are also included, rather than being skipped by default. ...:: additional paramaters to pass to the `Rd2moin` converter. See `Rd2HTML` and/or `Rd2moin` for furhter details. === Value === Documentation in MoinMoin format for either an entire R package or a single Rd file. === Author(s) === Ian Riley (ian@riley.asia) === Examples === {{{#!highlight r moinDoc("./rhelium-package") }}} ------ == pkgDoc == Document Package Using Specified Format === Description === Create documentation of packages in text, HTML, Latex, PDF and !MoinMoin fomrats using Rd converters from "tools" package and MoinMoin converter from this package. With MoinMoin it is possible to convert either a single Rd file (using Rd2moin as a substitute for the converters provided by "tools"), or all Rd files in the package to a combined MoinMoin page. === Usage === {{{#!highlight r pkgDoc(Rd = ".", type = "unknown", ...) }}} === Arguments === Rd:: a filename or an Rd object for single Rd file conversion. For package conversion, either an installed package name or a path to package top level directory. Default is working directory. type:: charcter: indicating the selected format. The options are, "text", "html", "latex", "example" (extract R code in the examples), "pdf" and "moin". The default is set to "unknown" so this parameter must be specified. ...:: additional paramaters to pass to the converter. See `Rd2HTML`, `Rd2moin` and/or `moinDoc` for futher details. === Value === Fomrated documentation for single or multiple Rd files for R package. === Author(s) === Ian Riley <> === Examples === {{{#!highlight r pkgDoc("~/R projects/rhelium-package") }}} ------ == Rd2moin == Rd Converter for MoinMoin Markup === Description === This function takes (or obtains) output of the `parse_Rd` function and produces a help page in MoinMoin markup. It uses internal functions from `tools`, so these are subject to change. See `Rd2txt` for futher details. === Usage === {{{#!highlight r Rd2moin(Rd, out = "", append = FALSE, package = "", defines = .Platform$OS.type, stages = "render", outputEncoding = "UTF-8", fragment = FALSE, depth = 1, prepared = FALSE, ...) }}} === Arguments === Rd:: an parsed Rd object to use as input, or a file path for an Rd file. out:: a filename or connection object to which to write the output. names to be applied to `x`, if unnamed, or to replace existing names. append:: a logical value indicating whether the output file should be openned in append or write mode. package:: the package to list in the output. defines:: string(s) to use in #ifdef tests. stages:: at which stage ("build", "install", or "render") should \Sexpr macros be executed? See `Rd2txt` for futher details. outputEncoding:: see `Rd2txt` for futher details. fragment:: a logical value indicating if fragments of Rd files be accepted.See `Rd2txt` for futher details. depth:: an integer indicating the heading level at which to start. prepared:: a local value indicating if the Rd object supplied has aleardy been prepared for processing by `tools:::prepare_Rd()`. ...:: additional parameters to pass to `tools:::prepare_Rd()` for use in parsing an Rd source. See `parse_Rd`. === Value === This function is executed to write a help page converted to MoinMoin markup. The value is the name of the output file (invisibly). === Author(s) === Ian Riley <> ------ = Code = [[attachment:rhelium.R]] [[attachment:fromTools.R]] [[attachment:moinDoc.R]] [[attachment:moinFuncs.R]] [[attachment:pkgDoc.R]] [[attachment:Rd2moin.R]] = References = 1. Ian Riley (2018). rhelium: MoinMoin R Package Documentation [ir]. R package version 2018.09.01. http://rileylink.net/moin.cgi/R_coding/rhelium-package 1. Hadley Wickham, Peter Danenberg and Manuel Eugster (2017). roxygen2: In-Line Documentation for R. R package version 6.0.1. https://CRAN.R-project.org/package=roxygen2 1. R Core Team (2018). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/. ------ <> ------ CategoryRcoding CategoryRpackage