generateReport: Generates report

View source: R/functions.R

generateReportR Documentation

Generates report

Description

This function generates the pieces of the report, which includes the R script, Rmarkdown file, and any Rmarkdown outputs.

Usage

generateReport(
  rcode,
  filename = "report",
  dir = "out",
  title = "MicrobiomeExplorer Report",
  author = "",
  date = "`r format(Sys.time(), '%d %B, %Y')`",
  data.source = "",
  output = c("html_document"),
  toc = TRUE,
  intro_text = NULL
)

Arguments

rcode

A named list where each element corresponds to a different analysis (Alpha diversity, Beta diversity). The name of the list is used to denote the first part of the code chunks in each analysis section (alpha, beta). Each element is itself a list of R commands corresponding to a code chunk.

filename

Name of output files. Default is "report".

dir

Directory of output. Default is "out".

title

Title of the report.

author

Author of the report.

date

Date of the report.

data.source

R code used to obtain the dataset

output

Output of Rmarkdown file. Options defined in global.R

toc

Table of contents. Default is TRUE.

intro_text

Introductory text to include with the report (optional)

Details

Adapted from https://yihui.name/knitr/demo/stitch/

Value

A character vector where each element is a line in the R script.


zoecastillo/microbiomeExplorer documentation built on Sept. 11, 2022, 7:40 a.m.