is_whole | R Documentation |
Check if a vector might be coercible to integer
is_whole(x)
maybe_int(x)
x |
A numeric vector. |
Take the results from these function with caution, as floating
point precision can affect rounding. They are intended to be used
for deciding what col_type
to choose for a column in a delimited
file when processing it with readr functions. If the original
data is not an integer, readr will issue parsing errors.
A single logical.
is_whole()
: Check if vector only has whole values. Return
TRUE
for whole values larger than the largest integer which can
be represented.
maybe_int()
: Check if a vector can be coerced to integer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.