exceed_threshold.Rd
This function is primarily aimed to check if the transformation of a vector was successful enough to return the transformed value instead of the original.
exceed_threshold( original, transformed, threshold = 0.9, force = FALSE, ask = FALSE, var_name = "the input vector" )
original | the original vector |
---|---|
transformed | the transformed vector with NA-values for non transformed values |
threshold | is a numeric value in [0,1] specifying the proportion of
cells in |
force | Should a candidate vector (candidate according to
|
ask | this argument gives you the chance to interactively inspect your
data and specify if a column is a date or not,
on the fly. This is |
var_name | a name for the object to be used in messages (you could probably just leave this as default, NULL; it is mostly used for internal purposes!). |
Either original
or transformed
.
#>#> [1] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" #> [6] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" "foo"#> Warning: the input vector coerced to Date with foo set to NA!#> [1] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" #> [6] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" NA#>#> [1] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" #> [6] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" "foo"#> [1] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" #> [6] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" "foo"#> Warning: bar coerced to Date with foo set to NA!#> [1] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" #> [6] "2012-01-01" "2012-01-01" "2012-01-01" "2012-01-01" NA#>#> [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "baz"