Skip to content

Infographics.R script and associated files to produce pdf documents.

Notifications You must be signed in to change notification settings

piotrpatrzylas/Infographics

Repository files navigation

Infographics

A simple script in R to produce infographics style PDFs for Healthcare Associated Infection (HCAI) reports.

Prerequisites

This script requires R/R studio to be already installed. Additionally, the following packages need to be installed and loaded:

  • useful
  • grid
  • magick
  • ggplot2
  • cowplot
  • stringr
  • RColorBrewer
  • Cairo
  • gridExtra
  • ggrepel

Running the script

To produce PDFs the user need to configure the script variables.
As an example to get the following:

the user would need to provide the following details:

    1. Info_type <- 1
    1. rate_number <- 24
    1. plot_data <- data.frame(years = c("2007/08", "2008/09", "2009/10", "2010/11", "2011/12", "2012/13", "2013/14", "2014/15", "2015/16", "2016/17", "2017/18"), rate = c(100, 07, 60, 50, 40, 30, 20, 22, 20, 18, 20))
    1. rhigh_factor <- 7
    1. rlow_factor <- 4
    1. rhigh_malenumber <- 269
    1. rhigh_femnumber <- 250
    1. rlow_malenumber <-13
    1. rlow_femnumber <-16
    1. previous_year <- "2007/08"
    1. community_percent_old <- 40
    1. hospital_percent_old <- 60
    1. community_percent_new <- 64
    1. hospital_percent_new <- 36

For description of the type of data/what should be inserted please see comments in the source code.

About

Infographics.R script and associated files to produce pdf documents.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published