mirror of
https://github.com/msberends/AMR.git
synced 2025-07-17 15:13:15 +02:00
(v1.1.0.9004) lose dependencies
This commit is contained in:
@ -82,7 +82,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0.9004</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -260,13 +260,19 @@
|
||||
|
||||
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
|
||||
|
||||
<p>Idea from the <a href='https://github.com/Rdatatable/data.table/blob/master/R/like.R'><code>like</code> function from the <code>data.table</code> package</a>, but made it case insensitive at default and let it support multiple patterns. Also, if the regex fails the first time, it tries again with <code>perl = TRUE</code>.</p>
|
||||
<p>Idea from the <a href='https://github.com/Rdatatable/data.table/blob/master/R/like.R'><code>like</code> function from the <code>data.table</code> package</a></p>
|
||||
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
|
||||
|
||||
<p>A <code><a href='https://rdrr.io/r/base/logical.html'>logical</a></code> vector</p>
|
||||
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
|
||||
|
||||
<p>When running a regular expression fails, these functions try again with <code><a href='https://rdrr.io/r/base/grep.html'>base::grepl(..., perl = TRUE)</a></code>.</p>
|
||||
<p>The <code>%like%</code> function:</p><ul>
|
||||
<li><p>Is case insensitive (use <code>%like_case%</code> for case-sensitive matching)</p></li>
|
||||
<li><p>Supports multiple patterns</p></li>
|
||||
<li><p>Checks if <code>pattern</code> is a regular expression and sets <code>fixed = TRUE</code> if not, to greatly improve speed</p></li>
|
||||
<li><p>Tries again with <code>perl = TRUE</code> if regex fails</p></li>
|
||||
</ul>
|
||||
|
||||
<p>Using RStudio? This function can also be inserted from the Addins menu and can have its own Keyboard Shortcut like <code>Ctrl+Shift+L</code> or <code>Cmd+Shift+L</code> (see <code>Tools</code> > <code>Modify Keyboard Shortcuts...</code>).</p>
|
||||
<h2 class="hasAnchor" id="stable-lifecycle"><a class="anchor" href="#stable-lifecycle"></a>Stable lifecycle</h2>
|
||||
|
||||
@ -299,11 +305,11 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
<span class='no'>a</span> <span class='kw'>%like%</span> <span class='no'>b</span>
|
||||
<span class='co'>#> TRUE TRUE TRUE</span>
|
||||
|
||||
<span class='co'># get frequencies of bacteria whose name start with 'Ent' or 'ent'</span>
|
||||
<span class='co'># get isolates whose name start with 'Ent' or 'ent'</span>
|
||||
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<span class='no'>example_isolates</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='fu'><a href='mo_property.html'>mo_name</a></span>(<span class='no'>mo</span>) <span class='kw'>%like%</span> <span class='st'>"^ent"</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://rdrr.io/pkg/cleaner/man/freq.html'>freq</a></span>(<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='no'>mo</span>))</pre>
|
||||
<span class='fu'><a href='https://rdrr.io/pkg/cleaner/man/freq.html'>freq</a></span>(<span class='no'>mo</span>)</pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
|
||||
<nav id="toc" data-toggle="toc" class="sticky-top">
|
||||
@ -319,7 +325,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.0.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
Reference in New Issue
Block a user