msberends / AMR

Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by using evidence-based methods, as described in https://doi.org/10.18637/jss.v104.i03.
https://msberends.github.io/AMR/
Other
83 stars 12 forks source link

brmo() fills every row #49

Closed jukkiebah closed 2 years ago

jukkiebah commented 2 years ago

hai

i have a question regarding the BRMO() function:

it seems to ‘fill in’ every row with an answer (positive/negative). Even if all the antibiotic (rsi-class) columns are empty (NA). Is that the correct behavior?

my code:

df <- df %>% mutate(BRMO_wip = brmo(., col_mo = "microbe_ID", only_rsi_columns = TRUE))

Even with the last argument, every row (meaning every isolate) gets a value.

It would make more sense if the rows that contain empty antibiotic results get a NA while using the BRMO() function. Now i get problems downstream when using the firstisolates() function. These empty rows are included because of this one column.

msberends commented 2 years ago

Thanks for raising this! We’ll look into it.

msberends commented 2 years ago

Found a solution, great issue!

All rows with NA in all analysed drugs will now return NA in any mdro() function, such as brmo(). Testing the new functionality now. Will be in the development version by tomorrow.

jukkiebah commented 2 years ago

Thanks When will the new version be released?

msberends commented 2 years ago

Good question :) Probably in the next 4 weeks.

jukkiebah commented 2 years ago

thanks! can't wait ;-)

msberends commented 2 years ago

We're waiting for this: https://www.eucast.org/clinical_breakpoints/

Hopefully we can add 12.0 early January, would be a pity not to include it if they almost release it!