openml / openml-r

R package to interface with OpenML
http://openml.github.io/openml-r/
Other
95 stars 37 forks source link

Warning when downloading Task 146800 #439

Closed mb706 closed 5 years ago

mb706 commented 5 years ago

this gives a warning because ignore.attribute can have length more than one so is.na() returns a length > 1 logical vector. An option would be isTRUE(is.na(...)), or remove the conditional entirely and just do

 data.desc$ignore.attribute = union(na.omit(data.desc$ignore.attribute),
    data.desc$row.id.attribute)

To reproduce:

> OpenML::getOMLTask(146800, verbosity = 0)
Warning in if (is.na(data.desc$ignore.attribute)) data.desc$ignore.attribute = data.desc$row.id.attribute else data.desc$ignore.attribute = c(data.desc$ignore.attribute,  :
  the condition has length > 1 and only the first element will be used