\newpage

what is this?

This report is just an toy example to see if I can create a package that has (1) an embedded png image, (2) a embedded data set to use internal, (3) can generate an Rdata object generated outside the report, but accessed by it to generate figures and tables.

load packages

suppressPackageStartupMessages(library(knitr))
suppressPackageStartupMessages(library(tidyverse))

knitr::opts_chunk$set(warning=FALSE, echo=TRUE, message=FALSE, 
               results='asis', fig.width=6, fig.height=6 )

load Rdata file for report to us

load(params$Rdatafile)

\newpage

A picture of daisy built into package

f = system.file("rmarkdown", package="exrender")
pic = file.path( f, "skeleton/daisy.png")
knitr::include_graphics(pic)

print a cars data summary

knitr::kable(summary(cars))

pressure plot

A random plot of some

plot(pressure)

\newpage

plot the ggplot object

We made this image in the make_some_data() function and passed it to the report as a paramater that needed to be loaded.

my_plot

\newpage

make a table

A table of the first few rows of the embedded data set 'ng_anno'

knitr::kable(ng_anno[1:4,])
x = "my name is moose"

Some in line R code: r x



hughesevoanth/exrender documentation built on Dec. 20, 2021, 4:53 p.m.