Skip to content

antimicrobials atc_code index incompatible types #7

@Youguang

Description

@Youguang

Error:

Error in left_join():
! Can't join x$atc_code with y$atc_code due to incompatible types.
x$atc_code is a .
y$atc_code is a .

Possible reason:

radar/global.R

Lines 105 to 113 in df1df23

antimicrobials <- antimicrobials %>%
mutate(ab_days = as.integer(ab_stop_date - ab_start_date),
ab_timing = as.integer(ab_start_date - adm_start_date),
ddd_per_prescription = ddd_per_day*ab_days) %>%
left_join(
AMR::antibiotics %>%
select(
atc_code = atc, ab_type = name, ab_group = atc_group2
), by = "atc_code") %>%

typeof(AMR::antibiotics$atc)
[1] "list"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions