README.md

myprettyreport

Overview

This package helps to export ggplot2 graphs into a good-looking PDF file in a clear and easy way with a wide range of flexibility. It has a modular structure so the report elements can be combined in many ways.

Functions of the package:

Installation

```{r, eval = FALSE}

install.packages("devtools")

devtools::install_github("tarkomatas/myprettyreport")


## Usage

```{r, eval = FALSE}
library(ggplot2)
sample_plot <- ggplot(data = mtcars, mapping = aes(x = wt, y = mpg)) +
  geom_point() +
  stat_smooth(method = 'lm', color = "#f44242", fill = "#fd9068")

library(magick)
sample_logo <- image_read("https://raw.githubusercontent.com/tarkomatas/website/master/img/1.png")

library(myprettyreport)
start_report() %>%

  add_cover_page(
    logo = sample_logo,
    logo_size = 0.3
  ) %>%

  add_new_page(
    plot = sample_plot,
    need_header = TRUE,
    logo = sample_logo,
    logo_size = 0.2
  ) %>%

  end_report()

page1 | page2 :-------------------------:|:-------------------------: |

Additional links

detailed introduction of the package



tarkomatas/myprettyreport documentation built on May 9, 2019, 7:40 a.m.