This internal function casts a character vector to integer, if the character vector only contains digits for entries. If the input vector is not of type character or if any entry contains a non-digit, then the vector is returned unmodified.
try_cast_integer(values)an integer vector if conversion succeeds; otherwise, the original vector.
a vector of values to attempt conversion to integer.