Help With Finishing Module

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

Help With Finishing Module

Post by julian2 »

I am currently developing the bmtest module, which implements the Brunner-Munzel test, as was requested (https://forum.jamovi.org/viewtopic.php?p=5699).

I am almost done but there are a few things for which I need the help of someone from the jamovi team or an experienced module developer, as they require knowledge about topics that are not documented. I would be very thankful if someone were able to help me. The current state of the package can be found here: https://github.com/karchjd/bmtest. This is what I think still needs to be done. However, please let me know if you think something else is needed.
  • A picture for the menu. Could not find how this is done.
  • The test starts running if I only supply the dependent variable and of course fails then, instead of waiting for the group variable.
  • I am failing to update the help files for R, see https://forum.jamovi.org/viewtopic.php?t=2503
  • The short version: Is there a way to ensure that a switch is only active if enabled? The long version: I have switches for the test type and whether confidence intervals are requested. The asymptotic and the random permutation test support confidence intervals. However, the full permutation test does not. Consequently, I only enable the confidence interval switch when either asymptotic or random permutation is activated. However, the menu can be tricked into activating confidence intervals for the full permutation approach by activating let's say asymptotic, activating confidence intervals, and then deactivating asymptotic again. Confidence interval is then disabled in an active state.
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Help With Finishing Module

Post by MAgojam »

Hey Julian,
A little while ago, I answered some of your questions with a PR code.

For the module icon that should appear in the ribbon, here is an answer from Jth:
https://forum.jamovi.org/viewtopic.php?p=4710#p4710
It's been a while and I don't know if it's still like this (maybe there are some changes), @Janathon when he passes he will be able to tell.

Cheers,
Maurizio
julian2
Posts: 17
Joined: Tue Feb 21, 2023 4:29 pm

Re: Help With Finishing Module

Post by julian2 »

Thanks so much, Maurizio! That solved almost all issues.
julian2
Posts: 17
Joined: Tue Feb 21, 2023 4:29 pm

Re: Help With Finishing Module

Post by julian2 »

During testing, I encountered a new problem. One of the tests implemented is a permutation test (option Random permutations). On large data sets this test may take long (could be hours). Is there a way to stop computation, the equivalent of pressing ctrl + c in R? My idea was to stop computation if option random permutations is unchecked, and was wondering whether this would be possible via the javascript event handlers. SPSS solves the same problem by imposing a used-defined time limit on the computations. I would also be fine with that. Other suggestions are also welcome.
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Help With Finishing Module

Post by MAgojam »

julian2 wrote: Thu Mar 16, 2023 11:55 am SPSS solves the same problem by imposing a used-defined time limit on the computations.
Do you have a PR with a suggestion from me that might look like.

Cheers,
Maurizio.
julian2
Posts: 17
Joined: Tue Feb 21, 2023 4:29 pm

Re: Help With Finishing Module

Post by julian2 »

Thanks so much for your help again Maurizio!
julian2
Posts: 17
Joined: Tue Feb 21, 2023 4:29 pm

Re: Help With Finishing Module

Post by julian2 »

I tried installing the package on various machines and discovered that the .jmo file generated by jmvtools::install() is not platform-independent. This issue seems to be limited to R packages that depend on non-R code, such as C++ or Fortran. Specifically, when I attempted to load the .jmo file created on a Windows machine onto a Mac, I encountered the error "brunnermunzel.so not found" while trying to run the asymptotic version. Similarly, when installing the Mac version on windows it complains about DLLs not being found.. Is there an effective solution to this problem, or do I need to provide separate .jmo files for different operating systems if my R package relies on C++ or Fortran code? I assume I also would then need to supply a third version for arm64 macs?

Source code: https://github.com/karchjd/bmtest/
.jmo file created on a Windows machine (2.9 MB): https://osf.io/9d8ba
.jmo file created on a macOS machine (1.4 MB): https://osf.io/r3byu

Thanks for your help!
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Help With Finishing Module

Post by jonathon »

you need to build a separate version for each operating system.

arm64 macs use the intel binaries fine, so you don't need to worry about that.

so it's just one for windows, one for linux, and one for macos.

(and when we do a bigger update of jamovi, i.e. from 2.3 => 2.5, they all need to be built again).

jonathon
julian2
Posts: 17
Joined: Tue Feb 21, 2023 4:29 pm

Re: Help With Finishing Module

Post by julian2 »

Thanks so much for the swift reply jonathon! Any advice on how to do this efficiently? How do you do this for other modules? I don't want to manually create new .jmo files for all three operating systems anytime jamovi updates or I update the module.
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Help With Finishing Module

Post by jonathon »

that's what the jamovi library is for ... if your module is ready for general consumption, i'd suggest submitting it.

cheers

jonathon
Post Reply