Unable to use gamjl code copied into R

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
emmacsullivan_
Posts: 3
Joined: Thu Jan 14, 2021 8:42 am

Unable to use gamjl code copied into R

Post by emmacsullivan_ »

Hi there,

I'm using the gamlj module in Jamovi and I am in syntax mode I want to copy the code over to R so that is will run the test and produce the plots output as in jamovi but I keep getting the following message when I try to run it in R:

Error in loadNamespace(name) : there is no package called ‘gamlj’

I've installed jmv, jmvconnect and loaded them into the library. Everytime I try to install gamlj I get told no such package exists to install. Sorry if its really trivial to fix!

Best wishes,

Emma
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Unable to use gamjl code copied into R

Post by jonathon »

are you wanting to run it in an R session (i.e. something like RStudio), or in Rj inside jamovi?

jonathon
emmacsullivan_
Posts: 3
Joined: Thu Jan 14, 2021 8:42 am

Re: Unable to use gamjl code copied into R

Post by emmacsullivan_ »

Hi Jonathan,

Thank you for your reply.

I'm wanting to run it in R studio.

Emma
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Unable to use gamjl code copied into R

Post by jonathon »

you'll need to install gamlj into R.

so first up you'll need to install the remotes package:

install.packages('remotes')

then install gamlj from github with the remotes package:

remotes::install_github('gamlj/gamlj')

cheers

jonathon
emmacsullivan_
Posts: 3
Joined: Thu Jan 14, 2021 8:42 am

Re: Unable to use gamjl code copied into R

Post by emmacsullivan_ »

Perfect, thanks so much!
Post Reply