Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version of dabestr crashing #95

Closed
brembs opened this issue Oct 9, 2020 · 1 comment
Closed

New version of dabestr crashing #95

brembs opened this issue Oct 9, 2020 · 1 comment
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@brembs
Copy link

brembs commented Oct 9, 2020

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

@josesho josesho self-assigned this Oct 23, 2020
@josesho josesho added bug Something isn't working help wanted Extra attention is needed question Further information is requested and removed bug Something isn't working labels Oct 23, 2020
@josesho
Copy link
Member

josesho commented Oct 23, 2020

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!

@josesho josesho closed this as completed Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants