Jamovi could not find function

Everything related to the development of modules in jamovi
Post Reply
LizXSam
Posts: 4
Joined: Thu Mar 31, 2022 2:51 am

Jamovi could not find function

Post by LizXSam »

Hi I have encountered a problem while trying to build a module in jamovi, when I tried to incorporate the analysis into the b.R file, jamovi returns error with the error message of "could not find function 'VectorSource'" as show in the screenshot below.
The analysis runs fine with R and I also saw other people reporting this issue. Is there a solution to this error?

Thank you!
Attachments
Screenshot 2022-04-13 164103.png
Screenshot 2022-04-13 164103.png (31.41 KiB) Viewed 2893 times
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Jamovi could not find function

Post by jonathon »

hi,

jamovi modules are in essence just R packages, so they have the same requirements. in this case, you need to either add VectorSource to your NAMESPACE file

https://r-pkgs.org/namespace.html

or refer to it by it's full package name, i.e.

tm::VectorSource(...)

jonathon
LizXSam
Posts: 4
Joined: Thu Mar 31, 2022 2:51 am

Re: Jamovi could not find function

Post by LizXSam »

Hi Jonathon, thank you for your reply. I now have imported all necessary packages into NAMESPACE. But when I tried to reinstall the module again it now returns a new error message "there is no package call 'tm'". I have attached the below. Can you help me with this issue? Thank you!
Attachments
Screenshot 2022-04-13 232344.png
Screenshot 2022-04-13 232344.png (21.75 KiB) Viewed 2878 times
LizXSam
Posts: 4
Joined: Thu Mar 31, 2022 2:51 am

Re: Jamovi could not find function

Post by LizXSam »

I also tried using the full package name tm::VectorSource in my codes and it returns the same message:
Attachments
Screenshot 2022-04-13 234755.png
Screenshot 2022-04-13 234755.png (28.09 KiB) Viewed 2875 times
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Jamovi could not find function

Post by jonathon »

you'll need to put tm in your imports in your DESCRIPTION file too.

jonathon
User avatar
seol
Posts: 158
Joined: Mon Dec 04, 2017 8:40 am
Location: Seoul, Korea
Contact:

Re: Jamovi could not find function

Post by seol »

Hi LizXSam

Please see the source code on my github: https://github.com/hyunsooseol

Seol
Post Reply