Column types

readr provides a total of nine column types for you to use:

  • col_logical() and col_double().

  • col_integer() Reading integers explicitly can be useful, they occupy half the memory of doubles.

  • col_character() reads strings, i.e., long series of digits but doesn’t make sense to apply mathematical operations to, i.e. phone numbers, social security numbers, credit card numbers, etc.

  • col_factor(), col_date(), and col_datetime() create factors, dates, and date-times respectively.

  • col_number() is a permissive numeric parser particularly useful for currencies.

  • col_skip() skips a column so it’s not included in the result.