Open gabrielodom opened 10 months ago
Week 4 visit and UDS are 1 day apart (visit on day 44, positive UDS on day 45). See https://github.com/CTN-0094/public.ctn0094extra/issues/4
Here's a minimum working example
public.ctn0094data::visit %>% filter(who == 17) %>% select(who, when, visit, what) %>% filter(when <= 50 & when >= 40) # A tibble: 2 × 4 who when visit what <int> <dbl> <fct> <fct> 1 17 44 WK4 visit 2 17 49 WK5 visit
public.ctn0094data::all_drugs %>% filter(who == 17) %>% filter(when <= 50 & when >= 40) # A tibble: 9 × 4 who what source when <int> <fct> <fct> <dbl> 1 17 Heroin TFB 40 2 17 Benzodiazepine UDSAB 45 3 17 Heroin TFB 45 4 17 Methadone UDSAB 45 5 17 Opioid UDSAB 45 6 17 Thc UDSAB 45 7 17 Thc TFB 46 8 17 Methadone UDSAB 49 9 17 Opioid UDSAB 49
Week 4 visit and UDS are 1 day apart (visit on day 44, positive UDS on day 45). See https://github.com/CTN-0094/public.ctn0094extra/issues/4
Here's a minimum working example