Save an object to be reused by other modules?

Everything related to the development of modules in jamovi

by sfcheung » Thu Aug 04, 2022 1:01 am

I successfully wrote one or two modules but they are "standalone", work independent of others.

Can a module save an object that can be accessed by other modules?
If yes, how can a module find and access these objects?

A common workflow in R is calling a main function to do an analysis, and call other functions on the output. E.g.

lavaan::sem(): Do structural equation modeling
lavaan::parameterEstimates(): Get parameter estimates from the output of lavaan::sem()

There may be reason to separate these steps. For example, the first part can be time consuming and so we may not want to repeat it just due to minor changes in other calls. This also allows developers to write function to do things on the output of the main functions.

Can we make jamovi modules to do something similar?

-- Shu Fai
Posts: 11
Joined: Wed Jan 19, 2022 5:29 am

by jonathon » Thu Aug 04, 2022 1:14 am

hi shu,

at this stage we have no architecture for analyses to produce/consume output/input from one another ... and i don't have a clear idea of how that would be expressed in a ui (not to say it's not possible, only that it's not clear to me how to design it).

in terms of time consumption, the state system typically allows you to save and not rerun things that don't need to be rerun ... so you can fit models, and then if a user checks a checkbox which doesn't change the model, reuse the results from before.


User avatar
Posts: 2275
Joined: Fri Jan 27, 2017 10:04 am

Return to Module development