Skip to content

glimpse() may not dispatch properly to type_sum() #185

Description

@dholstius

Hi, thanks for all your work on tibble!

Here's an example of a simple problem. I'm about to try and submit a pull request.

CY <- function (x) {
  stopifnot(is.numeric(x))
  structure(as.integer(x), class = "CY")
}

as.character.CY <- function (from) {
  paste0(class(from), unclass(from))
}

library(tibble)

df <- tibble(cal_yr = CY(2011:2013), 
             budget = c(100, 200, 150))

type_sum.CY <- function (x, ...) {
  "CY"
}

glimpse(df)
lapply(df, class)

Activity

  1. added this to the 1.3.0 milestone on Jan 4, 2017
  2. added 2 commits that reference this issue on Jan 4, 2017
  3. added a commit that references this issue on Apr 1, 2017
  4. github-actions commented on Dec 14, 2020

    @github-actions
    Contributor

    This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

  5. locked and limited conversation to collaborators on Dec 14, 2020
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

    bugan unexpected problem or unintended behaviorprinting 🖨️

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions