knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(mysimplecompedium)

A figure with caption and cross-reference

library(tidyverse)
starwars %>%
  filter(species == "Human")%>%
ggplot()+aes(x=height, y=mass)+geom_point()

We can see in Figure \@ref(fig:starwars-plot)

Two in-text references

Takemaru et al. says blah [@takemaru1998yeast].

Blah blah [@takemaru1998yeast; @kabe1999role].

Use external R script

knitr::read_chunk('my test.R')

References cited



jiyuw/DATA-598-WI20-week-5 documentation built on Feb. 24, 2020, 1:58 a.m.