mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 06:46:11 +01:00
freq fix
This commit is contained in:
parent
5eda991c47
commit
c3ae6b7699
@ -69,6 +69,7 @@ R-release:
|
||||
- '*.Rcheck/*'
|
||||
expire_in: '1 month'
|
||||
cache:
|
||||
when: always
|
||||
key: "r350"
|
||||
paths:
|
||||
- installed_deps/
|
||||
@ -99,6 +100,7 @@ R-devel:
|
||||
- '*.Rcheck/*'
|
||||
expire_in: '1 month'
|
||||
cache:
|
||||
when: always
|
||||
key: "r360"
|
||||
paths:
|
||||
- installed_deps/
|
||||
|
@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 0.6.1.9003
|
||||
Date: 2019-05-16
|
||||
Date: 2019-05-17
|
||||
Title: Antimicrobial Resistance Analysis
|
||||
Authors@R: c(
|
||||
person(
|
||||
|
10
R/freq.R
10
R/freq.R
@ -585,10 +585,12 @@ format_header <- function(x, markdown = FALSE, decimal.mark = ".", big.mark = ",
|
||||
# FORMATTING
|
||||
# rsi
|
||||
if (has_length == TRUE & any(x_class == "rsi")) {
|
||||
ab <- tryCatch(as.ab(attributes(x)$opt$vars), error = function(e) NA)
|
||||
if (!is.na(ab) & isTRUE(length(ab) > 0)) {
|
||||
header$drug <- paste0(ab_name(ab[1L]), " (", ab[1L], ", ", ab_atc(ab[1L]), ")")
|
||||
header$group <- ab_group(ab[1L])
|
||||
if (!is.null(attributes(x)$opt$vars)) {
|
||||
ab <- tryCatch(as.ab(attributes(x)$opt$vars), error = function(e) NA)
|
||||
if (!is.na(ab) & isTRUE(length(ab) > 0)) {
|
||||
header$drug <- paste0(ab_name(ab[1L]), " (", ab[1L], ", ", ab_atc(ab[1L]), ")")
|
||||
header$group <- ab_group(ab[1L])
|
||||
}
|
||||
}
|
||||
header$`%SI` <- percent(header$count_SI / (header$count_SI + header$count_R),
|
||||
force_zero = TRUE, round = digits, decimal.mark = decimal.mark)
|
||||
|
@ -259,6 +259,8 @@
|
||||
|
||||
<span class='fu'>ab_ddd</span>(<span class='no'>x</span>, <span class='kw'>administration</span> <span class='kw'>=</span> <span class='st'>"oral"</span>, <span class='kw'>units</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>ab_info</span>(<span class='no'>x</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>ab_property</span>(<span class='no'>x</span>, <span class='kw'>property</span> <span class='kw'>=</span> <span class='st'>"name"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='no'>...</span>)</pre>
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
|
@ -379,7 +379,7 @@
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="ab_property.html">ab_name()</a></code> <code><a href="ab_property.html">ab_atc()</a></code> <code><a href="ab_property.html">ab_cid()</a></code> <code><a href="ab_property.html">ab_synonyms()</a></code> <code><a href="ab_property.html">ab_tradenames()</a></code> <code><a href="ab_property.html">ab_group()</a></code> <code><a href="ab_property.html">ab_atc_group1()</a></code> <code><a href="ab_property.html">ab_atc_group2()</a></code> <code><a href="ab_property.html">ab_ddd()</a></code> <code><a href="ab_property.html">ab_property()</a></code> </p>
|
||||
<p><code><a href="ab_property.html">ab_name()</a></code> <code><a href="ab_property.html">ab_atc()</a></code> <code><a href="ab_property.html">ab_cid()</a></code> <code><a href="ab_property.html">ab_synonyms()</a></code> <code><a href="ab_property.html">ab_tradenames()</a></code> <code><a href="ab_property.html">ab_group()</a></code> <code><a href="ab_property.html">ab_atc_group1()</a></code> <code><a href="ab_property.html">ab_atc_group2()</a></code> <code><a href="ab_property.html">ab_ddd()</a></code> <code><a href="ab_property.html">ab_info()</a></code> <code><a href="ab_property.html">ab_property()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Property of an antibiotic</p></td>
|
||||
</tr><tr>
|
||||
|
Loading…
Reference in New Issue
Block a user