# set global chunk options
opts_chunk$set(cache=TRUE)
packs <- c("reports", "xtable", "ggplot2", "reshape2", "gridExtra", "tables")
lapply(packs, library, character.only = TRUE)

## Format for pvalues
pform <- function(x, cutoff = .01, digits = NULL) {
    z <- strsplit(as.character(cutoff), "\\.")[[c(1, 2)]]
    w <- paste0(".", z)
    if (x < cutoff) {
        paste0("< ", w)
    } else {
        if (is.null(digits)) digits <- nchar(z)
        paste0("= .", strsplit(as.character(round(x, digits)), "\\.")[[c(1, 2)]])
    }
}

## Format numbers and removes leading zeros
numformat <- function(val, digits=2) { 
    sub("^(-?)0.", "\\1.", sprintf(paste0("%.", digits, "f"), val)) 
}

#bib <- read.bibtex(file.path(getwd(), basename(getOption("bib.loc"))))
#cite in text using `r citet(bib[1])`

Title

Name

Date


It make be wise to run custom_css(rprofile = TRUE).

1. Ask a question here...

Answer it here


ggplot(mtcars, aes(mpg, hp)) + geom_point()

Figure 1: gpplot Rocks!

Use:

To double space text

References

#bibliography("html") 


trinker/reports documentation built on May 31, 2019, 9:51 p.m.