You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When pulling data from different sources sometimes I have situations like the following. Is this expected behavior and should we have more informative error messages?
df1 <- data.frame(ID = c("A", "B"), value = as.integer(c(1, 2)))
df2 <- data.frame(ID = c("C", "D"), value = c("00003", "00004"))
dfList <- list(df1, df2)
do.call(rbind, dfList) # works fine
rbind_all(dfList) # Error: not compatible with STRSXP
The text was updated successfully, but these errors were encountered:
This is expected behaviour, although I admit the error message could be better. It's basically telling you that rbind_list() won't automatically coerce an integer into a string, because that probably represents a problem with the underlying data.
The problem was with combining integers with factors, which was erroneously allowed. We now the usual error message:
Erreur : incompatible type (data index: 2, column: 'value', was collecting: integer (dplyr::Collecter_Impl<13>), incompatible with data of type: factor
De plus : Message d'avis :
In rbind_all(dfList) : Unequal factor levels: coercing to character
lockbot
locked as resolved and limited conversation to collaborators
Jun 10, 2018
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When pulling data from different sources sometimes I have situations like the following. Is this expected behavior and should we have more informative error messages?
The text was updated successfully, but these errors were encountered: