Closed
Description
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)