EVOLUTION-MANAGER
Edit File: stri_unique.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Extract Unique Elements</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for stri_unique {stringi}"><tr><td>stri_unique {stringi}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Extract Unique Elements</h2> <h3>Description</h3> <p>This function returns a character vector like <code>str</code>, but with duplicate elements removed. </p> <h3>Usage</h3> <pre> stri_unique(str, ..., opts_collator = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>str</code></td> <td> <p>a character vector</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional settings for <code>opts_collator</code></p> </td></tr> <tr valign="top"><td><code>opts_collator</code></td> <td> <p>a named list with <span class="pkg">ICU</span> Collator's options, see <code><a href="stri_opts_collator.html">stri_opts_collator</a></code>, <code>NULL</code> for default collation options</p> </td></tr> </table> <h3>Details</h3> <p>As usual in <span class="pkg">stringi</span>, no attributes are copied. Unlike <code><a href="../../base/html/unique.html">unique</a></code>, this function tests for canonical equivalence of strings (and not whether the strings are just bytewise equal). Such an operation is locale-dependent. Hence, <code>stri_unique</code> is significantly slower (but much better suited for natural language processing) than its base R counterpart. </p> <p>See also <code><a href="stri_duplicated.html">stri_duplicated</a></code> for indicating non-unique elements. </p> <h3>Value</h3> <p>Returns a character vector. </p> <h3>References</h3> <p><em>Collation</em> - ICU User Guide, <a href="http://userguide.icu-project.org/collation">http://userguide.icu-project.org/collation</a> </p> <h3>See Also</h3> <p>Other locale_sensitive: <code><a href="oper_comparison.html">%s<%</a>()</code>, <code><a href="stri_compare.html">stri_compare</a>()</code>, <code><a href="stri_count_boundaries.html">stri_count_boundaries</a>()</code>, <code><a href="stri_duplicated.html">stri_duplicated</a>()</code>, <code><a href="stri_enc_detect2.html">stri_enc_detect2</a>()</code>, <code><a href="stri_extract_boundaries.html">stri_extract_all_boundaries</a>()</code>, <code><a href="stri_locate_boundaries.html">stri_locate_all_boundaries</a>()</code>, <code><a href="stri_opts_collator.html">stri_opts_collator</a>()</code>, <code><a href="stri_order.html">stri_order</a>()</code>, <code><a href="stri_sort.html">stri_sort</a>()</code>, <code><a href="stri_split_boundaries.html">stri_split_boundaries</a>()</code>, <code><a href="stri_trans_casemap.html">stri_trans_tolower</a>()</code>, <code><a href="stri_wrap.html">stri_wrap</a>()</code>, <code><a href="stringi-locale.html">stringi-locale</a></code>, <code><a href="stringi-search-boundaries.html">stringi-search-boundaries</a></code>, <code><a href="stringi-search-coll.html">stringi-search-coll</a></code> </p> <h3>Examples</h3> <pre> # normalized and non-Unicode-normalized version of the same code point: stri_unique(c("\u0105", stri_trans_nfkd("\u0105"))) unique(c("\u0105", stri_trans_nfkd("\u0105"))) stri_unique(c("gro\u00df", "GROSS", "Gro\u00df", "Gross"), strength=1) </pre> <hr /><div style="text-align: center;">[Package <em>stringi</em> version 1.4.6 <a href="00Index.html">Index</a>]</div> </body></html>