epicentre-msf / gtfcc-ocv-app

https://apps.epicentre-msf.org/public/app/gtfcc/
1 stars 0 forks source link

Issue with delay table #15

Closed ntncmch closed 2 years ago

ntncmch commented 2 years ago

When I filter the data (ex: time filter from 2022-Q1 to 2022-Q3) the table update but with different indicators. Really weird...

Screenshot 2022-10-11 at 15 35 40
PaulC91 commented 2 years ago

I've noticed this behaviour on one of the lassa tables also. Seems to happen when N drops below a certain number. I'll have a look at the gtsummary docs to see if there is any mention why this happens.

PaulC91 commented 2 years ago

Just tested with this example from the gtsummary docs. The same thing happens if you reduce the sample size to <= 10.

library(gtsummary)

trial %>%
  dplyr::slice_sample(n = 100) %>% 
  dplyr::select(age, marker) %>%
  tbl_summary(
    type = all_continuous() ~ "continuous2",
    statistic = all_continuous() ~ c("{median} ({p25}, {p75})", "{min}, {max}"),
    missing = "no"
  )
PaulC91 commented 2 years ago

fixed now. had to explicitly set the variable type to keep it as continuous when N <= 10: https://github.com/ddsjoberg/gtsummary/issues/1362