Generate a pdf, Word or HTML report on any data set in the jfsp package.

datadoc(data, file, title = "", subtitle = "", metadata = FALSE,
  open_doc = TRUE, keep_rmd = FALSE, details = TRUE)

Arguments

data

jfsp data set, e.g., fmoba.

file

character, output file, must end in .pdf, .docx, or .html. See details.

title

character, document title.

subtitle

character, document subtitle. Set to NULL to recover the dataMaid attribution.

metadata

logical, if TRUE, include metadata. See details.

open_doc

logical, open document after rendering. Defaults to TRUE.

keep_rmd

logical, retain the intermediary Rmd document. Defaults to FALSE.

details

logical, if set to FALSE, do not print any progress.

Value

nothing is returned, but a file is written to disk.

Details

Create a report for a specific data set. The report summarizes the variables in the data set. It is a wrapper around and based on dataMaid::makeDataReport, though it renders output with some differences not available in dataMaid.

Pandoc must be available on the system for rendering to pdf. It is recommended to run from RStudio, which includes the necessary components, if you have difficulty. For Word documents (docx) it is necessary to be on a Windows system with Microsoft Word installed. If no file name is supplied, the output defaults to HTML and the file name is the name of the data set.

If metadata = TRUE, information about the system environment and conditions at run time when the document was generated is included at the bottom of the document. If FALSE (default), they are removed. Because datadoc does not directly render the document with dataMaid and makes some internal changes to the Rmd file, the function call line in the metadata is always removed due to its resulting lack of clarity.

Examples

# NOT RUN {
datadoc(fmoba)
# }