less deps

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2019-01-27 19:30:40 +01:00
1 parent a2d3ea280a
commit e76961a66b
27 files changed
+44 -40

No files matched your search

+5 -1
View File
@@ -19,7 +19,7 @@
# Visit our website for more info: https://msberends.gitab.io/AMR. #
# ==================================================================== #
#' Properties of an ATC code
#' Get ATC properties from WHOCC website
#'
#' Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit. \cr \strong{This function requires an internet connection.}
#' @param atc_code a character or character vector with ATC code(s) of antibiotic(s)
@@ -78,6 +78,10 @@ atc_online_property <- function(atc_code,
administration = 'O',
url = 'https://www.whocc.no/atc_ddd_index/?code=%s&showdescription=no') {
if (!all(c("curl", "rvest", "xml2") %in% rownames(installed.packages()))) {
stop("Packages 'xml2', 'rvest' and 'curl' are required for this function")
}
# check active network interface, from https://stackoverflow.com/a/5078002/4575331
has_internet <- function(url) {
# extract host from given url
+1 -1
View File
@@ -19,7 +19,7 @@
# Visit our website for more info: https://msberends.gitab.io/AMR. #
# ==================================================================== #
#' AMR bar plots with \code{ggplot}
#' AMR plots with \code{ggplot2}
#'
#' Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal \code{\link[ggplot2]{ggplot}} functions.
#' @param data a \code{data.frame} with column(s) of class \code{"rsi"} (see \code{\link{as.rsi}})