Actually load the library necessary to compactPDF

-- Old version was buggy in that if you didn't load "tools" package in your script it wouldn't compact the resulting PDF!  Fixed
This commit is contained in:
Mark DePristo 2012-08-28 08:05:05 -04:00
parent 2996693c9f
commit 4b8d9c3915
1 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,6 @@
library(gplots) library(gplots)
library(ggplot2) library(ggplot2)
library(tools)
# ------------------------------------------------------- # -------------------------------------------------------
# Utilities for displaying multiple plots per page # Utilities for displaying multiple plots per page
@ -59,6 +60,7 @@ closePDF <- function(outputPDF) {
if ( ! is.na(outputPDF) ) { if ( ! is.na(outputPDF) ) {
dev.off() dev.off()
if (exists("compactPDF")) { if (exists("compactPDF")) {
print("compacting PDF")
compactPDF(outputPDF) compactPDF(outputPDF)
} }
} }