-
Notifications
You must be signed in to change notification settings - Fork 292
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
The example:
library(tidyverse)
x <- tribble(
~unit, ~value,
"a" , "1",
"b" , "(NA)")
write_tsv(x, path = "test.tsv")
Now try and parse with the incorrect NA specification (in the real application it's not obvious exactly what represents NA).
new_x <- read_tsv("test.tsv",
na = "",
col_types = cols(
unit = col_character(),
value = col_number()
))
file.remove("test.tsv")
problems(new_x)
# A tibble: 1 × 4
# row col expected actual
# <int> <chr> <chr> <chr>
# 1 2 value a number
I would have expected this to come up:
# A tibble: 1 × 4
# row col expected actual
# <int> <chr> <chr> <chr>
# 1 2 value a number (NA)
Is this the expected behavior?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior