Giter Club home page Giter Club logo

Comments (5)

msberends avatar msberends commented on August 27, 2024

That is a great suggestion! I was just done writing when I saw this. It's a small code change, so here it is a new argument of the first_isolate() function:


include_untested_rsi
logical to indicate whether also rows without antibiotic results are still eligible for becoming a first isolate. Use include_untested_rsi = FALSE to always return FALSE for such rows. This checks the data set for columns of class <rsi> and consequently requires transforming columns with antibiotic results using as.rsi() first.


Still testing if it always work, then I'll upload it 🙂

from amr.

msberends avatar msberends commented on August 27, 2024

Until then (for the AMR package in dplyr-free code since dplyr is not a strict dependency):

    rsi_all_NA <- which(unname(vapply(FUN.VALUE = logical(1), 
                                      as.data.frame(t(x[, is.rsi(x), drop = FALSE])),
                                      function(rsi_values) all(is.na(rsi_values)))))
    x[rsi_all_NA, "first"] <- FALSE

So x is the data set and "first" is the column name created after first_isolate().

from amr.

jukkiebah avatar jukkiebah commented on August 27, 2024

thanks, sounds like a very good fix!

from amr.

msberends avatar msberends commented on August 27, 2024

(this is an automated reply)

The development version nows contains the fix to this issue. You can try the latest version yourself using:

install.packages("remotes") # if you haven't already
remotes::install_github("msberends/AMR")

Or you could wait until we release a new version to CRAN (which won't be long) 🙂

from amr.

msberends avatar msberends commented on August 27, 2024

Fix released to official R repository

Just a small notice: we released a new software version, containing the fix to this issue. Please update your version using either the user interface of your software, or by running:

install.packages("AMR")

from amr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.