R/tbl.R
raw| 1 | new_tbl <- function(x = list(), n = NULL, ..., class = NULL) { |
| 2 | new_data_frame(x, n, class = c(class, "tbl"), ...) |
| 3 | } |
| 4 | |
| 5 | as_tbl <- function(x, ...) { |
| 6 | check_dots_empty() |
| 7 | UseMethod("as_tbl") |
| 8 | } |
| 9 | |
| 10 | #' @export |
| 11 | as_tbl.data.frame <- function(x, ...) { |
| 12 | class(x) <- c("tbl", "data.frame") |
| 13 | x |
| 14 | } |