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
I'm having trouble using butcher on a glm with a data.frame that has a single column:
Error in is_scalar_vector(x) && is.na(x) :
'length = 10' in coercion to 'logical(1)'
Digging a little bit, I see it's a problem using rlang::is_na(out) from the butcher:::exchange function.
Reproducible example
library(butcher)
#This does not workdf<-data.frame(y=1:10)
model<- glm(y~1, data=df)
butcher(model)
#Adding a second column is a workarounddf<-data.frame(y=1:10, x=1:10)
model<- glm(y~1, data=df)
butcher(model)
#For comparison, a single column works with lmdf<-data.frame(y=1:10)
model<- lm(y~1, data=df)
butcher(model)
#Session Info:
sessionInfo()
# R version 4.4.2 (2024-10-31 ucrt) # Platform: x86_64-w64-mingw32/x64 # Running under: Windows 11 x64 (build 22631) # Matrix products: default # locale:# [1] LC_COLLATE=French_Canada.1252 LC_CTYPE=French_Canada.1252 LC_MONETARY=French_Canada.1252# [4] LC_NUMERIC=C LC_TIME=French_Canada.1252# time zone: America/Toronto# tzcode source: internal# attached base packages:# [1] stats graphics grDevices datasets utils methods base# other attached packages:# [1] butcher_0.3.4# loaded via a namespace (and not attached):# [1] compiler_4.4.2 tools_4.4.2 renv_1.0.11
Thanks for the great package!
The text was updated successfully, but these errors were encountered:
Hey!
The problem
I'm having trouble using butcher on a glm with a data.frame that has a single column:
Digging a little bit, I see it's a problem using
rlang::is_na(out)
from the butcher:::exchange function.Reproducible example
#Session Info:
Thanks for the great package!
The text was updated successfully, but these errors were encountered: