dabestr icon indicating copy to clipboard operation
dabestr copied to clipboard

Error with missing value

Open cardiomoon opened this issue 2 years ago • 3 comments

Thank you for nice package !

But dabest function result in ERROR when data[[y]] has missing value(s).

Best,

Keon-Woong Moon

cardiomoon avatar Jan 13 '22 03:01 cardiomoon

Hi @cardiomoon ,

As noted in the readme, could you please provide a copy-pastable reproducible example with dummy data? This is to help diagnose to issue faster.

Thank, Joses

josesho avatar Jan 13 '22 03:01 josesho

This is reproducible example

data(mtcars)
dabest(mtcars,am,mpg,idx=c("0","1")) %>% mean_diff()  # No error
mtcars$mpg[1:10]=NA
dabest(mtcars,am,mpg,idx=c("0","1")) %>% mean_diff()  #  error

cardiomoon avatar Jan 13 '22 04:01 cardiomoon

Hi @cardiomoon ,

Thanks for your suggestion and the reproducible example. Yes, curret version of dabestr result in error when data has missing value. We will improve this in the next version. For now, please drop missing value before calling dabestr.

Best, Zhang Rou

ZHANGROU-99 avatar Dec 26 '22 06:12 ZHANGROU-99