a1 <- 1
a2 <- 2
# Note 'arguments' must be a list of NROW(inputs), with each element itself being a list,
# which is passed to do.call(fun[x], arguments[[x]]), where x is row number, one at a time
args <- lapply(1:2, function(x) {
list(x = paste0("a", x),
envir = environment()) # may be necessary to specify in which envir a1, a2
# are located, if not in an interactive sessino
})
inputs <- data.frame(objectName = "a", loadTime = 1:2, fun = "get", arguments = I(args))
a <- simInit(inputs = inputs, times = list(start = 0, end = 1))
a <- spades(a)
identical(a1, a$a)
end(a) <- 3
a <- spades(a) # different object (a2) loaded onto a$a
identical(a2, a$a)