-
Notifications
You must be signed in to change notification settings - Fork 417
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
unite fails with internal error if the columns don't exist #1512
Labels
bug
an unexpected problem or unintended behavior
Comments
I think its a bug on our end, thanks! |
GuiFabre
added a commit
to maelstrom-research/madshapR
that referenced
this issue
Nov 28, 2023
Same error here. I came because the error told me to do so. library(tidyverse)
df <- tibble(
a_1 = 3,
a_2 = 4
)
df |>
unite(b, starts_with("b"))
#> Error in `df_append()`:
#> ! `after` must be a whole number, not an integer `NA`.
#> ℹ This is an internal error that was detected in the tidyr package.
#> Please report it at <https://github.com/tidyverse/tidyr/issues> with a reprex
#> (<https://tidyverse.org/help/>) and the full backtrace.
#> Backtrace:
#> ▆
#> 1. ├─tidyr::unite(df, b, starts_with("b"))
#> 2. └─tidyr:::unite.data.frame(df, b, starts_with("b"))
#> 3. └─tidyr:::df_append(after = after)
#> 4. └─tidyr:::check_number_whole(after, min = 0L, max = n, .internal = TRUE)
#> 5. └─tidyr:::.rlang_types_check_number(...)
#> 6. └─tidyr (local) .stop(x, what, ...)
#> 7. └─tidyr:::stop_input_type(...)
#> 8. └─rlang::abort(message, ..., call = call, arg = arg) Created on 2024-02-12 with reprex v2.0.2 |
Dup of #1548 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While using
tidyr::unite
on a list of dataframes I came across the following error. I'm only reporting it because it asked me to!The list of dataframes was messy, so I was looking for a way of combining columns that may or may not exist. I'd be happy for unite to throw a warning, or error, to tell me that there were no input columns selected.
Created on 2023-08-31 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: