pointblank icon indicating copy to clipboard operation
pointblank copied to clipboard

Accomodate data.table sources including iDate type

Open cfljam opened this issue 3 years ago • 1 comments

Prework

Proposal

Fantastic package! As requested in some other isues, I would like to validate my data in data.tables. Currently the draft_validation fails on the IDate type

R> DT <- data.table(date=as.Date(c("2016-05-26", "2016-04-20", "2016-06-01", "2015-06-05", "2015-06-05")),var=seq(1:5))
R> pointblank::draft_validation(DT,overwrite = T)
✓ The pointblank .R file has been written to `/home/cfljam/DT.R`
R> DT <- data.table(date=as.IDate(c("2016-05-26", "2016-04-20", "2016-06-01", "2015-06-05", "2015-06-05")),var=seq(1:5))
R> pointblank::draft_validation(DT,overwrite = T)
Error in if (column_role == "integer.discrete") { : 
  missing value where TRUE/FALSE needed

cfljam avatar Sep 08 '21 20:09 cfljam

We can definitely fix this, thanks for reporting!

Also, if you don’t mind me asking, are things generally working well with data.table tables throughout this package? We don’t do a lot of testing of pointblank + data.table but I would like to determine if it needs more work.

rich-iannone avatar Sep 09 '21 22:09 rich-iannone