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

Vignette about edc_data_warn() #51

Open
3 tasks
DanChaltiel opened this issue Jul 9, 2024 · 0 comments
Open
3 tasks

Vignette about edc_data_warn() #51

DanChaltiel opened this issue Jul 9, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@DanChaltiel
Copy link
Owner

DanChaltiel commented Jul 9, 2024

Make a vignette

  • start with ?edc_data_warn
  • add context
  • add edc_data_stop()

Example for edc_data_stop()

If you use dplyr::case_when() to create a categorical variable and all cases should be handled, then you can use .default="ERROR and stop if there is any.

df = trial %>% 
  mutate(
    event_pfs_detail = case_when(
      !is.na(time_prog) ~ "Progression", 
      !is.na(time_death) ~ "Death",
      !is.na(time_pfs) ~ "Censored",
      .default="ERROR"
    ),
  )

df %>% 
  filter(event_pfs_detail=="ERROR") %>% 
  edc_data_stop("Error on primary endpoint !")
@DanChaltiel DanChaltiel added the documentation Improvements or additions to documentation label Jul 9, 2024
@DanChaltiel DanChaltiel added this to the v0.5.0 milestone Sep 25, 2024
@DanChaltiel DanChaltiel modified the milestones: v0.5.0, v0.6.0 Oct 23, 2024
@DanChaltiel DanChaltiel changed the title Example for edc_data_stop() Vignette about edc_data_warn() Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant