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
Found this bug today but haven't figured out a fix yet.
When calling the aggregate2 function with a trailing comma in the function arguments the call that is parsed in:
# -- capture dots as a call and parse dot names, adding default names if# -- they are missingagg_call<-if (enlist) substitute(list(...)) else substitute(...)
When enlist=TRUE results in a call where the last item is a missing argument. However, there is no class or type indications that allow this to be easily caught. As a result when there is a trailing comma in the call the error ends up appearing when trying to use the dot_call variable:
for (iin which(dot_names=="")) {
dot_call<-agg_call[[i+1]]
# assumes the first argument in a function call is always the column name!dot_names[i] <- paste0(dot_call[1:max(2, length(dot_call))], collapse="_")
}
Maybe we can at least handle this error in a try block or something? Not a priority right now but its obfuscated enough that I felt I should document it.
Chris
The text was updated successfully, but these errors were encountered:
Found this bug today but haven't figured out a fix yet.
When calling the
aggregate2
function with a trailing comma in the function arguments the call that is parsed in:When
enlist=TRUE
results in a call where the last item is a missing argument. However, there is no class or type indications that allow this to be easily caught. As a result when there is a trailing comma in the call the error ends up appearing when trying to use thedot_call
variable:Maybe we can at least handle this error in a try block or something? Not a priority right now but its obfuscated enough that I felt I should document it.
Chris
The text was updated successfully, but these errors were encountered: