private vs public options

Everything related to the development of modules in jamovi
Post Reply
User avatar
mcfanda@gmail.com
Posts: 452
Joined: Thu Mar 23, 2017 9:24 pm

private vs public options

Post by mcfanda@gmail.com »

Hi,
I've the following scenario I wasn't able to solve in a simple way. I'd like one option to be private (not in the UI) when the module is used in jamovi, but to be public when the module is used in R. Is that possible without creating a dummy ugly option in the UI that nobody is going to use?

More specifically, the module estimates models based on formulas. In jamovi, the formula is composed internally combining dep-variable, covs-variables and factor-variables, thus the "model" variable is private in the R6 class. When the user uses the module in R, it would be nice that s/he can provide the formula directly, as a formula() object. However, to do that I need the "model" option to be public.

How is the best way to go?
User avatar
jonathon
Posts: 2609
Joined: Fri Jan 27, 2017 10:04 am

Re: private vs public options

Post by jonathon »

you can add a

hidden: true

to the option in the .a.yaml

however, i don't know if any of the option types will accept a formula, so we may want to add a generic 'object' option.

cheers

jonathon
User avatar
mcfanda@gmail.com
Posts: 452
Joined: Thu Mar 23, 2017 9:24 pm

Re: private vs public options

Post by mcfanda@gmail.com »

thanks, i'll give it a try
User avatar
jonathon
Posts: 2609
Joined: Fri Jan 27, 2017 10:04 am

Re: private vs public options

Post by jonathon »

how did you get on? did you need me to add any additional features?

jonathon
User avatar
mcfanda@gmail.com
Posts: 452
Joined: Thu Mar 23, 2017 9:24 pm

Re: private vs public options

Post by mcfanda@gmail.com »

Hi
I'm rewriting some code of GAMLj to make it faster, and I still have to get to this issue. I'll get back to it in a week or so
Post Reply