title: How to further format forest Plots in R, from the metafor package?
body: <p>I'm quite new to R and have been struggling with properly formatting a forest plot I've created.</p>
  
  <p>When I click the "zoom" option in R to open the graph in a new window, it looks as such:</p>
  
  <p><a href="https://i.stack.imgur.com/RVdCf.png" rel="nofollow noreferrer">Forest Plot Currently</a></p>
  
  <p>My main goal is to get the forest plot as compact as possible, i.e. publication quality/style. I currently have wayyyy too much white space in my plot. I think it has something to do with me messing around with the par() function, and now have no clue how to revert to defaults.</p>
  
  <pre><code>#Metafor library
  library(metafor)
  
  #ReadXL library to import excel sheet
  library(readxl)
  
  #Name the data sheet from the excel file
  ACDF&lt;- read_excel("outpatient_ACDF_meta_analysis.xlsx")
  
  #View the data sheet with view(ACDF)
  
  par(mar=c(20,1,1,1))
  
  #This below measures with risk ratios. If you want to measure odds ratios, use argument measure=OR
  returnop &lt;- escalc(measure="OR", ai=op_return_OR, bi=op_no_return_OR, ci=ip_return_OR, di=ip_no_return_OR, data=ACDF)
  
  #Generate a Random Effects Model
  REmodel&lt;-rma(yi=yi, vi=vi, data=returnop, slab=paste(Author, Year, sep=", "), method="REML")
  
  #Generate a forest plot of the data
  forest(REmodel, xlim=c(-17, 6),
         ilab=cbind(ACDF$op_return_OR, ACDF$op_no_return_OR, ACDF$ip_return_OR, ACDF$ip_no_return_OR),
         ilab.xpos=c(-9.5,-8,-6,-4.5), cex=.75, ylim=c(-1, 27),
         psize=1)
  
  ### add column headings to the plot
  text(c(-9.5,-8,-6,-4.5), 26, c("Return+", "Return-", "Return+", "Return-"))
  text(c(-8.75,-5.25),     27, c("Outpatient", "Inpatient"))
  text(-16,                26, "Study",     pos=4)
  text(6,                  26, "Log Odds Ratio [95% CI]", pos=2)
  </code></pre>
  
  <p>I'm not 100% as to how to provide my data otherwise, but I used the dput function to provide as follows. Apologies for the N/As, still fleshing out the data for the future.</p>
  
  <pre><code>structure(list(Study = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
  13, 14, 15, 16, 17, 18, 19, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA), Author = c("Stieber", "Villavicencio", 
  "Lied", "Liu", "Garringer", "Joseffer", "Trahan", "Lied", "Sheperd", 
  "Talley", "Martin", "McGirt", "Adamson", "Fu", "Arshi", "Khanna", 
  "McClelland", "Purger", "McLellend2", NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), Year = c(2005, 2007, 
  2007, 2009, 2010, 2010, 2011, 2012, 2012, 2013, 2015, 2015, 2016, 
  2017, 2017, 2017, 2017, 2017, 2017, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA), op_return_OR = c(NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, 1, 3, 2, 16, 257, 7, NA, 5, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA
  ), op_no_return_OR = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  596, 769, 992, 4581, 958, 1749, NA, 3120, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ip_return_OR = c(NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, 8, 9, 2, 257, 2034, 12, NA, 
  200, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA), ip_no_return_OR = c(NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, 589, 641, 482, 16171, 8930, 1744, NA, 46312, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA
  ), op_death = c(NA, NA, NA, 0, NA, NA, NA, NA, NA, NA, 1, NA, 
  1, 0, NA, 2, NA, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA), op_no_death = c(NA, NA, NA, 45, NA, 
  NA, NA, NA, NA, NA, 596, NA, 993, 4597, NA, 1754, NA, 3125, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA
  ), ip_death = c(NA, NA, NA, 0, NA, NA, NA, NA, NA, NA, 0, NA, 
  0, 42, NA, 2, NA, 20, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA), ip_no_death = c(NA, NA, NA, 64, 
  NA, NA, NA, NA, NA, NA, 597, NA, 484, 16386, NA, 1754, NA, 46492, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  2979.79797979798), op_thrombo = c(NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, 0, NA, NA, 8, 20, 4, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), op_no_thrombo = c(NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, 597, NA, NA, 4589, 1195, 
  1752, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA), ip_thrombo = c(NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, 2, NA, NA, 67, 150, 4, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ip_no_thrombo = c(NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, 595, NA, NA, 16361, 10814, 
  1752, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA), op_stroke = c(NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, 0, NA, NA, 2, 12, 0, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), op_no_stroke = c(NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, 597, NA, NA, 4595, 1203, 
  1756, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA), ip_stroke = c(NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, 2, NA, NA, 14, 132, 0, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ip_no_stroke = c(NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, 595, NA, NA, 16414, 10832, 
  1756, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA), op_dysphagia = c(NA, NA, NA, 0, NA, NA, 
  NA, NA, NA, NA, NA, NA, 11, NA, NA, NA, NA, 2, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), op_no_dysphagia = c(NA, 
  NA, NA, 45, NA, NA, NA, NA, NA, NA, NA, NA, 618, NA, NA, NA, 
  NA, 49, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA), ip_dysphagia = c(NA, NA, NA, 1, NA, NA, NA, NA, 
  NA, NA, NA, NA, 1, NA, NA, NA, NA, 59, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ip_no_dysphagia = c(NA, 
  NA, NA, 63, NA, NA, NA, NA, NA, NA, NA, NA, 273, NA, NA, NA, 
  NA, 2917, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA), op_hematoma = c(NA, NA, NA, 0, NA, NA, NA, NA, 
  NA, NA, NA, NA, 1, NA, NA, NA, 1, 4, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), op_no_hematoma = c(NA, 
  NA, NA, 45, NA, NA, NA, NA, NA, NA, NA, NA, 629, NA, NA, NA, 
  2015, 47, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA), ip_hematoma = c(NA, NA, NA, 1, NA, NA, NA, NA, 
  NA, NA, NA, NA, 1, NA, NA, NA, 273, 65, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ip_no_hematoma = c(NA, 
  NA, NA, 63, NA, NA, NA, NA, NA, NA, NA, NA, 273, NA, NA, NA, 
  7791, 1713, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
  NA, NA, NA, NA)), .Names = c("Study", "Author", "Year", "op_return_OR", 
  "op_no_return_OR", "ip_return_OR", "ip_no_return_OR", "op_death", 
  "op_no_death", "ip_death", "ip_no_death", "op_thrombo", "op_no_thrombo", 
  "ip_thrombo", "ip_no_thrombo", "op_stroke", "op_no_stroke", "ip_stroke", 
  "ip_no_stroke", "op_dysphagia", "op_no_dysphagia", "ip_dysphagia", 
  "ip_no_dysphagia", "op_hematoma", "op_no_hematoma", "ip_hematoma", 
  "ip_no_hematoma"), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, 
  -35L))
  </code></pre>