Codes for general settings.^[See childRmd/_01header.Rmd file for other general settings]

Setup global chunk settings^[Change echo = FALSE to hide codes after knitting and Change cache = TRUE to knit quickly. Change error=TRUE to continue rendering while errors are present.]

knitr::opts_chunk$set(
    eval = TRUE,
    echo = TRUE,
    fig.path = here::here("figs/"),
    message = FALSE,
    warning = FALSE,
    error = TRUE,
    cache = TRUE,
    comment = NA,
    tidy = TRUE,
    fig.width = 6,
    fig.height = 4
)
library(knitr)
hook_output = knit_hooks$get('output')
knit_hooks$set(output = function(x, options) {
  # this hook is used only when the linewidth option is not NULL
  if (!is.null(n <- options$linewidth)) {
    x = knitr:::split_lines(x)
    # any lines wider than n should be wrapped
    if (any(nchar(x) > n)) x = strwrap(x, width = n)
    x = paste(x, collapse = '\n')
  }
  hook_output(x, options)
})

```{css, tidy=FALSE}

linewidth css

pre:not([class]) { color: #333333; background-color: #cccccc; }

```r
# linewidth css
pre.jamovitable{
  color:black;
  background-color: white;
  margin-bottom: 35px;  
}
 jtable<-function(jobject,digits=3) {
  snames<-sapply(jobject$columns,function(a) a$title)
  asDF<-jobject$asDF
  tnames<-unlist(lapply(names(asDF) ,function(n) snames[[n]]))
  names(asDF)<-tnames
  kableExtra::kable(asDF,"html",
                    table.attr='class="jmv-results-table-table"',
                    row.names = F,
                    digits=3)
}
# https://cran.r-project.org/web/packages/exploreR/vignettes/exploreR.html
# exploreR::reset()

```{block, type = "rmdnote"} Block rmdnote

```{block, type = "rmdtip"}
Block rmdtip

```{block, type = "rmdwarning"} Block warning

**Load Library**

see [`R/loadLibrary.R`](https://github.com/sbalci/histopathology-template/blob/master/R/loadLibrary.R) for the libraries loaded.

```r
source(file = here::here("R", "loadLibrary.R"))


sbalci/histopathology-template documentation built on June 29, 2023, 5:52 a.m.