Skip to content

Commit

Permalink
Merge pull request #1574 from tidyverse/b-1573-x-n-attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr authored Apr 13, 2024
2 parents 975fa34 + 2b18174 commit bd0609e
Show file tree
Hide file tree
Showing 7 changed files with 302,964 additions and 186 deletions.
3 changes: 2 additions & 1 deletion R/as_tibble.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ lst_to_tibble <- function(x, .rows, .name_repair, lengths = NULL, call = caller_
x <- unclass(x)
x <- set_repaired_names(x, repair_hint = TRUE, .name_repair, call = call)
x <- check_valid_cols(x, call = call)
recycle_columns(x, .rows, lengths)
x <- recycle_columns(x, .rows, lengths)
x
}

check_valid_cols <- function(x, pos = NULL, call = caller_env()) {
Expand Down
21 changes: 17 additions & 4 deletions R/new.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,28 @@ new_tibble <- function(x, ..., nrow = NULL, class = NULL, subclass = NULL) {
class <- c(class[!class %in% tibble_class], tibble_class_no_data_frame)
}

slots <- c("x", "n", "class")
args[slots] <- list(x, nrow, class)

# `new_data_frame()` restores compact row names
# Can't add to the assignment above, a literal NULL would be inserted otherwise
args[["row.names"]] <- NULL

# Attributes n and x are special and must be assigned after construction
an <- args[["n"]]
ax <- args[["x"]]
args[["n"]] <- NULL
args[["x"]] <- NULL

# need exec() to avoid evaluating language attributes (e.g. rsample)
exec(new_data_frame, !!!args)
out <- exec(new_data_frame, x = x, n = nrow, !!!args, class = class)

if (!is.null(an)) {
attr(out, "n") <- an
}

if (!is.null(ax)) {
attr(out, "x") <- ax
}

out
}

#' @description
Expand Down
31 changes: 15 additions & 16 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# Revdeps

## Failed to check (11)
## Failed to check (8)

|package |version |error |warning |note |
|:----------------|:-------|:-----|:-------|:----|
|bulkreadr |? | | | |
|dplyr |? | | | |
|historicalborrow |? | | | |
|LexisNexisTools |? | | | |
|matrixset |? | | | |
|NMsim |? | | | |
|RevGadgets |? | | | |
|simaerep |? | | | |
|simTool |? | | | |
|tidyposterior |? | | | |
|workflowsets |? | | | |
|bigrquerystorage |1.1.0 |1 | | |
|ctsem |3.9.1 |1 | | |
|EcoEnsemble |1.0.5 |1 | | |
|glmmfields |0.1.8 |1 | | |
|loon.tourr |? | | | |
|multinma |0.6.1 |1 | | |
|treestats |1.0.5 |1 | | |
|triptych |0.1.2 |1 | | |

## New problems (1)
## New problems (3)

|package |version |error |warning |note |
|:-------|:-------|:------|:-------|:----|
|[NMdata](problems.md#nmdata)|0.1.2 |__+1__ | | |
|package |version |error |warning |note |
|:---------------|:-------|:------|:-------|:--------|
|[covidcast](problems.md#covidcast)|0.5.2 |__+1__ | |1 __+1__ |
|[LexisNexisTools](problems.md#lexisnexistools)|0.3.7 |__+1__ | | |
|[NMdata](problems.md#nmdata)|0.1.5 |__+1__ | | |

23 changes: 20 additions & 3 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
## revdepcheck results

We checked 14 reverse dependencies (3 from CRAN + 11 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
We checked 2057 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 1 new problems
* We failed to check 0 packages
* We saw 3 new problems
* We failed to check 8 packages

Issues with CRAN packages are summarised below.

### New problems
(This reports the first line of each new failure)

* covidcast
checking running R code from vignettes ... ERROR
checking re-building of vignette outputs ... NOTE

* LexisNexisTools
checking tests ... ERROR

* NMdata
checking tests ... ERROR

### Failed to check

* bigrquerystorage (NA)
* ctsem (NA)
* EcoEnsemble (NA)
* glmmfields (NA)
* loon.tourr (NA)
* multinma (NA)
* treestats (NA)
* triptych (NA)
Loading

0 comments on commit bd0609e

Please sign in to comment.