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

Fix error True/False is expected but vector is received in assertion #17

Merged
merged 1 commit into from Jan 11, 2017

Conversation

@andreyto
Copy link

@andreyto andreyto commented Nov 11, 2016

The previous code was always triggering an exception (R 3.3.1) when evaluating the if() statement because a vector was used on the right hand side of a logical && predicate. Additionally, the logical predicate itself was incorrect according to the meaning of the error message in the stop() call.
Also, the modified expression is now more generic because it allows for the presence of other names in the res list in addition to the two names that are required to be present.

@hofnerb
Copy link
Owner

@hofnerb hofnerb commented Jan 11, 2017

Thank you for the fix. I have to say that I did not see an exception (under R 3.3.2 and earlier versions) but you are right that the old code does not test the stated.

Note that I will merge your pull request but loosen the check afterwards as it is sufficient that $selected is present, while $paths is only a nice to have.

@hofnerb hofnerb merged commit ac209e8 into hofnerb:master Jan 11, 2017
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.