Skip to content

Commit

Permalink
handle dates in tribble
Browse files Browse the repository at this point in the history
  • Loading branch information
moodymudskipper committed Sep 19, 2024
1 parent 7402060 commit 7b2c69e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/s3-tbl_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ is_corrupted_tbl_df <- function(x) {

# construct idiomatic code
code_df <- x
code_df[] <- lapply(x, function(col) paste0(sapply(col, function(cell) paste(.cstr_construct(cell, ...), collapse = "")), ","))
code_df[] <- lapply(x, function(col) paste0(base::sapply(col, function(cell) paste(.cstr_construct(cell, ...), collapse = "")), ","))
code_df <- rbind(paste0("~", sapply(names(x), protect), ","), as.data.frame(code_df))
code_df[] <- lapply(code_df, format, justify = opts$justify)
code <- do.call(paste, code_df)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-s3-tbl_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ test_that("tbl_df", {
construct(dplyr::band_members, opts_tbl_df("next"), opts_data.frame("next"))
construct(dplyr::band_members, opts_tbl_df(constructor = "tribble"))
construct(dplyr::band_members, opts_tbl_df(constructor = "tribble", justify = "right"))
construct(tibble::tibble(a = as.Date("2001-01-01")), opts_tbl_df("tribble"))
construct(dplyr::group_by(dplyr::band_members, band))
})
})
Expand Down

0 comments on commit 7b2c69e

Please sign in to comment.