require(hivEstimatesAccuracy, quietly = TRUE)
knitr::opts_chunk$set(echo = FALSE, results = "asis", message = FALSE, warning = FALSE, include = TRUE)
calcFigHeight <- function(plot) {
  height <- 0.5
  if (!is.null(plot$layout$layout$ROW)) {
    height <- height + max(plot$layout$layout$ROW) * 2
  }

  return(height)
}

formatNumbers <- function(x) sprintf("%.2f", x)
cat(sprintf("# %d. Reporting Delays with trend", params$InputData$RunIdx))

```r, fig.width = 10, fig.height = 4} print(params$InputData$Artifacts$OutputPlotTotal$plot)

```r, fig.width = 10, fig.height = calcFigHeight(params$InputData$Artifacts$OutputPlotStrat$Gender)}
print(params$InputData$Artifacts$OutputPlotStrat$Gender$plot)

```r, fig.width = 10, fig.height = calcFigHeight(params$InputData$Artifacts$OutputPlotStrat$Transmission)} print(params$InputData$Artifacts$OutputPlotStrat$Transmission$plot)

```r, fig.width = 10, fig.height = calcFigHeight(params$InputData$Artifacts$OutputPlotStrat$GroupedRegionOfOrigin)}
print(params$InputData$Artifacts$OutputPlotStrat$GroupedRegionOfOrigin$plot)
dt <- params$InputData$Artifacts$UnivAnalysis
knitr::kable(dt, align = rep("r", ncol(dt)))


nextpagesoft/hivEstimatesAccuracyReloaded documentation built on March 14, 2020, 7:06 a.m.