Preventing stale ggplots #924
Closed
llrs
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Nice workaround. This is an edge case specific to how |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes a target is run but when it is actually loaded it fails. I am not sure if this is only restricted to ggplot2 or related to non standard programming. Probably it is the former as most of the calculations happen when the print.gg method is invoked.
See this targets from the example plus a test target:
The test target uses ggplot2 to create a plot, but uses a column named a that doesn't exists in data.
Traceback
Solution
The easiest solution is to print the ggplot2 object in the target:
Then
tar_make(test)
fails directly:Beta Was this translation helpful? Give feedback.
All reactions