mlr-org / ParamHelpers

Helpers for parameters in black-box optimization, tuning and machine learning.
https://paramhelpers.mlr-org.com
Other
25 stars 9 forks source link

dfRowsToList changes NA_real_ to NA_logical #203

Open jakob-r opened 5 years ago

jakob-r commented 5 years ago
df = data.frame(u = c(NA_real_, NA_real_), x = 1:2)
ps = makeParamSet(
    makeNumericParam("u"),
    makeIntegerParam("x")
)
x = dfRowToList(df, ps, 1L, enforce.col.types = TRUE)
expect_equal(x, list(u = NA_real_, x = 1L))