EVOLUTION-MANAGER
Edit File: showNonASCII.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: Pick Out Non-ASCII Characters</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 showNonASCII {tools}"><tr><td>showNonASCII {tools}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Pick Out Non-ASCII Characters</h2> <h3>Description</h3> <p>This function prints elements of a character vector which contain non-ASCII bytes, printing such bytes as a escape like <span class="samp"><fc></span>. </p> <h3>Usage</h3> <pre> showNonASCII(x) showNonASCIIfile(file) </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>file</code></td> <td> <p>path to a file.</p> </td></tr> </table> <h3>Details</h3> <p>This was originally written to help detect non-portable text in files in packages. </p> <p>It prints all element of <code>x</code> which contain non-ASCII characters, preceded by the element number and with non-ASCII bytes highlighted <em>via</em> <code><a href="../../base/html/iconv.html">iconv</a>(sub = "byte")</code>. </p> <h3>Value</h3> <p>The elements of <code>x</code> containing non-ASCII characters will be returned invisibly. </p> <h3>Examples</h3> <pre> out <- c( "fa\xE7ile test of showNonASCII():", "\\details{", " This is a good line", " This has an \xfcmlaut in it.", " OK again.", "}") f <- tempfile() cat(out, file = f, sep = "\n") showNonASCIIfile(f) unlink(f) </pre> <hr /><div style="text-align: center;">[Package <em>tools</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>