radar2/interfaces/4D/src/debug weergave patho_plot.R

27 lines
774 B
R

require(tidyverse)
require(readr)
v171 = read_rds('v171.rds')
v180 = read_rds('v180.rds')
new_v180 = v180 %>% anti_join(v171 %>% left_join(v180))
source('interfaces.R')
d = readGlimsArchive(NULL, NULL, T, NULL, NULL)
d %>% filter(str_starts(mo, 'B_ES')) %>% count(mo, CXM)
# deze aantallen zie ik niet terug in wat de applicatie presenteert:
# Ceftazidim: R (705), SI (2705), totaal dus 3410
# misschien dat data_select() voor andere aantallen zorgt?
data_select = d %>%
# filter(specialty_shiny %in% input$specialtyInput & department %in% input$departmentInput) %>%
filter_first_isolate(col_patient_id = "patientid", episode_days = 30) %>%
mutate(mo = as.mo(mo, Becker = TRUE))
data_select %>% filter(str_starts(mo, 'B_ES')) %>% count(mo, CXM)
# Ja dus!