1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-26 18:46:13 +01:00
AMR/man/availability.Rd

34 lines
1.1 KiB
Plaintext
Raw Normal View History

2019-02-04 12:24:07 +01:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/availability.R
\name{availability}
\alias{availability}
\title{Check Availability of Columns}
2019-02-04 12:24:07 +01:00
\usage{
2019-03-26 15:34:04 +01:00
availability(tbl, width = NULL)
2019-02-04 12:24:07 +01:00
}
\arguments{
\item{tbl}{a \link{data.frame} or \link{list}}
2019-03-26 15:34:04 +01:00
\item{width}{number of characters to present the visual availability - the default is filling the width of the console}
2019-02-04 12:24:07 +01:00
}
\value{
\link{data.frame} with column names of \code{tbl} as row names
2019-02-04 12:24:07 +01:00
}
\description{
Easy check for data availability of all columns in a data set. This makes it easy to get an idea of which antimicrobial combinations can be used for calculation with e.g. \code{\link[=susceptibility]{susceptibility()}} and \code{\link[=resistance]{resistance()}}.
2019-08-25 22:53:22 +02:00
}
\details{
The function returns a \link{data.frame} with columns \code{"resistant"} and \code{"visual_resistance"}. The values in that columns are calculated with \code{\link[=resistance]{resistance()}}.
2019-02-04 12:24:07 +01:00
}
\examples{
availability(example_isolates)
2021-05-24 09:00:11 +02:00
\donttest{
if (require("dplyr")) {
example_isolates \%>\%
2022-08-27 20:49:37 +02:00
filter(mo == as.mo("Escherichia coli")) \%>\%
2023-01-21 23:47:20 +01:00
select_if(is.sir) \%>\%
availability()
2019-02-04 12:24:07 +01:00
}
2020-05-16 21:40:50 +02:00
}
2021-05-24 09:00:11 +02:00
}