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

Solves base::rbind() issue when method is a list #113

Merged
merged 1 commit into from
Jun 27, 2018

Conversation

gerkovink
Copy link
Member

CHANGED added unlist() to the return in check.method().

Illustration of the problem
When method is a list, e.g.

meth <- make.method(mammalsleep)
meth <- as.list(meth)

this will generally have no different behaviour from method being a vector as meth[i] would yield the same result either way. However, when the system is computationally singular, the loggedEvents will be updated. Then, in that process, when base::rbind() is called it returns an error from the unexported match.names() function if method is a list.

@stefvanbuuren
Copy link
Member

OK, as a user convenience, and unlist cannot hurt. Even though it appears to work, we should not go any further and actually supporting the method argument as a list. Another route would be to actually intercept it.

@stefvanbuuren stefvanbuuren merged commit 6b30b6b into amices:master Jun 27, 2018
@gerkovink
Copy link
Member Author

Agreed and hence avoided in check.method(). No need for interception IMO as the help for the method argument specifically details use of either a single string or a vector of strings.

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

Successfully merging this pull request may close these issues.

None yet

2 participants