r-causal / tipr

An R package for conducting sensitivity analyses for unmeasured confounders
https://r-causal.github.io/tipr/
Other
33 stars 2 forks source link

CRAN error #21

Closed LucyMcGowan closed 8 months ago

LucyMcGowan commented 8 months ago

@malcolmbarrett I got an email this morning that we need to make an updated in order to stay on CRAN based on an error on one of their checks:

https://cran.r-project.org/web/checks/check_results_tipr.html

It looks like it is only seen on one machine:

Version: 1.0.1 Check: examples Result: ERROR Running examples in ‘tipr-Ex.R’ failed The error most likely occurred in:

base::assign(".ptime", proc.time(), pos = "CheckExEnv")
### Name: adjust_hr
### Title: Adjust an observed hazard ratio for a normally distributed
###   confounder
### Aliases: adjust_hr adjust_hr_with_continuous

### ** Examples

adjust_hr(0.9, -0.9, 1.3) 

Error in eval(call("force", as.symbol(paste0("..", x)))) : argument "..8" is missing, with no default Calls: adjust_hr ... glue_data -> lapply -> FUN -> %||% -> eval -> eval -> force Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

I can't seem to replicate it myself on my machine -- do you have an ideas on how we might fix this? (maybe we can chat on our next call)

malcolmbarrett commented 8 months ago

It seems to be propogating on the devel version -- four errors now! I can try to install that version of R locally to see if I can replicate it. In the meantime, I ran

library(tipr)
debug(glue::glue_data)
adjust_hr(0.9, -0.9, 1.3)
undebug(glue::glue_data)

But the information I got from it was limited. It seems to me like it's from the cli call

malcolmbarrett commented 8 months ago

It might be helpful to post on the cli repo if so

malcolmbarrett commented 8 months ago

This seems to be an r-devel issue, but I can't replicate it locally using R-devel for mac 🤔

malcolmbarrett commented 8 months ago

Ah! It's a glue issue about trailing commas https://github.com/tidyverse/glue/issues/320

malcolmbarrett commented 8 months ago

Except I can't find any in tipr on a first pass 🙃. Maybe the error is being triggered in another way? I am able to replicate the error in the linked issue, so at least there is that

malcolmbarrett commented 8 months ago

There are a lot of changes here since the last CRAN release, so I'm going try running the dev version on CRAN's windows devel machine

malcolmbarrett commented 8 months ago

I can finally replicate this using the CRAN version of tipr. Pretty sure we've already fixed it and just need to do a release 😎