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)

by emmacsullivan_ » Thu Jan 14, 2021 8:50 am

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
emmacsullivan_
 
Posts: 3
Joined: Thu Jan 14, 2021 8:42 am

by jonathon » Thu Jan 14, 2021 8:52 am

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

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

by emmacsullivan_ » Thu Jan 14, 2021 9:04 am

Hi Jonathan,

Thank you for your reply.

I'm wanting to run it in R studio.

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

by jonathon » Thu Jan 14, 2021 9:29 am

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
User avatar
jonathon
 
Posts: 1548
Joined: Fri Jan 27, 2017 10:04 am

by emmacsullivan_ » Thu Jan 14, 2021 12:51 pm

Perfect, thanks so much!
emmacsullivan_
 
Posts: 3
Joined: Thu Jan 14, 2021 8:42 am


Return to Help