getSimplifiedAbx: Simplify the full antibiotic susceptibility / resistance...

View source: R/bacdive_extract.R

getSimplifiedAbxR Documentation

Simplify the full antibiotic susceptibility / resistance information

Description

Simplify the full antibiotic susceptibility / resistance information

Usage

getSimplifiedAbx(
  data = bacdive_abx,
  extra_info = F,
  most_common = T,
  remove_unknown = T
)

Arguments

data

A dataframe of antibiotic susceptibility / resistance information from getAbx.

extra_info

Whether to return some extra info for testing purposes. This will include the columns 'is resistant', 'is_sensitive', and 'diameter'.

most_common

The function will take the most common value for any given antibiotic / species combination. See details.

remove_unknown

Remove antibiotic / species combinations where the resistance / sensitivity information is unknown or variable.

Details

Hypothetically, a species might have 50 strains that are resistant to Penicillin and 25 strains that are sensitive. With 'most_common = T' the function will collapse the results to the most common value. Thus, the returned dataframe will have this species as being resistant to Penicillin.

Value

A simplified dataframe of antibiotic susceptibility / resistance information.

Examples

## Not run: 
bacdive_susceptibility <- getSimplifiedAbx(bacdive_abx)

## End(Not run)

scottdaniel/bacphene documentation built on March 25, 2023, 12:51 p.m.