-
Notifications
You must be signed in to change notification settings - Fork 64
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
glue_collapse()
should always return length 1 vectors
#88
Comments
Those are all characters, how is this not type stable? |
The length varies (length 1 vs. length 0), I can't |
Ah I see, I think 0 length inputs generating 0 length outputs is the correct behavior, but can see how it makes this particular idiom more painful. |
Maybe for vectorized operations, but not for summaries? library(tidyverse)
tibble(a = numeric()) %>% summarize(sum(a))
#> # A tibble: 1 x 1
#> `sum(a)`
#> <dbl>
#> 1 0.
|
Do we want a length-stable variant, perhaps |
glue_collapse()
should always return length 1 vetors
glue_collapse()
should always return length 1 vetorsglue_collapse()
should always return length 1 vectors
Perhaps
glue_collapse()
should always returned a string?The text was updated successfully, but these errors were encountered: