Creating plots mirrored along the y-axis

Good code example:

Adding lines to barplots + 2 y-axes

Explanation as to why base plot should be saved as a separate object and referenced in subsequent plots:

Good code example:

Importing multiple files to R

Modified from this link.

coverageFiles <- list.files(pattern = "*bedgraph") #Create a file list for all 10 files to import
make.names(gsub("s1_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov_", "", coverageFiles))), read.table),
envir = .GlobalEnv) #Import files with list2env. Use lapply to setNames of the files by taking all the common parts of their names out. Files will be named zr2096_#_5x.bedgraph

Creating a plot with a gapped axis

I used the plotrix package to add an axis break to a grouped bar plot.

R Studio notes:

Artificially grouping bars to create a grouped bar plot with an axis break:

My final code:

Updating R using updateR package

Ignoring previously committed files

Add legend to outside of multipanel plot

Google lead me to a solution from Katie Lotterhos! I found it extremely useful.