Skip to content

data.frame override hinders local development #3067

Closed
@karawoo

Description

@karawoo

One consequence of data.frame() being overridden to throw an error (#2994) is that if I've loaded ggplot2 with devtools::load_all() I can't run any reprexes that use data.frame(). So if I'm working on a bug and have been given the following reprex:

library("ggplot2")
dat <- data.frame(x = c("a", "b"), y = 1:6)
ggplot(dat, aes(x = x)) +
  geom_bar()

I can't check my bug fix by running the reprex without changing the call to data.frame() and rewriting the code to avoid recycling.

I definitely see the value of avoiding any use of data.frame() within the ggplot2 codebase, but it would be really nice for interactive development to not have to rewrite all reprex code that uses data.frame(). Is there a good way around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions