# devtools::document(roclets = "vignette")
options(width = 1000)

``` {r setup, echo=FALSE, results="hide"}

define YAML and R code chunk header and footer

lang_output <- function(x, lang) { cat(c(sprintf("%s", lang), x, ""), sep="\n") }

r_output <- function(x) lang_output(x, "r") yaml_output <- function(x) lang_output(x, "yaml")

knitr::opts_chunk$set( fig.width=7, fig.height=5)

## Initiate trees

```r
library(yaml)
library(data.tree)
library(magrittr)
library(rprojroot)

devtools::load_all(".", quiet = TRUE)

Load a tree template from the \code{treeSimR} package.

path_dtree <- system.file("raw data/LTBI_dtree-cost_SIMPLE.yaml", package = "treeSimR")
osList <- yaml.load_file(path_dtree)


n8thangreen/treeSimR documentation built on Feb. 20, 2022, 11:54 a.m.