Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN Check Failure for Upcoming broom Release #24

Open
simonpcouch opened this issue May 26, 2020 · 0 comments
Open

CRAN Check Failure for Upcoming broom Release #24

simonpcouch opened this issue May 26, 2020 · 0 comments

Comments

@simonpcouch
Copy link

Hi there! The broom dev team just ran reverse dependency checks on the upcoming broom 0.7.0 release and found new errors/test failures for the CRAN version of this package. I've pasted the results below, which seem to result from our decision to no longer export the fix_data_frame() function (for maintainability purposes.)

  • checking tests ...
     ERROR
    Running the tests in ‘tests/testthat.R’ failed.
    Last 13 lines of output:
      [1mBacktrace:[22m
      [90m 1. [39mgenerics::tidy(dds)
      [90m 2. [39mbiobroom::tidy.EList(dds)
      [90m 3. [39mbiobroom:::tidy_matrix(x$E)
      [90m 7. [39mbroom::fix_data_frame
      [90m 8. [39mbase::getExportedValue(pkg, name)
      
      ══ testthat results  ═══════════════════════════════════════════════════════════
      [ OK: 33 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 3 ]
      1. Error: limma tidier works as expected (@test-limma_tidiers.R#5) 
      2. Error: voom tidier adds weight column (@test-limma_tidiers.R#26) 
      3. Error: voomWithQualityWeights tidier adds weight and sample.weight columns (@test-limma_tidiers.R#49) 
      
      Error: testthat unit tests failed
      Execution halted
    

I've pasted the most recently exported function definition below as a place to start from in making the necessary fixes.🙂

fix_data_frame <- function(x, newnames = NULL, newcol = "term") {
  if (!is.null(newnames) && length(newnames) != ncol(x)) {
    stop("newnames must be NULL or have length equal to number of columns")
  }

  if (all(rownames(x) == seq_len(nrow(x)))) {
    # don't need to move rownames into a new column
    ret <- data.frame(x, stringsAsFactors = FALSE)
    if (!is.null(newnames)) {
      colnames(ret) <- newnames
    }
  }
  else {
    ret <- data.frame(
      ...new.col... = rownames(x),
      unrowname(x),
      stringsAsFactors = FALSE
    )
    colnames(ret)[1] <- newcol
    if (!is.null(newnames)) {
      colnames(ret)[-1] <- newnames
    }
  }
  as_tibble(ret)
}

We hope to submit this new version of the package to CRAN in the coming weeks. If you encounter any problems fixing these issues, please feel free to reach out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant