Comments (5)
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.
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.
thanks, sounds like a very good fix!
from amr.
(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.
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)
- AMR for R as a One Health approach
- Implement mathematically sound WISCA algorithm
- Update `microorganisms` data set to latest taxonomy HOT 9
- Add new logo for this AMR package to catch One Health approach
- Incorporate EUCAST 13 and 14 HOT 7
- To-do list for AMR v3.0.0
- CLSI 2024 Veterinary Breakpoints HOT 8
- uti argument in as.sir not working as expected HOT 10
- Veterinary breakpoint substitutions incorrect HOT 5
- MIssing/extra veterinary breakpoints HOT 2
- Need Update Some Microorganisms HOT 1
- AMR HOT 3
- Group isolates HOT 7
- Not all mo_transforms work with antibiogram HOT 1
- Check groups for antibiotics: aminoglycosides all right? HOT 1
- as.sir reports invalid results as coming from wrong columns HOT 2
- extra factor level in class SIR (as.sir/is.sir) HOT 5
- `as.mo()`: give preference to species if subspecies is non-existent
- Add denominators to each antibiotic in antibiogram HOT 2
- Acknowledge data availability when using `first_isolate(method = "phenotype)`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amr.