This may be too broad a topic to fit in these notes...
SO example: https://stackoverflow.com/q/55497478 This OP isn't compatible with my approach (of starting from fread CSV which applies type.convert, followed by vetr checks. INT.POS.STR can't test the OP's input since it uses numerics with NAs and so cannot be "integer-like")
This may be too broad a topic to fit in these notes...