Skip to content

Commit 41c79f7

Browse files
committed
make the figure directory if it doesnt already exist
1 parent b0a54ac commit 41c79f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/figures.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ quiet_read <- function(search_dir, filename, ...) {
558558
write_all_figures <- function(site_meta, search_dir, out_dir, overwrite=FALSE,
559559
...) {
560560
message("Writing figures to ", out_dir)
561+
if (!dir.exists(out_dir))
562+
dir.create(out_dir)
561563
# Set ggplot theme ----
562564
default_theme <- theme_bw()
563565

0 commit comments

Comments
 (0)