Skip to content

Commit

Permalink
remove ctl_new_pillar to edibble.R
Browse files Browse the repository at this point in the history
  • Loading branch information
emitanaka committed Dec 10, 2023
1 parent 492b998 commit b3b9f37
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
17 changes: 17 additions & 0 deletions R/edibble.R
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,23 @@ edibble <- function(.data, title = NULL, name = "edibble", .record = TRUE, seed
new_edibble(.data, ..., .design = des)
}

#' @importFrom pillar ctl_new_pillar
#' @export
ctl_new_pillar.edbl_table <- function(controller, x, width, ..., title = NULL) {
out <- NextMethod()
type2 <- out$type
type2[[1]][1] <- vec_ptype_abbr2(x)
if(!inherits(x, "edbl_fct")) {
out$type[[1]][1] <- ""
class(out$type[[1]]) <- NULL
}
pillar::new_pillar(list(
title = out$title,
type = out$type,
type2 = type2,
data = out$data
))
}


#' Restart the edibble design
Expand Down
18 changes: 1 addition & 17 deletions R/units.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,7 @@ vec_cast.edbl_unit.edbl_unit <- function(x, to, ...) {
x
}

#' @importFrom pillar ctl_new_pillar
#' @export
ctl_new_pillar.edbl_table <- function(controller, x, width, ..., title = NULL) {
out <- NextMethod()
type2 <- out$type
type2[[1]][1] <- vec_ptype_abbr2(x)
if(!inherits(x, "edbl_fct")) {
out$type[[1]][1] <- ""
class(out$type[[1]]) <- NULL
}
pillar::new_pillar(list(
title = out$title,
type = out$type,
type2 = type2,
data = out$data
))
}




Expand Down

0 comments on commit b3b9f37

Please sign in to comment.