I have a plan of a general form like the one below My real plan is more complex and I've been unable to reproduce this error in a toy example. Has anyone seen a problem like this and do you have any ideas about what might be causing it? The plan takes a set of model results, produces a summary some plots and report for each.
dplan <- drake_plan(
models = target(
read_models(model),
map(model = c("a","b","c"))
),
dep1 = target(
summarise_models(models),
map(models)
),
dep2 = target(
plot_models(models),
map(models)
),
report = target(
write_report(dep1, dep2),
map(dep1, dep2)
)
)
The targets dep1_a-c and dep2_a-c are generated but there is an issue with dep2
dep2_a-c appears in the plot but report_a-c are not shown as depending on them
as they are on dep1_a-c respectively.
That is to say dep1_a is generated and report_a is dependent on it and whilst dep2_a is generated report_a does not 'beleive' it depends on dep2_a despite dep2 being in the map
call in the report target.
The error I get when I run make
is an error of the form:
$error$message: object 'dep2' not found
$error$calls:base::eval(quote(...
and the quote shows that dep2 is not
evaluating to dep2_a etc. in the call it is just bare dep2 which of course does exist as a target only dep2_a-c do - I'm very confused by why this is happening with one target and not the others :(
My real example has several dependencies and I have equivalents of dep2 in my example that are almost identical in output, they return the same type of object mapped over the same list but for some reason, their targets are not evaluated properly in when making report target
I've tried running clean(destroy = TRUE)
and rerunning from scratch with no luck