transforms all numeric strings to numbers keeping non-numeric

gentle_as_numeric(chr_vector)

Arguments

chr_vector

character vector or list

Value

list with numerics and character 1d objects

Details

transform all numeric strings to numbers keeping non-numeric, returns a list.

Examples

gentle_as_numeric(c("5", "ggg", "'sss'"))
#> [[1]] #> [1] 5 #> #> [[2]] #> [1] "ggg" #> #> [[3]] #> [1] "'sss'" #>