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

Do not check grouped_df by callstack in ctable #175

Open
Thibaultfq opened this issue Nov 8, 2022 · 0 comments
Open

Do not check grouped_df by callstack in ctable #175

Thibaultfq opened this issue Nov 8, 2022 · 0 comments

Comments

@Thibaultfq
Copy link

Thibaultfq commented Nov 8, 2022

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)

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

No branches or pull requests

1 participant