Skip to contents

This function removes any range values (i.e., values containing <, >, or =) from an object of class mic (from the AMR package). It only modifies the object if it is of class mic.

Usage

stripRangeValues(x)

Arguments

x

A vector, such as MIC or disk diffusion values.

Value

If the input was a mic object (from the AMR package), any values expressed as ranges will be removed before returning (ie if all are ranges, the returned object will be empty). If not a mic object, the input vector will be returned unmodified.

Examples

# Example usage
x <- AMR::as.mic(c("0.5", "0.25", "1", "0.5", "<0.5", ">=0.25", ">0.25"))
stripRangeValues(x)
#> Class 'mic'
#> [1] 0.5  0.25 1    0.5 

x <- AMR::as.disk(c(32,35,31,16,12))
stripRangeValues(x)
#> Class 'disk'
#> [1] 32 35 31 16 12