Skip to content

Commit

Permalink
new clonelog method
Browse files Browse the repository at this point in the history
  • Loading branch information
mb706 authored Jun 2, 2020
1 parent e05d7e4 commit 0f67848
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@ deepclone <- function(obj) {
}

clonelog <- function(log) {
otask <- log$env$task
ostats <- log$log.stats
log$log.stats <- NULL
log$env$task <- NULL
log2 <- deepclone(log)
log2$env$task <- otask
log2$log.stats <- ostats
log$env$task <- otask
log$log.stats <- ostats
log2
log$env <- as.environment(as.list(log$env))
log
}

#' @title Aggregate Population Results
Expand Down

0 comments on commit 0f67848

Please sign in to comment.