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

Error in parse_funs() when using external funs #89

Open
DanChaltiel opened this issue Nov 17, 2024 · 0 comments
Open

Error in parse_funs() when using external funs #89

DanChaltiel opened this issue Nov 17, 2024 · 0 comments
Labels
bug 🐞 Something isn't working

Comments

@DanChaltiel
Copy link
Owner

library(crosstable)

crosstable(mtcars2, mpg, 
           funs=c("Med"=median, mean, "std dv"=sd))
#> # A tibble: 3 × 4
#>   .id   label             variable value
#>   <chr> <chr>             <chr>    <chr>
#> 1 mpg   Miles/(US) gallon Med      19.2 
#> 2 mpg   Miles/(US) gallon mean     20.1 
#> 3 mpg   Miles/(US) gallon std dv   6.0

my_summary_functions = c("Med"=median, "Mean"=mean, "std dv"=sd)
crosstable(mtcars2, mpg, funs=my_summary_functions)
#> Error in `parse_funs()` at crosstable/R/crosstable.R:399:3:
#> ! Problem with fun_call in parse_funs(). This should never happen. Is
#>   `funs` syntax correct?
#> ✖ lengths: funs=3, names(funs)=3, fun_call=1

Created on 2024-11-17 with reprex v2.1.1

@DanChaltiel DanChaltiel added the bug 🐞 Something isn't working label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant