EVOLUTION-MANAGER
Edit File: parse_guess.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: Parse using the "best" type</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 parse_guess {readr}"><tr><td>parse_guess {readr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Parse using the "best" type</h2> <h3>Description</h3> <p><code>parse_guess()</code> returns the parser vector; <code>guess_parser()</code> returns the name of the parser. These functions use a number of heuristics to determine which type of vector is "best". Generally they try to err of the side of safety, as it's straightforward to override the parsing choice if needed. </p> <h3>Usage</h3> <pre> parse_guess(x, na = c("", "NA"), locale = default_locale(), trim_ws = TRUE, guess_integer = FALSE) col_guess() guess_parser(x, locale = default_locale(), guess_integer = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>Character vector of values to parse.</p> </td></tr> <tr valign="top"><td><code>na</code></td> <td> <p>Character vector of strings to interpret as missing values. Set this option to <code>character()</code> to indicate no missing values.</p> </td></tr> <tr valign="top"><td><code>locale</code></td> <td> <p>The locale controls defaults that vary from place to place. The default locale is US-centric (like R), but you can use <code><a href="locale.html">locale()</a></code> to create your own locale that controls things like the default time zone, encoding, decimal mark, big mark, and day/month names.</p> </td></tr> <tr valign="top"><td><code>trim_ws</code></td> <td> <p>Should leading and trailing whitespace be trimmed from each field before parsing it?</p> </td></tr> <tr valign="top"><td><code>guess_integer</code></td> <td> <p>If <code>TRUE</code>, guess integer types for whole numbers, if <code>FALSE</code> guess numeric type for all numbers.</p> </td></tr> </table> <h3>See Also</h3> <p>Other parsers: <code><a href="col_skip.html">col_skip</a></code>, <code><a href="spec.html">cols_condense</a></code>, <code><a href="cols.html">cols</a></code>, <code><a href="parse_datetime.html">parse_datetime</a></code>, <code><a href="parse_factor.html">parse_factor</a></code>, <code><a href="parse_atomic.html">parse_logical</a></code>, <code><a href="parse_number.html">parse_number</a></code>, <code><a href="parse_vector.html">parse_vector</a></code> </p> <h3>Examples</h3> <pre> # Logical vectors parse_guess(c("FALSE", "TRUE", "F", "T")) # Integers and doubles parse_guess(c("1","2","3")) parse_guess(c("1.6","2.6","3.4")) # Numbers containing grouping mark guess_parser("1,234,566") parse_guess("1,234,566") # ISO 8601 date times guess_parser(c("2010-10-10")) parse_guess(c("2010-10-10")) </pre> <hr /><div style="text-align: center;">[Package <em>readr</em> version 1.3.1 <a href="00Index.html">Index</a>]</div> </body></html>