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

ADTTE xportr_write() Call Error #89

Closed
DeclanHodges opened this issue Mar 24, 2023 · 9 comments · Fixed by #90
Closed

ADTTE xportr_write() Call Error #89

DeclanHodges opened this issue Mar 24, 2023 · 9 comments · Fixed by #90
Assignees

Comments

@DeclanHodges
Copy link
Collaborator

After upgrading the renv.lock file to use xportr v0.2.0, the ADTTE code is now erroring from the call to xportr_write() at line 125:
image

@robertdevine
Copy link
Collaborator

Thank you @DeclanHodges. Working on this issue in my Posit Cloud sandbox.

@robertdevine
Copy link
Collaborator

Future reference from checkout point:

renv::restore()
The following package(s) will be updated:

CRAN ===============================

  • BH [1.78.0-0 -> 1.81.0-1]
  • MASS [7.3-58.1 -> 7.3-58.3]
  • Matrix [1.5-1 -> 1.5-3]
  • R.utils [2.12.1 -> 2.12.2]
  • Rcpp [1.0.9 -> 1.0.10]
  • Tplyr [1.0.1 -> 1.1.0]
  • admiral [0.9.0 -> 0.10.1]
  • admiraldev [0.2.0 -> 0.3.0]
  • bit [4.0.4 -> 4.0.5]
  • broom [1.0.1 -> 1.0.4]
  • bslib [0.4.0 -> 0.4.2]
  • cachem [1.0.6 -> 1.0.7]
  • callr [3.7.2 -> 3.7.3]
  • cli [3.4.1 -> 3.6.0]
  • codetools [0.2-18 -> 0.2-19]
  • colorspace [2.0-3 -> 2.1-0]
  • curl [4.3.3 -> 5.0.0]
  • digest [0.6.30 -> 0.6.31]
  • dplyr [1.0.10 -> 1.1.0]
  • emmeans [1.8.2 -> 1.8.5]
  • evaluate [0.17 -> 0.20]
  • fansi [1.0.3 -> 1.0.4]
  • fastmap [1.1.0 -> 1.1.1]
  • fontawesome [0.4.0 -> 0.5.0]
  • forcats [0.5.2 -> 1.0.0]
  • formatters [0.3.2 -> 0.4.0]
  • fs [1.5.2 -> 1.6.1]
  • gert [1.9.1 -> 1.9.2]
  • ggplot2 [3.3.6 -> 3.4.1]
  • gh [1.3.1 -> 1.4.0]
  • haven [2.5.1 -> 2.5.2]
  • highr [0.9 -> 0.10]
  • htmltools [0.5.3 -> 0.5.4]
  • httpuv [1.6.6 -> 1.6.9]
  • httr [1.4.4 -> 1.4.5]
  • huxtable [5.5.0 -> 5.5.2]
  • isoband [0.2.6 -> 0.2.7]
  • janitor [2.1.0 -> 2.2.0]
  • jsonlite [1.8.3 -> 1.8.4]
  • knitr [1.40 -> 1.42]
  • lubridate [1.9.0 -> 1.9.2]
  • metatools [0.1.3 -> 0.1.5]
  • mgcv [1.8-41 -> 1.8-42]
  • nlme [3.1-160 -> 3.1-162]
  • openssl [2.0.4 -> 2.0.6]
  • pkgbuild [1.3.1 -> 1.4.0]
  • pkgdown [2.0.6 -> 2.0.7]
  • pkgload [1.3.1 -> 1.3.2]
  • purrr [0.3.5 -> 1.0.1]
  • r2rtf [0.3.5 -> 1.0.1]
  • ragg [1.2.4 -> 1.2.5]
  • readr [2.1.3 -> 2.1.4]
  • readxl [1.4.1 -> 1.4.2]
  • rlang [1.0.6 -> 1.1.0]
  • rmarkdown [2.17 -> 2.20]
  • roxygen2 [7.2.1 -> 7.2.3]
  • rtables [0.5.1 -> 0.6.0]
  • sass [0.4.2 -> 0.4.5]
  • shiny [1.7.3 -> 1.7.4]
  • sourcetools [0.1.7 -> 0.1.7-1]
  • stringi [1.7.8 -> 1.7.12]
  • styler [1.8.0 -> 1.9.1]
  • survival [3.4-0 -> 3.5-5]
  • svglite [2.1.0 -> 2.1.1]
  • testthat [3.1.5 -> 3.1.7]
  • tidyr [1.2.1 -> 1.3.0]
  • timechange [0.1.1 -> 0.2.0]
  • tinytex [0.42 -> 0.44]
  • tm [0.7-9 -> 0.7-11]
  • utf8 [1.2.2 -> 1.2.3]
  • vroom [1.6.0 -> 1.6.1]
  • whisker [0.4 -> 0.4.1]
  • xfun [0.34 -> 0.37]
  • yaml [2.3.6 -> 2.3.7]
  • checkmate [* -> 2.1.0]
  • httr2 [* -> 0.2.2]

