Closed jakobbossek closed 8 years ago
I would like to extend ensurevector in the following sense:
ensurevector
cl
ensureVector(x, n = 1L, cl = c("A", "B"))
ensureVector
ensureVector("classif.rpart", n = 1L, cl = "character") # vector ensureVector(makeLearner("classif.rpart"), n = 1L, cl = "Learner") # list
Sometimes we want a list in any case. So my proposal is to add a logical flag ensure.list with default FALSE.
ensure.list
FALSE
i like what you say.
i would suggest also:
do a PR?
Jup. PR incoming soon 😉
Done via merged PR #63.
Thanks for merging.
I would like to extend
ensurevector
in the following sense:cl
should accept multiple classes:ensureVector
does kind of a simplification of the output.Sometimes we want a list in any case. So my proposal is to add a logical flag
ensure.list
with defaultFALSE
.