alan-turing-institute / eider

eider: an R package for processing health records declaratively
https://alan-turing-institute.github.io/eider/
Other
2 stars 0 forks source link

what happens with empty csv entries #54

Closed yongrenjie closed 7 months ago

yongrenjie commented 7 months ago
$ cat test.csv
id,name,age
1,Annie,1
2,Bart,2
3,Charlie,3
4,Danny
5,,5

$ R
> dplyr::glimpse(read.csv('test.csv'))
Rows: 5
Columns: 3
$ id   <int> 1, 2, 3, 4, 5
$ name <chr> "Annie", "Bart", "Charlie", "Danny", ""
$ age  <int> 1, 2, 3, NA, 5

Okay, so string columns become empty strings and int ones are NA.

yongrenjie commented 7 months ago

I think it's the user's responsibility to deal with problems in their data --- there are too many variations on this theme that we cannot handle ...