Skip to content

Commit

Permalink
Linting: contruct paths with file.path() instead of paste0.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam committed Nov 13, 2023
1 parent 7ccbc70 commit 3931cbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/epinow.R
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,15 @@ epinow <- function(reported_cases,
}

if (!is.null(target_folder) && !is.null(out$error)) {
saveRDS(out$error, paste0(target_folder, "/error.rds"))
saveRDS(out$trace, paste0(target_folder, "/trace.rds"))
saveRDS(out$error, file.path(target_folder, "error.rds"))
saveRDS(out$trace, file.path(target_folder, "trace.rds"))
}

# log timing if specified
if (output["timing"]) {
out$timing <- round(as.numeric(end_time - start_time), 1)
if (!is.null(target_folder)) {
saveRDS(out$timing, paste0(target_folder, "/runtime.rds"))
saveRDS(out$timing, file.path(target_folder, "runtime.rds"))
}
}

Expand Down

0 comments on commit 3931cbc

Please sign in to comment.