Skip to content

Permit function devices to use file argument#3810

Merged
yutannihilation merged 4 commits intotidyverse:masterfrom
bwiernik:ggsave-file-arg
Feb 24, 2020
Merged

Permit function devices to use file argument#3810
yutannihilation merged 4 commits intotidyverse:masterfrom
bwiernik:ggsave-file-arg

Conversation

@bwiernik
Copy link
Copy Markdown
Contributor

@bwiernik bwiernik commented Feb 7, 2020

Devices like devEMF::emf or Cairo::CairoSVG use file instead of filename. They currently fail when provided in device to ggsave. This fixes that.

Closes #3807

Copy link
Copy Markdown
Member

@yutannihilation yutannihilation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this! This basically looks good to me. One corner case in my mind is when a function has both file and filename in its arguments, but I expect such functions are very few (or none).

Could you add a NEWS bullet?

Comment thread R/save.r Outdated
bwiernik and others added 2 commits February 21, 2020 12:27
Co-Authored-By: Hiroaki Yutani <yutani.ini@gmail.com>
@bwiernik
Copy link
Copy Markdown
Contributor Author

Okay, fixed the styling and added a NEWS bullet as requested.

Comment thread NEWS Outdated
Comment on lines +9 to +11
* Support graphics devices that use the `file` argument instead of `fileneame`
in `ggsave()` (@bwiernik, 3810)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, we are now using NEWS.md instead of NEWS. Could you move this to NEWS.md?

@yutannihilation yutannihilation merged commit 53edc51 into tidyverse:master Feb 24, 2020
@yutannihilation
Copy link
Copy Markdown
Member

Thanks!

@bwiernik bwiernik deleted the ggsave-file-arg branch February 25, 2020 00:34
sthagen added a commit to sthagen/tidyverse-ggplot2 that referenced this pull request Feb 25, 2020
Permit function devices to use `file` argument (tidyverse#3810)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ggsave() can't be used with devices taking file as argument instead of filename

2 participants