GitHub =============================

  • envsetup [pharmaverse/envsetup@main: 539514d8 -> 9ae5f214]
  • xportr [atorus-research/xportr@main: e5987358 -> cd4da91e]

RSPM ===============================

  • htmlwidgets [repo: CRAN -> RSPM; ver: 1.5.4 -> 1.6.1]
  • metacore [atorus-research/metacore@main -> 0.1.2]
  • renv [0.16.0 -> 0.17.0]
  • tibble [repo: CRAN -> RSPM; ver: 3.1.8 -> 3.2.0]
  • vctrs [repo: CRAN -> RSPM; ver: 0.5.1 -> 0.5.2]

@robertdevine
Copy link
Collaborator

@DeclanHodges, please see the link below:
atorus-research/xportr#78

Should we wait on the xportr::xportr_write() 2.0.x.patch or rollback renv lock to latest stable production app for pilot3?

Please advise. Thank you.
@thomas-neitmann , @laxamanaj, @bms63

@robertdevine
Copy link
Collaborator

Error in xportr_write():
! The following validation failed:
• Formats 'TRTDUR', 'EVNTDESC', 'SRCDOM', and 'SRCVAR' must have a valid format.

Backtrace:

  1. ├─... %>% ...
  2. └─xportr::xportr_write(., "submission/datasets/adtte.xpt", label = "AE Time To 1st Derm. Event Analysis")
  3. └─rlang::abort(c("The following validation failed:", checks))

@bms63
Copy link
Collaborator

bms63 commented Mar 24, 2023

This was a workaround from the hackathon to deal with this issue I believe. Will need to update for your purposes

xportr_format(adas_spec$var_spec %>% mutate_at(c("format"), ~replace_na(.,'')), domain = "ADADAS")

@robertdevine
Copy link
Collaborator

robertdevine commented Mar 24, 2023

Thank you, @bms63

@DeclanHodges, in summary, xportr_format implementation in the .R script should address the validation check issue
involving the four variables {'TRTDUR', ''EVNTDESC', 'SRCDOM', 'SRCVAR' }. [In my posit Cloud sandbox with merge
from today's @laxamanaj update to main only these four ADTTE variables failed validation, a subset of the 18 variables in
the Issue #89 description. Should have this resolved next week.] Wrapping up for the week. Thanks again.

@robertdevine
Copy link
Collaborator

robertdevine commented Mar 27, 2023

@DeclanHodges, this issue is corrected in my posit Cloud sandbox. Worth noting, the xportr_format in adtte.R (main) is necessary (and sufficient) to format {'TRTSDT', 'TRTEDT', and 'STARTDT'} DATE9 type, for consistency with the {'TRTDUR', 'EVNTDESC','SRCDOM' , 'SRCVAR'} variables the issue is best addressed in the spec itself. Thanks again.

@DeclanHodges
Copy link
Collaborator Author

Hi @robertdevine, it sounds like you've found a solution. Thanks for looking into this! Are you okay to update the specs?

@robertdevine
Copy link
Collaborator

Thanks, @DeclanHodges, yes, I will update the specs today and issue PR adding you as 'Reviewer'. We can also move the issue from 'In Progress' to 'In Review' on the Project Board. We should be able to close the issue this week.

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