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

tidyr warning message for epiR tidier #870

Closed
IndrajeetPatil opened this issue Jun 2, 2020 · 2 comments
Closed

tidyr warning message for epiR tidier #870

IndrajeetPatil opened this issue Jun 2, 2020 · 2 comments

Comments

@IndrajeetPatil
Copy link
Contributor

IndrajeetPatil commented Jun 2, 2020

# setup
set.seed(123)
library(epiR)
#> Loading required package: survival
#> Package epiR 1.0-14 is loaded
#> Type help(epi.about) for summary information
#> Type browseVignettes(package = 'epiR') to learn how to use epiR for applied epidemiological analyses
#> 

# data
dat <- matrix(c(13, 2163, 5, 3349), nrow = 2, byrow = TRUE)
rownames(dat) <- c("DF+", "DF-")
colnames(dat) <- c("FUS+", "FUS-")

# model
fit <-
  epiR::epi.2by2(
    dat = as.table(dat),
    method = "cross.sectional",
    conf.level = 0.95,
    units = 100,
    outcome = "as.columns"
  )

broom::tidy(fit)
#> Warning: `cols` is now required when using unnest().
#> Please use `cols = c(s)`
#> # A tibble: 12 x 4
#>    term                estimate conf.low conf.high
#>    <chr>                  <dbl>    <dbl>     <dbl>
#>  1 PR.strata.wald         4.01    1.43      11.2  
#>  2 PR.strata.score        4.01    1.49      10.8  
#>  3 OR.strata.wald         4.03    1.43      11.3  
#>  4 OR.strata.cfield       4.03   NA         NA    
#>  5 OR.strata.score        4.03    1.49      10.9  
#>  6 OR.strata.mle          4.02    1.34      14.4  
#>  7 ARisk.strata.wald      0.448   0.0992     0.797
#>  8 ARisk.strata.score     0.448   0.142      0.882
#>  9 PARisk.strata.wald     0.176  -0.0225     0.375
#> 10 PARisk.strata.piri     0.176   0.0389     0.314
#> 11 AFRisk.strata.wald     0.750   0.301      0.911
#> 12 PAFRisk.strata.wald    0.542   0.0361     0.782
@simonpcouch
Copy link
Collaborator

simonpcouch commented Jun 3, 2020

Thanks for catching this @IndrajeetPatil!🙂 Working on this now. Guessing this might be the case for many other unnest() calls, so will spend some time making sure this warning doesn't pop up elsewhere.

@github-actions
Copy link

github-actions bot commented Mar 8, 2021

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants