prep_robust_guess_data_type {dataquieR} | R Documentation |
Guess the data type of a vector
Description
Guess the data type of a vector
Usage
prep_robust_guess_data_type(x, k = 50, it = 200)
Arguments
x |
a vector with characters |
k |
numeric sample size, if less than |
it |
integer number of iterations when taking samples |
Value
a guess of the data type of x
. An attribute orig_type
is also
attached to give the more detailed guess returned by readr::guess_parser()
.
Algorithm
This function takes x
and tries to guess the data type of random subsets of
this vector using readr::guess_parser()
. The RNG is initialized with a
constant, so the function stays deterministic. It does such sub-sample based
checks it
times, the majority of the detected datatype determines the
guessed data type.
[Package dataquieR version 2.5.1 Index]