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
Would it be possible to improve the error message that is displayed when one is trying to join ordered factors (ordinal data) with different levels?
>df1<-data.frame(D.1= c(1,3,4,2,5),
+D.2=factor(c(4,5,3,1,2), ordered=TRUE),
+F.4= c(5,4,3,2,1))
>df1$D.2
[1] 45312Levels:1<2<3<4<5>>df2<-data.frame(D.1= c(6,2,3,4,1),
+D.2=factor(c(NA,3,3,5,1),
+exclude=NULL,
+ordered=TRUE,
+levels= c(1,2,3,4,5,NA)))
>df2$D.2
[1] <NA>3351Levels:1<2<3<4<5<<NA>>>df3<- full_join(df1, df2)
Joiningwith`by = join_by(D.1, D.2)`Errorin`full_join()`:!Can't join `x$D.2` with `y$D.2` due to incompatible types.ℹ `x$D.2` is a <ordered<cd34a>>.ℹ `y$D.2` is a <ordered<88c4b>>.Run `rlang::last_trace()` to see where the error occurred.
Granted - I am not sure how common this is, but I ran into it when trying to join survey data (obtained with the qualtRics package by @juliasilge), where NA was added to the levels (when participants skip a question). The error message was really difficult to decipher ("incompatible types", just "types"?), I could not find anything online. Only when I started making a reprex for a qualtRics issue, I realized what the problem was.
The text was updated successfully, but these errors were encountered:
Would it be possible to improve the error message that is displayed when one is trying to join ordered factors (ordinal data) with different levels?
Granted - I am not sure how common this is, but I ran into it when trying to join survey data (obtained with the
qualtRics
package by @juliasilge), whereNA
was added to the levels (when participants skip a question). The error message was really difficult to decipher ("incompatible types", just "types"?), I could not find anything online. Only when I started making a reprex for aqualtRics
issue, I realized what the problem was.The text was updated successfully, but these errors were encountered: