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

Change unclear errors to specific warning when no packages are specified #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LukasWallrich
Copy link

I am currently using pacman while teaching a course on reproducible research and the students find it very helpful - so thank you for this great package. However, novices make creative mistakes that currently result in unclear error messages, while the intended behaviour seems different.

Specifically, calling p_load() results in Error in match.call(expand.dots = FALSE)[[2]] : subscript out of bounds, while p_load(character.only = TRUE) results in Error in if (p_loaded(char = package)) { : argument is not interpretable as logical

The intended behaviour of the code seems to be to just return invisible()? In the first set of edits, I enable it to reach that condition. However, it would seem likely that these calls are usually mistakes, so that a warning would be helpful? I have added that in line 58. With this, I hope to be able to make a small contribution - of course, I am happy for you to address this in any other way as well.

I am currently using `pacman` while teaching a course on reproducible research and the students find it very helpful - so thank you for this great package. However, novices make creative mistakes that currently result in unclear error messages, while the intended behaviour seems different. 

Specifically, calling `p_load()` results in `Error in match.call(expand.dots = FALSE)[[2]] : subscript out of bounds`, while `p_load(character.only = TRUE)` results in ` Error in if (p_loaded(char = package)) { :  argument is not interpretable as logical` 

The intended behaviour of the code seems to be to just return invisible()? In the first set of edits, I enable it to reach that condition.  However, it would seem likely that these calls are usually mistakes, so that a warning would be helpful? I have added that in line 58. With this, I hope to be able to make a small contribution - of course, I am happy for you to address this in any other way as well.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 6ff4e61 on LukasWallrich:patch-1 into ace0936 on trinker:master.

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.

2 participants