Closed fmichonneau closed 6 years ago
Can you do this via a closure? Something like:
make_hook <- function(some_other_data) {
force(some_other_data)
function(key, namespace) {
# some function that uses some_other_data?
}
}
Otherwise, I'm sure something could be done. The implementation for the external storr is quite small so it would be easy enough to build from that to fit your use case better
Is there a way to do something like?
In normal code, I could put
some_other_data
inside theff
function, but in this particular casesome_other_data
is a target from a remake project that takes a long time to compute.