# This chunk sets up the markdown specifics

# Global knit options
# This makes sure you can source R scripts when this report lives in /reports folder and the scripts live in /R
knitr::opts_knit$set(root.dir = "../") 

# Global chunk options
knitr::opts_chunk$set(echo = F, 
                      eval = T,
                      comment = "", 
                      cache = F,
                      message = F, 
                      warning = F,
                      fig.align = "center",
                      fig.height = 8,
                      fig.width = 8,
                      strip.white = TRUE
                      )

# Set global ggplot2 theme
ggplot2::theme_set(g6tr::theme_g6tr(type = "grey"))

# Create function for table generation
add_table <- function(x, ...){
  knitr::kable(x = x, 
               format = "html") %>%
      kableExtra::kable_styling(bootstrap_options =  c("striped", "condensed", "responsive"))
}
# specify packages to be loaded during analysis
library(tidyverse)
library(knitr)
library(kableExtra)

Executive Summary

Row

Executive Summary

Highlight point 1

Highlight point 2

Instructions

Row

Interactive charts

Subject 1

Navigation {.sidebar}

Navigational menu {.no-mobile}

Row {data-width=750 .tabset .tabset-fade}

Sub-section one

library(plotly)

iris_plot <-
  iris %>%
  ggplot(., aes(x = Sepal.Length, y = Sepal.Width, color = Species))+
  geom_jitter() +
  g6tr::scale_color_g6tr(palette = "core")

ggplotly(iris_plot)

Sub-section two

library(leaflet)
leaflet() %>%
  addTiles() %>%
  setView(lng = -73.9808, lat = 40.730610, zoom = 13)

Sub-section three

iris %>% 
  head %>%
  add_table()

Sub-section four

iris %>%
  ggplot(., aes(x = Sepal.Length, y = Sepal.Width, color = Species))+
  geom_jitter() +
  g6tr::scale_color_g6tr(palette = "core")

Row {data-width=250}

Main Takeaways



StefanMusch/RHelpers documentation built on Oct. 31, 2019, 12:03 a.m.