ACCLAB/dabestr

How to get dabestr to run with arrays of unequal length?

gastruloids opened this issue · 4 comments

Hi there,

Is there any way to get dabestr to run with values in each test set that are unequal? For example, I have three groups, with N = 257, 236 and 310 values respectively. The simplified code I use is below (and works fine on data with columns of equal length):

dabest_obj = load(data, x = x_values, y = y_values, idx = c("Group1", "Group2", "Group3") )
dabest_obj.mean_diff = mean_diff(dabest_obj)

...it then comes up with this error:

Error in PermutationTest(ctrl_measurement, test_measurement, effect_size = effect_size_type, :
The two arrays do not have the same length.

it worked fine using an older version of R and the older dabest function.

(I'm using R Studio Version 2023.12.0+369 (2023.12.0+369))

Apologies @sunroofgod I saw your previous thread on this, but following your advice on updating to latest developer version using

devtools::install_github(repo = "ACCLAB/dabestr", ref = "dev")

didn't solve it and I still have the same error. I have restarted R and cleared output, but to no avail I'm afraid!

Hi @gastruloids sorry for the late reply!

I've tried replicating the error on my side but everything seems to be working. It might potentially be an issue with the R version. I'll be checking with the other devs to see if its working on their side and get back to you again.

Just to doublecheck - after you restarted R, you cleared all the objects and made sure that your workspace image is empty. After your session was cleaned, you made sure to run library(dabestr) AFTER running devtools::install_github(repo = "ACCLAB/dabestr", ref = "dev") and not BEFORE.

Hi @sunroofgod, No problem!

Thanks for the advice... it worked! I think I was an idiot and ran library(dabestr) after running dev tools.

Thanks!

Hi, no worries at all! I'm glad its working now :) If you ever have more questions or run into any issues, feel free to reach out.

Additionally, thanks a bunch for using our dabestr package. Happy coding!