jmvconnect in RjEditor with Linux Mint 19.1

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
wrothe
Posts: 3
Joined: Mon Feb 25, 2019 11:48 am

jmvconnect in RjEditor with Linux Mint 19.1

Post by wrothe »

Dear Jonathon,
i have a problem with loading jmvconnact with Jamovi.
It's installed with RStudio and seems to work.
In Jamovi RjEditor (when I switch to SystemR) I get the Message

"To use the system R from jamovi, jmvconnect must be installed "
if i want to start SystemR

What should I do?

Kind regards
Wolfgang
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: jmvconnect in RjEditor with Linux Mint 19.1

Post by jonathon »

hey wolfgang,

things on linux are a little tricky, because of the sandboxing with the flatpak. you can only use the version of R which is shipped with the flatpak - on the plus, you *can* install arbitrary packages for this, on the minus, i don't think you can use this R from something like RStudio (which may or may not be a problem for you).

so to run the R inside the flatpak, you can issue the command:

flatpak run --command=R org.jamovi.jamovi

*however*, running inside the flatpak means you won't have access to the C compiler, fortran, etc. and so installing native packages (like jmvconnect) will fail. so to enable these things, you need to enable the developer mode:

flatpak run --devel --command=R org.jamovi.jamovi

you *may* need to install some additional dev stuff for this to work, i'm not really sure. if it throws an error, come back to me, and we should be able to figure it out.

but once you've got that R working, you'll be able to install packages such as jmvconnect. these packages will be visible to the Rj editor when using 'system R'.

the final wrinkle is that this R will probably want to install to ~/R/x86_64-pc-linux-gnu-library/3.5 which is a problem if this location is already being used by your installed version of R, but if it isn't, then great!

i appreciate this kinda sucks.

jonathon
wrothe
Posts: 3
Joined: Mon Feb 25, 2019 11:48 am

Re: jmvconnect in RjEditor with Linux Mint 19.1

Post by wrothe »

Dear Jonathon,
thank youvery much for quick answering.
You are right, flatpak run --command=R org.jamovi.jamovi installs to ~/R/x86_64-pc-linux-gnu-library/3.5, so i cannot use packages in R under Rj.
So i think, i have to use a Windows-Enviroment (aarrrrgh!!)

I think, it isn't possible to copy an installed package to a folder, where packages for using in Rj are stored?

Kind Regards
Wolfgang
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: jmvconnect in RjEditor with Linux Mint 19.1

Post by jonathon »

ah, i have it, run R with:

R_LIBS_USER=~/R/jamovi flatpak run --devel --command=R org.jamovi.jamovi

i think you'll need to create that ~/R/jamovi folder before running this command. you can check that the location is setup correctly with the R command:

.libPaths()

cheers

jonathon
wrothe
Posts: 3
Joined: Mon Feb 25, 2019 11:48 am

Re: jmvconnect in RjEditor with Linux Mint 19.1

Post by wrothe »

Dear Jonathon,
thank you very much again.
It does not work yet, but i think it depends on a mistake in the Linux installation (failure with freedesktop.org). So i will try with a new installation of Linux Mint.
With kind regards
Wolfgang
Post Reply