ACCLAB/dabestr

New version of dabestr crashing

brembs opened this issue · 1 comments

When we recently updated our packages, including dabestr, the data that used to run without a problem are now crashing with the following error:

Error in dabest(data, group, PIs, idx = groupnames, paired = FALSE,  : 
  unused argument (func = median)

Here a reproducible example straight from our data:

groupnames = c("WTB1","WTB2")
names(groupnames)=c("name","name")
tt <- "group       category        PIs
1   WTB1  7 left_torque  0.1900000
2   WTB1  7 left_torque -0.8083333
3   WTB1 7 right_torque -0.2416667
4   WTB1 7 right_torque -0.6300000
5   WTB1  7 left_torque -0.6516667
6   WTB1 7 right_torque -1.0000000
7   WTB1  7 left_torque -0.3925000
8   WTB2 7 right_torque -0.9250000
9   WTB2  7 left_torque -0.7391667
10  WTB2  7 left_torque -0.9991667
11  WTB2 8 right_torque -0.9791667
12  WTB2  7 left_torque -0.8366667"
data <- read.table(text=tt, header = TRUE)
dabest(data, group, PIs, idx = groupnames, paired = FALSE, func = median)

This all worked fine before the update. Thanks for any help!

P.S.: The code is part of our evaluation suite at https://github.com/brembslab/DTSevaluations and can be found at the end of the file project.Rmd

Hi @brembs ,

With v0.3.0, the inclusion of standardized effect sizes has mean that the func keyword argument is deprecated.

Please use

dabest(data, group, PIs, idx = groupnames, paired = FALSE) %>% median_diff()

to get the median difference.

See the vignetteand the Twitter announcement thread for v0.3.0 for more info.

Thanks!