doomlab / MOTE

Magnitude of the Effect - An Effect Size and CI calculator
http://www.statstools.com
17 stars 13 forks source link

d.dep.t.avg is broken #5

Closed jonathon-love closed 6 years ago

jonathon-love commented 6 years ago

hi, this code:

  if (m1 == NULL | m2 == NULL | sd1 == NULL | sd2 == NULL | n == NULL){
    stop("Be sure you enter mean 1, mean 2, sd 1, sd 2, and n values.")
    }

always errors (irrespective of what arguments the user provides), and d.dep.t.avg doesn't work.

you want this instead:

if (missing(m1) || missing(m2) || missing(sd1) || missing(sd2) || missing(n)) {

(note that using two || is a slight optimisation over using a single | too).

https://github.com/doomlab/MOTE/blob/master/R/d.dep.t.avg.R#L47-L49

cheers

doomlab commented 6 years ago

@jonathon-love - hey thanks! I will fix that PDQ - we are working on adding coherent error messages and updating the documentation.

@Gillenwaters - take a look at this for the ones we are working on next week. I'll fix this one and the other one I think I edited as well.

jonathon-love commented 6 years ago

i haven't had a proper look at your project, but i notice your output is pretty raw at the moment. jmvcore might be a solution that might be appropriate, it lets you create nice tables, like this one:

https://www.jamovi.org/jmv/conttables.html

and this has the added bonus of working inside jamovi as well, https://www.jamovi.org

disclaimer, i work on all these projects.

doomlab commented 6 years ago

@jonathon-love thanks! I do love jamovi 👍 I'll add that to our ideas for future upgrades.

doomlab commented 6 years ago

Fixed the issue with the missing value checks - should be working again.