mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 11:51:59 +02:00
(v1.4.0.9008) like variations
This commit is contained in:
12
man/like.Rd
12
man/like.Rd
@ -3,8 +3,10 @@
|
||||
\name{like}
|
||||
\alias{like}
|
||||
\alias{\%like\%}
|
||||
\alias{\%not_like\%}
|
||||
\alias{\%like_case\%}
|
||||
\title{Pattern Matching}
|
||||
\alias{\%not_like_case\%}
|
||||
\title{Pattern matching with keyboard shortcut}
|
||||
\source{
|
||||
Idea from the \href{https://github.com/Rdatatable/data.table/blob/master/R/like.R}{\code{like} function from the \code{data.table} package}
|
||||
}
|
||||
@ -13,7 +15,11 @@ like(x, pattern, ignore.case = TRUE)
|
||||
|
||||
x \%like\% pattern
|
||||
|
||||
x \%not_like\% pattern
|
||||
|
||||
x \%like_case\% pattern
|
||||
|
||||
x \%not_like_case\% pattern
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{a character vector where matches are sought, or an object which can be coerced by \code{\link[=as.character]{as.character()}} to a character vector.}
|
||||
@ -37,7 +43,9 @@ The \verb{\%like\%} function:
|
||||
\item Tries again with \code{perl = TRUE} if regex fails
|
||||
}
|
||||
|
||||
Using RStudio? This function can also be inserted from the Addins menu and can have its own Keyboard Shortcut like \code{Ctrl+Shift+L} or \code{Cmd+Shift+L} (see \code{Tools} > \verb{Modify Keyboard Shortcuts...}).
|
||||
Using RStudio? This function can also be inserted in your code from the Addins menu and can have its own Keyboard Shortcut like \code{Ctrl+Shift+L} or \code{Cmd+Shift+L} (see \code{Tools} > \verb{Modify Keyboard Shortcuts...}). This addin iterates over all 'like' variants. So if you have defined the keyboard shortcut Ctrl/Cmd + L to this addin, it will first insert \verb{\%like\%} and by pressing it again it will be replaced with \verb{\%not_like\%}, then \verb{\%like_case\%}, then \verb{\%not_like_case\%} and then back to \verb{\%like\%}.
|
||||
|
||||
The \code{"\%not_like\%"} and \code{"\%not_like_case\%"} functions are wrappers around \code{"\%like\%"} and \code{"\%like_case\%"}.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
|
||||
|
@ -57,9 +57,9 @@ mo_type(x, language = get_locale(), ...)
|
||||
|
||||
mo_gramstain(x, language = get_locale(), ...)
|
||||
|
||||
is_gram_negative(x, ...)
|
||||
is_gram_negative(x, language = get_locale(), ...)
|
||||
|
||||
is_gram_positive(x, ...)
|
||||
is_gram_positive(x, language = get_locale(), ...)
|
||||
|
||||
mo_snomed(x, language = get_locale(), ...)
|
||||
|
||||
@ -84,7 +84,7 @@ mo_property(x, property = "fullname", language = get_locale(), ...)
|
||||
\arguments{
|
||||
\item{x}{any character (vector) that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}}
|
||||
|
||||
\item{language}{language of the returned text, defaults to system language (see \code{\link[=get_locale]{get_locale()}}) and can be overwritten by setting the option \code{AMR_locale}, e.g. \code{options(AMR_locale = "de")}, see \link{translate}. Use \code{language = NULL} or \code{language = ""} to prevent translation.}
|
||||
\item{language}{language of the returned text, defaults to system language (see \code{\link[=get_locale]{get_locale()}}) and can be overwritten by setting the option \code{AMR_locale}, e.g. \code{options(AMR_locale = "de")}, see \link{translate}. Also used to translate text like "no growth". Use \code{language = NULL} or \code{language = ""} to prevent translation.}
|
||||
|
||||
\item{...}{other parameters passed on to \code{\link[=as.mo]{as.mo()}}, such as 'allow_uncertain' and 'ignore_pattern'}
|
||||
|
||||
|
Reference in New Issue
Block a user