mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 03:40:48 +01:00
(v3.0.1.9116) New sir_combine() for combination therapy as one engine for antibiogram(), wisca(), count_*() and proportion_*() (#321), and make all suggested packages runtime-only with a new CI workflow without dplyr
- New sir_combine() to combine SIR results of multiple antimicrobials into one variable; antibiogram(), wisca() and the count/proportion functions now use the same engine (antibiogram() and wisca() output unchanged) - With multiple antimicrobials, count_*() and proportion_*() now follow the documented combination therapy rules: resistance() is the proportion of failing combinations, count_all() excludes isolates with an unknown combination result, and WT/NWT/NS/NI are handled correctly - where() is now decided at runtime instead of at installation, fixing antibiogram() and wisca() without tidyselect (e.g. CRAN binaries without dplyr) - Imports from data.table and cli moved to .onLoad(); data.table functions are only used while it is loaded; the like() example no longer unloads data.table, which crashed R - Static test that fails on code outside functions depending on suggested packages - New check-without-dplyr workflow: installs AMR with all suggested packages, removes dplyr (and tidyselect), then runs all unit tests and examples against the installed package - g.test() now returns the degrees of freedom as 'parameter', so they are printed - Fix R CMD check NOTEs (hidden .claude folder, lost braces in inherited g.test and ggplot_pca docs)
This commit is contained in:
1 parent
80afedeb8c
commit
53d0704271
30 files changed
+939
-268
No files matched your search
@@ -32,6 +32,7 @@
|
||||
#' Produces a `ggplot2` variant of a so-called [biplot](https://en.wikipedia.org/wiki/Biplot) for PCA (principal component analysis), but is more flexible and more appealing than the base \R [biplot()] function.
|
||||
#' @param x An object returned by [pca()], [prcomp()] or [princomp()].
|
||||
#' @inheritParams stats::biplot.prcomp
|
||||
#' @param pc.biplot If `TRUE`, use what Gabriel (1971) refers to as a 'principal component biplot', with `lambda = 1` and observations scaled up by `sqrt(n)` and variables scaled down by `sqrt(n)`. Then inner products between variables approximate covariances and distances between observations approximate Mahalanobis distance.
|
||||
#' @param labels An optional vector of labels for the observations. If set, the labels will be placed below their respective points. When using the [pca()] function as input for `x`, this will be determined automatically based on the attribute `non_numeric_cols`, see [pca()].
|
||||
#' @param labels_textsize The size of the text used for the labels.
|
||||
#' @param labels_text_placement Adjustment factor the placement of the variable names (`>=1` means further away from the arrow head).
|
||||
@@ -51,6 +52,7 @@
|
||||
#' @param arrows_alpha The alpha (transparency) of the arrows and their text.
|
||||
#' @param base_textsize The text size for all plot elements except the labels and arrows.
|
||||
#' @param ... Arguments passed on to functions.
|
||||
#' @references Gabriel, K.R. 1971. **The biplot graphical display of matrices with application to principal component analysis**. *Biometrika* 58(3):453-467. \doi{10.1093/biomet/58.3.453}
|
||||
#' @source The [ggplot_pca()] function is based on the `ggbiplot()` function from the `ggbiplot` package by Vince Vu, as found on GitHub: <https://github.com/vqv/ggbiplot> (retrieved: 2 March 2020, their latest commit: [`7325e88`](https://github.com/vqv/ggbiplot/commit/7325e880485bea4c07465a0304c470608fffb5d9); 12 February 2015).
|
||||
#'
|
||||
#' As per their GPL-2 licence that demands documentation of code changes, the changes made based on the source code were:
|
||||
|
||||
Reference in new issue
Block a user