Skip to content

Relax 1d atomic vectors or lists requirement #2609

Closed

Description

@hadley

As it's breaking many revdeps so will likely have deleterious impact on user code

Activity

  1. added
    bug
    on May 15, 2018
  2. added this to the milestone on May 15, 2018
  3. hadley commented on May 17, 2018

    @hadley
    MemberAuthor

    @lionel- can you take on this one? I'm not going to have time since I'm teaching Thursday and Friday.

    The problem arises from the use of as_tibble() in three places. On the whole, I think the increased strictness of tibble is a good thing but it causes problems with some base R functions which 1d arrays like (like scale(), as in #2374). I think the simplest solution probably to switch to tibble::new_tibble(), but it requires a little thought. Any solution should include a PR that ensures this works:

    df <- data.frame(x = 1:10)
    df$y <- scale(1:10)
      
    p <- ggplot(df, aes(x, y)) + geom_point()
    layer_data(p)

    Beware that data.frame(x = scale(1:10)) strips the dim attribute that causes the problem.

    It'd be great if you could check a couple of the revdeps that fail to make sure this actually fixes the problem (easiest way is to search https://docs.google.com/spreadsheets/d/1UZIFwt3j3XjnRGOMNJZvpal_CAj7Hz8aNXJt41m3JjM/edit#gid=0 for "atomic vector")

  4. added a commit that references this issue on May 19, 2018
    63b0694
  5. added a commit that references this issue on May 19, 2018
    a7b3135
  6. lock commented on Nov 15, 2018

    @lock

    This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

  7. locked and limited conversation to collaborators on Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglayers 📈

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions