mirror of
				https://github.com/msberends/AMR.git
				synced 2025-10-31 04:08:15 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			582 B
		
	
	
	
		
			R
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			582 B
		
	
	
	
		
			R
		
	
	
		
			Executable File
		
	
	
	
	
| context("mdro.R")
 | |
| 
 | |
| 
 | |
| test_that("MDRO works", {
 | |
|   library(dplyr)
 | |
| 
 | |
|   outcome <- MDRO(septic_patients, "EUCAST", info = FALSE)
 | |
|   # check class
 | |
|   expect_equal(outcome %>% class(), c('ordered', 'factor'))
 | |
| 
 | |
|   outcome <- MDRO(septic_patients, "nl", info = FALSE)
 | |
|   # check class
 | |
|   expect_equal(outcome %>% class(), c('ordered', 'factor'))
 | |
| 
 | |
|   # septic_patients should have these finding using Dutch guidelines
 | |
|   expect_equal(outcome %>% freq(as.data.frame = TRUE) %>% pull(count), c(3, 21))
 | |
| 
 | |
|   expect_equal(BRMO(septic_patients, info = FALSE), MDRO(septic_patients, "nl", info = FALSE))
 | |
| 
 | |
| })
 |