Formula Interface How

Everything related to the development of modules in jamovi
Post Reply
julian2
Posts: 17
Joined: Tue Feb 21, 2023 4:29 pm

Formula Interface How

Post 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.
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Formula Interface How

Post 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
Post Reply