Skip to content

Commit 94fa853

Browse files
committed
Use requireNamespace instead of library
1 parent 47679a5 commit 94fa853

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/plot.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ print.ggplot <- function(x, newpage = is.null(vp), vp = NULL, ...) {
142142
# Record dependency on 'ggplot2' on the display list
143143
# (AFTER grid.newpage())
144144
recordGraphics(
145-
library("ggplot2", quietly = TRUE),
145+
requireNamespace("ggplot2", quietly = TRUE),
146146
list(),
147147
getNamespace("ggplot2")
148148
)

0 commit comments

Comments
 (0)