Skip to content

col_number() drops negatives #308

@gregmacfarlane

Description

@gregmacfarlane

If I don't request specific column types, then read_csv treats negative numbers appropriately.

readr::read_csv("A,B\n-4,5G")

##    A B
## 1 -4 5

If I specify that the column is numeric, then read_csv drops the negative signs.

readr::read_csv("A,B\n-4,5G", col_types = "nn")

##   A B
## 1 4 5

Metadata

Metadata

Assignees

Labels

bugan unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions