Page 1 of 1

Jamovi could not find function

Posted: Wed Apr 13, 2022 8:46 pm
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!

Re: Jamovi could not find function

Posted: Wed Apr 13, 2022 11:13 pm
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

Re: Jamovi could not find function

Posted: Thu Apr 14, 2022 3:25 am
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!

Re: Jamovi could not find function

Posted: Thu Apr 14, 2022 3:50 am
by LizXSam
I also tried using the full package name tm::VectorSource in my codes and it returns the same message:

Re: Jamovi could not find function

Posted: Thu Apr 14, 2022 4:41 am
by jonathon
you'll need to put tm in your imports in your DESCRIPTION file too.

jonathon

Re: Jamovi could not find function

Posted: Thu Apr 14, 2022 6:28 am
by seol
Hi LizXSam

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

Seol