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

[Bug]: Example in README won't run with CRAN version of cardx #172

Closed
3 tasks done
thisisnic opened this issue Jun 21, 2024 · 2 comments
Closed
3 tasks done

[Bug]: Example in README won't run with CRAN version of cardx #172

thisisnic opened this issue Jun 21, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@thisisnic
Copy link
Contributor

What happened?

Hello :)

I installed cardx from CRAN and was trying to run the first example in the README but got an error:

library(cardx)
#> Warning: package 'cardx' was built under R version 4.3.3
cards::ADSL |>
  # keep two treatment arms for the t-test calculation
  dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |>
  cardx:::ard_stats_t_test(by = ARM, variable = AGE)
#> Error in eval(expr, envir, enclos): object 'ard_stats_t_test' not found

Created on 2024-06-21 with reprex v2.1.0

It works great with the dev version of cardx though! Maybe worth mentioning in the README (I'm happy to submit a PR if you'd like) or maybe just leave if you're planning on a new CRAN release soon anyway - just let me know what you'd prefer :)

sessionInfo()

R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

time zone: Europe/London
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] cardx_0.1.0

loaded via a namespace (and not attached):
 [1] utf8_1.2.4        R6_2.5.1          tidyselect_1.2.1  magrittr_2.0.3    glue_1.7.0        tibble_3.2.1      pkgconfig_2.0.3  
 [8] dplyr_1.1.4       generics_0.1.3    lifecycle_1.0.4   cli_3.6.2         fansi_1.0.6       vctrs_0.6.5       compiler_4.3.1   
[15] rstudioapi_0.16.0 tools_4.3.1       pillar_1.9.0      rlang_1.1.3

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@thisisnic thisisnic added the bug Something isn't working label Jun 21, 2024
@Melkiades Melkiades added help wanted Extra attention is needed and removed bug Something isn't working labels Jun 21, 2024
@Melkiades
Copy link
Contributor

the name was modified in 60f0c0d (after the release). the function you are looking for may be called ard_ttest on CRAN release

@ddsjoberg
Copy link
Collaborator

We released a very early of cardx onto CRAN, because I knew we were going to do something that may be considered a gray area as far as CRAN rules goes and I didn't want the initial CRAN review of the package force us to remove it.

We're technically accessing the internals of a package with when we grab the default argument values for S3 methods like t.test.formula(). Only the generic is exported and the methods are "internal".

Anyway, we've made many many changes since then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants