Skip to content

read_csv fails to guess type of integer column  #1094

Closed
@tmalsburg

Description

@tmalsburg

The data has 73 rows and all entries in the last column are integers. Yet read_csv guesses col_double().

Example:

library(readr)
read_csv("nettle_1999_climate.csv") -> nettle

Results in:

Parsed with column specification:
cols(
  Country = col_character(),
  Population = col_double(),
  Area = col_double(),
  MGS = col_double(),
  Langs = col_double()
)

Last line should be Langs = col_integer().

This is using up-to-date readr from CRAN and R version 3.6.3 (2020-02-29).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions