How to reference to a local library on HDD for a module

Everything related to the development of modules in jamovi
Post Reply
jojop2
Posts: 4
Joined: Thu Jan 23, 2025 2:21 pm

How to reference to a local library on HDD for a module

Post by jojop2 »

I have a local library in zip format, which is neither on CRAN nor on github.
Is there a way to access functions from this library in a custom module?

I tried several things in DESCRIPTION and NAMESPACE and init.R files without any success.
I can't convince the jamovi compiler to add my library to the module files.
User avatar
jonathon
Posts: 2840
Joined: Fri Jan 27, 2017 10:04 am

Re: How to reference to a local library on HDD for a module

Post by jonathon »

take a look in folder tree of your project... you'll find a folder called something like jamovi/build/R4.4.1-win64. inside there you'll find all the R packages that your module is using. what you could do is install the local library into a matching version of R, and then copy it from, say

C:\Users\YourUsername\Documents\R\win-library\4.4.1

to

YourModule/jamovi/build/R4.4.1-win64

of course, this isn't really kosher :P

jonathon
Post Reply