Page 1 of 1

Formula Interface How

Posted: Fri Mar 03, 2023 4:28 pm
by julian2
I think it is nice that ttestIS also supports the formula interface and would like to also enable this for my package. What are the steps? So far, I have included

Code: Select all

formula:
    vars:
        from: lhs
        required: true
    group:
        from: rhs
        subset: 1
in the .a.yaml file and

Code: Select all

            .formula=function() {
                jmvcore:::composeFormula(self$options$vars, self$options$group)
            }
in the b.R file but that does not seem sufficient for the compiler to add the formula argument to the function.

Re: Formula Interface How

Posted: Fri Mar 03, 2023 10:19 pm
by jonathon
you shouldn't need anything in your .b.R file ...
that does not seem sufficient for the compiler to add the formula argument to the function.
double check for me that a formula argument hasn't been tagged onto the end of the function definition in the .h.R file. you should find a chunk of code like this:

https://github.com/jamovi/jmv/blob/master/R/ttestis.h.R#L846-L872

cheers

jonathon