-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create.dir
argument for ggsave()
#5492
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it would be better to pass down the error call to the type checks as well!
Co-authored-by: olivroy <[email protected]>
Thanks for these suggestions olivroy! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - maybe add a check for whether create.dir
is NA
There is a |
This PR aims to fix #5489.
Briefly, it adds a
create.dir
argument toggsave()
, which controls whether a new directory can be created.As an implementation detail, I've isolated all the path checking into its own function.
Example:
Created on 2023-10-24 with reprex v2.0.2
Because the default
create.dir = FALSE
might be pain for interactive use, it prompts a small menu choice in interactive mode (which I don't know how to reprex)