Comments (4)
Great! Many thanks for your reply.
I squashed the bug. For mdro()
and eucast_rules()
, the col_mo
argument can now contain any column name of your data. The problem was that the column name that you picked was also present in the microorganisms
data set, leading to conflicting code.
The development version nows contains the fix to this issue. If you like, you can try the latest version yourself using:
install.packages("remotes") # if you haven't already
remotes::install_github("msberends/AMR")
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.
Hi Jane, many thanks for using our package!
No, that’s absolutely not the way it should behave. The intended behaviour is that it just works without requiring you to think about it
Would you be able to share the structure of your data here, by pasting the output of str(vitek_spp)
? Feel free to remove the actual data it prints, I’m just curious for the column names and data types.
I think the problem might be that the microorganisms
data set also contains a column ‘species’, but that should not pose a problem. Could you also try:
vitek_spp %>%
rename(mybugs = species) %>%
mdro()
Then my last question, which AMR package version are you using?
from amr.
Okay, after running the following command (which converts the species column from character to the mo class, and then displaying the output of str(vitek_spp)
:
vitek_spp <-vitek_spp %>% select(-acquired_esbl) %>% filter(!is.na(AMP)) %>% mutate(species=as.mo(species))
str(vitek_spp)
tibble [403 × 20] (S3: tbl_df/tbl/data.frame)
$ sampleID: chr [1:403] ...
$ species : 'mo' chr [1:403] "B_KLBSL_PNMN" "B_KLBSL_PNMN" "B_KLBSL_PNMN" "B_KLBSL_PNMN" ...
$ AMP : chr [1:403] "R" "R" "R" "R" ...
$ AUG : chr [1:403] "R" "R" "S" "R" ...
[etc]
If I rename the species column to 'mybugs', then the mdro()
function works correctly.
from amr.
Related Issues (20)
- help with %like% HOT 3
- as.sir function not found HOT 2
- Possibility of adding EUCAST ECOFF values HOT 9
- Add Ukrainian translation HOT 7
- Azithromycin vs Salmonella spp. HOT 6
- Report ATU of EUCAST guidelines HOT 1
- Add confidence intervals for AMR calculation HOT 2
- Candida auris mapped to only Candida by as.mo() HOT 6
- Getting Error: RStudio not running after `mo_uncertainties()` HOT 1
- No support for coercing antivirals HOT 1
- mdro function giving error for Table 5 Acinetobacter HOT 6
- Gram stain does not recognise Actinomycetota
- Incorporate new GBIF backbone HOT 1
- Antibiotic resistance prediction challenge 1 HOT 2
- Add Bartlett et al. (2022) for human pathogenicity? HOT 1
- Add `mo_pathogenicity()` HOT 1
- EUCAST rules where there shouldn't be interpretations HOT 3
- g.test doesn't handle zero counts HOT 4
- set body site for SIR intepretation HOT 6
- strange results, when using first isolate() HOT 3
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.