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
Looks like it's the line var_name <- deparse(substitute(vec1)) in crosstab(), which in this case returns a vector of length 2 to assign to var_name.
Adding this immediately after var_name is assigned seems to fix it, and be safe; I will write a test for it and then merge in:
# an odd variable name can be deparsed into a vector of length >1, rare but breaks function, see issue #87
if(length(var_name) > 1){ var_name <- paste(var_name, collapse = "") }
It's the fault of the width.cutoff argument in deparse(): http://stackoverflow.com/q/41596098/4470365. I like the fix above as more robust than just increasing width.cutoff to a very high number. But maybe I should also increase it, if it would result in prettier results than the collapsed version?
Wildly obscure, but I found it when in the course of actual analysis I tried:
and got:
Here is a reprex:
The text was updated successfully, but these errors were encountered: