Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

order of named parameters matters in isFeasible #172

Open
maierhofert opened this issue Mar 28, 2017 · 2 comments
Open

order of named parameters matters in isFeasible #172

maierhofert opened this issue Mar 28, 2017 · 2 comments

Comments

@maierhofert
Copy link

maierhofert commented Mar 28, 2017

The order of the parameters in par and x makes a difference. I think it would be nice, if the parameter values and the parameters set would be matched by name. See the minimal example:

# minimal example for isFeasible
par.set = makeParamSet(
  makeIntegerParam(id = "int", default = 1L),
  makeLogicalParam(id = "logic", default = TRUE)
)

# this works
par.list = list(int = 2L, logic = TRUE)
isFeasible(par.set, par.list)

# this does not work, but I think it should
par.list2 = list(logic = TRUE, int = 2L)
isFeasible(par.set, par.list2)
@berndbischl
Copy link
Member

i guess you are correct. this is also not documented properly.

but i am currently on holiday :)
so you might have to wait a bit

@maierhofert
Copy link
Author

Thank you. There is an easy work-around. Please take your time and don´t fix it while you are on holiday :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants