mllg / checkmate

Fast and versatile argument checks
https://mllg.github.io/checkmate/
Other
261 stars 30 forks source link

testScalarNA and data.table #245

Closed DirkAmp closed 11 months ago

DirkAmp commented 11 months ago

R 4.2.2 data.table 1.14.8 checkmate 2.2.0

Hallo Michel,

using checkmate function testScalarNA on a data.table object returns the following warning:

In length(x) != 1L || !is.na(x) :
  'length(x) = 2 > 1' in coercion to 'logical(1)'

Reproduction via:

dt = data.table(x = 1:2)
testScalarNA(dt)

Is this a bug or did I do something wrong?

All the best Dirk

mllg commented 11 months ago

Fixed via #246.