EVOLUTION-MANAGER
Edit File: stri_remove_empty.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: Remove All Empty Strings from a Character Vector</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_remove_empty {stringi}"><tr><td>stri_remove_empty {stringi}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Remove All Empty Strings from a Character Vector</h2> <h3>Description</h3> <p><code>stri_remove_empty</code> (alias <code>stri_omit_empty</code>) removes all empty strings from a character vector, and, if <code>na_empty</code> is <code>TRUE</code>, also gets rid of all missing values. </p> <p><code>stri_remove_empty_na</code> (alias <code>stri_omit_empty_na</code>) removes both empty strings and missing values. </p> <p><code>stri_remove_na</code> (alias <code>stri_omit_na</code>) returns a version of <code>x</code> with missing values removed. </p> <h3>Usage</h3> <pre> stri_remove_empty(x, na_empty = FALSE) stri_omit_empty(x, na_empty = FALSE) stri_remove_empty_na(x) stri_omit_empty_na(x) stri_remove_na(x) stri_omit_na(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a character vector</p> </td></tr> <tr valign="top"><td><code>na_empty</code></td> <td> <p>should missing values be treated as empty strings?</p> </td></tr> </table> <h3>Value</h3> <p>Returns a character vector. </p> <h3>See Also</h3> <p>Other utils: <code><a href="stri_list2matrix.html">stri_list2matrix</a>()</code>, <code><a href="stri_na2empty.html">stri_na2empty</a>()</code>, <code><a href="stri_replace_na.html">stri_replace_na</a>()</code> </p> <h3>Examples</h3> <pre> stri_remove_empty(stri_na2empty(c("a", NA, "", "b"))) stri_remove_empty(c("a", NA, "", "b")) stri_remove_empty(c("a", NA, "", "b"), TRUE) stri_omit_empty_na(c("a", NA, "", "b")) </pre> <hr /><div style="text-align: center;">[Package <em>stringi</em> version 1.4.6 <a href="00Index.html">Index</a>]</div> </body></html>