Save an object to be reused by other modules?

Everything related to the development of modules in jamovi
Post Reply
sfcheung
Posts: 11
Joined: Wed Jan 19, 2022 5:29 am

Save an object to be reused by other modules?

Post by sfcheung »

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

Re: Save an object to be reused by other modules?

Post by jonathon »

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.

cheers

jonathon
Post Reply