The source code in ctable.R uses the callstack to check for group_by.
# Check for group_by() if (any(grepl("group_by(", deparse(sys.calls()[[1]]), fixed = TRUE))) { stop("ctable() doesn't support group_by(); use stby() instead") }ctable.R
This stops my code for a dataframe that i for several reasons first grouped by later ungrouped. It perfectly runs though, because i provide a non-grouped df. The current workaround is to assign to grouped+ungrouped df to a variable and use this variable in the R console to call the ctable function.
Isn't there a better way to check the use of a grouped df? (eg. is.grouped_df)
The source code in ctable.R uses the callstack to check for group_by.
# Check for group_by() if (any(grepl("group_by(", deparse(sys.calls()[[1]]), fixed = TRUE))) { stop("ctable() doesn't support group_by(); use stby() instead") }
ctable.RThis stops my code for a dataframe that i for several reasons first grouped by later ungrouped. It perfectly runs though, because i provide a non-grouped df. The current workaround is to assign to grouped+ungrouped df to a variable and use this variable in the R console to call the ctable function. Isn't there a better way to check the use of a grouped df? (eg.
is.grouped_df
)