We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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?
to your account
If I perform an operation on an empty rowwise data frame, I would expect the result to be an empty data frame as well. Its similar to a for loop being skipped when the vector of indices is empty.
If I do this on a rowwise tibble with zero rows, it behaves as expected:
tibble(a = character(0)) %>%
mutate(n = nchar(a)) %>%
rowwise(tibble(a = character(0), n = integer(0))))}
This does not work for list columns
tibble(a = list()) %>%
mutate(n = lengths(a))
Error: Problem with `mutate()` input `n`.
x subscript out of bounds
ℹ Input `n` is `lengths(a)`.
I would instead expect a return value like
rowwise(tibble(a = list(), n = integer()))
I tested this issue with dplyr, commit d56404c
The text was updated successfully, but these errors were encountered:
support for rowwise data frame with 0 rows and list columns.
support for rowwise data frame with 0 rows and list columns. (#5805)
Successfully merging a pull request may close this issue.