You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There were actually two separate issues going on here.
S4 classes need the methods package to be loaded and the default environment the expressions were evaulated in was baseenv(), which does not load methods.
If there was a error in evaluating no expression would be assigned to fun, so it would break when later body(fun) was run.
So the fix was to use globalenv() rather than baseenv() and to only continue the object usage checks if the evaluation did not error.
Thanks for the great package, it's a nice help with grading programming assignments in addition to its general usefulness.
However, if I try to run the default linters on
S4
code (here I just use some examples from themethods
-package to make this reproducible) I get:sessionInfo()
:The text was updated successfully, but these errors were encountered: