* Functions `is_gram_negative()` and `is_gram_positive()` as wrappers around `mo_gramstain()`. They always return `TRUE` or `FALSE` (except when the input is `NA` or the MO code is `UNKNOWN`), thus always return `FALSE` for species outside the taxonomic kingdom of Bacteria. If you have the `dplyr` package installed, they can even determine the column with microorganisms themselves inside `dplyr` functions:
@ -18,7 +18,7 @@
* Fix for using parameter `reference_df` in `as.mo()` and `mo_*()` functions that contain old microbial codes (from previous package versions)
### Other
* All messages thrown by this package now have correct line breaks
* All messages and warnings thrown by this package now break sentences on whole words
cat(font_red("\nSkipping inheritance rules defined by this package, such as setting trimethoprim (TMP) = R where trimethoprim/sulfamethoxazole (SXT) = R.\nUse eucast_rules(..., rules = \"all\") to also apply those rules.\n"))
message_("\n\nSkipping inheritance rules defined by this package, such as setting trimethoprim (TMP) = R where trimethoprim/sulfamethoxazole (SXT) = R.",
as_note=FALSE,
add_fn=font_red)
message_("Use eucast_rules(..., rules = \"all\") to also apply those rules.",
if (verbose==FALSE&total_n_added+total_n_changed>0){
cat(paste("\nUse",font_bold("eucast_rules(..., verbose = TRUE)"),"(on your original data) to get a data.frame with all specified edits instead.\n\n"))
cat("\n",word_wrap("Use",font_bold("eucast_rules(..., verbose = TRUE)"),"(on your original data) to get a data.frame with all specified edits instead."),"\n\n",sep="")
}elseif (verbose==TRUE){
cat(paste0("\nUsed 'Verbose mode' (",font_bold("verbose = TRUE"),"), which returns a data.frame with all specified edits.\nUse ",font_bold("verbose = FALSE")," to apply the rules on your data.\n\n"))
cat("\n",word_wrap("Used 'Verbose mode' (",font_bold("verbose = TRUE"),"), which returns a data.frame with all specified edits.\nUse ",font_bold("verbose = FALSE")," to apply the rules on your data."),"\n\n",sep="")
warning('Value "',to,'" added to the factor levels of column(s) `',paste(cols,collapse="`, `"),"` because this value was not an existing factor level.\nA better way is to use as.rsi() on beforehand on antimicrobial columns to guarantee the right structure.",call.=FALSE)
suppressWarnings(new_edits[rows,cols]<<-to)
warning_('Value "',to,'" added to the factor levels of column(s) `',paste(cols,collapse="`, `"),"` because this value was not an existing factor level.A better way is to use as.rsi() on beforehand on antimicrobial columns to guarantee the right structure.",call=FALSE)
txt_warning()
warned<-FALSE
}else{
warning(w$message,call.=FALSE)
warning_(w$message,call=FALSE)
txt_warning()
cat("\n")# txt_warning() does not append a "\n" on itself
warning("Be sure to first calculate the resistance (or susceptibility) of variables with antimicrobial test results, since PCA works with numeric variables only. Please see Examples in ?pca.")
warning_("Be sure to first calculate the resistance (or susceptibility) of variables with antimicrobial test results, since PCA works with numeric variables only. Please see Examples in ?pca.")
warning("Interpretation of ",font_bold(ab_name(ab,tolower=TRUE))," for some microorganisms is only available for (uncomplicated) urinary tract infections (UTI).\n Use parameter 'uti' to set which isolates are from urine. See ?as.rsi.",call.=FALSE)
warning_("Interpretation of ",font_bold(ab_name(ab,tolower=TRUE))," for some microorganisms is only available for (uncomplicated) urinary tract infections (UTI).\n Use parameter 'uti' to set which isolates are from urine. See ?as.rsi.",call=FALSE)
warned<-TRUE
}
for (iinseq_len(length(x))){
if (isTRUE(add_intrinsic_resistance)){
if (!guideline_coerced%like%"EUCAST"){
warning("Using 'add_intrinsic_resistance' is only useful when using EUCAST guidelines, since the rules for intrinsic resistance are based on EUCAST.",call.=FALSE)
warning_("Using 'add_intrinsic_resistance' is only useful when using EUCAST guidelines, since the rules for intrinsic resistance are based on EUCAST.",call=FALSE)
<p><em>July 2020</em><br><spanclass="fa fa-clipboard-list"style="color: #128f76; font-size: 20pt; margin-right: 5px;"></span><strong>PLEASE TAKE PART IN OUR SURVEY!</strong><br>
<p><spanclass="fa fa-clipboard-list"style="color: #128f76; font-size: 20pt; margin-right: 5px;"></span><strong>PLEASE TAKE PART IN OUR SURVEY!</strong><br>
Since you are one of our users, we would like to know how you use the package and what it brought you or your organisation. <strong>If you have a minute, please <ahref="./survey.html">anonymously fill in this short questionnaire</a></strong>. Your valuable input will help to improve the package and its functionalities. You can answer the open questions in either English, Spanish, French, Dutch, or German. Thank you very much in advance! <br><aclass="btn btn-info btn-amr"href="./survey.html">Take me to the 5-min survey!</a></p>
<ahref="#last-updated-9-november-2020"class="anchor"></a><small>Last updated: 9 November 2020</small>
<ahref="#last-updated-10-november-2020"class="anchor"></a><small>Last updated: 10 November 2020</small>
</h2>
<divid="new"class="section level3">
<h3class="hasAnchor">
@ -252,7 +252,7 @@
<p>Functions <code><ahref="../reference/mo_property.html">is_gram_negative()</a></code> and <code><ahref="../reference/mo_property.html">is_gram_positive()</a></code> as wrappers around <code><ahref="../reference/mo_property.html">mo_gramstain()</a></code>. They always return <code>TRUE</code> or <code>FALSE</code> (except when the input is <code>NA</code> or the MO code is <code>UNKNOWN</code>), thus always return <code>FALSE</code> for species outside the taxonomic kingdom of Bacteria. If you have the <code>dplyr</code> package installed, they can even determine the column with microorganisms themselves inside <code>dplyr</code> functions:</p>
<spanclass="co">#> NOTE: Using column `mo` as input for 'x'</span></pre></div>
</li>
<li><p>Functions <code><ahref="../reference/like.html">%not_like%</a></code> and <code><ahref="../reference/like.html">%not_like_case%</a></code> as wrappers around <code><ahref="../reference/like.html">%like%</a></code> and <code><ahref="../reference/like.html">%like_case%</a></code>. The RStudio addin to insert the text " %like% " as provided in this package now iterates over all like variants. So if you have defined the keyboard shortcut Ctrl/Cmd + L to this addin, it will first insert <code><ahref="../reference/like.html">%like%</a></code> and by pressing it again it will be replaced with <code><ahref="../reference/like.html">%not_like%</a></code>, etc.</p></li>
@ -273,7 +273,7 @@
<h3class="hasAnchor">
<ahref="#other"class="anchor"></a>Other</h3>
<ul>
<li>All messages thrown by this package now have correct line breaks</li>
<li>All messages and warnings thrown by this package now break sentences on whole words</li>
> <spanclass="fa fa-clipboard-list"style="color: #128f76; font-size: 20pt; margin-right: 5px;"></span>**PLEASE TAKE PART IN OUR SURVEY!**
> Since you are one of our users, we would like to know how you use the package and what it brought you or your organisation. **If you have a minute, please [anonymously fill in this short questionnaire](./survey.html)**. Your valuable input will help to improve the package and its functionalities. You can answer the open questions in either English, Spanish, French, Dutch, or German. Thank you very much in advance!