Skip to content

ggsave: partial argument match of 'file' to 'filename' #2355

Closed
@jennybc

Description

@jennybc

I have all the warnPartialMatch* options set to TRUE in my .Rprofile. Every time I use ggsave() I get this warning. I took at look at plot_dev() and couldn't quickly determine if file (vs filename) is necessary for some devices? But for png() at least, it would be nice if this line was dev(filename = filename, width = dim[1], height = dim[2], ...).

library(ggplot2)

options(warnPartialMatchArgs = TRUE)

p <- ggplot(iris, aes(x = Petal.Length, y = Sepal.Width)) + geom_point()

ggsave("iris.png", p)
#> Saving 7 x 5 in image
#> Warning in grDevices::png(..., res = dpi, units = "in"): partial argument
#> match of 'file' to 'filename'

Created on 2017-12-01 by the reprex package (v0.1.1.9000).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorgood first issue ❤️good issue for first-time contributorshelp wanted ❤️we'd love your help!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions