knitr::opts_chunk$set(
  collapse = TRUE,
  warning = FALSE,
  message = FALSE,
  echo = FALSE,
  comment = "#>",
  fig.path = "../figures/"
)

library(rrtoolsdemo)
library(gapminder)

Introduction

Here is a demo of an analysis in a Rmd document.

Background

Demoing rrtools functionality by making a quick mock analysis

Methods

Use Gapminder data from package gapminder to get yearly means of life expectancy and per capita GDP.

First get data:

df <- gapminder::gapminder

Then summarise data

df <- summarise_by_year(df)

Results

Finally plot data

plot_gdp_v_lifeexp(df)

Try another palette

plot_gdp_v_lifeexp(df, palette = "magma")

Discussion

Conclusion

Acknowledgements

pagebreak

References

pagebreak

Colophon

This report was generated on r Sys.time() using the following computational environment and dependencies:

# which R packages and versions?
devtools::session_info()

The current Git commit details are:

# what commit is this file at? You may need to change the path value
# if your Rmd is not in analysis/paper/
git2r::repository("../..")


annakrystalli/rrtoolsdemo documentation built on May 28, 2019, 5:36 p.m.