Rj Editor (Error using System R)

Everything related to the development of modules in jamovi
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Rj Editor (Error using System R)

Post by MAgojam »

Hi,
you are fantastic and I remain speechless for what you are doing.
I tried the new Rj Editor module, without problems with the R version bundled with jamovi, but an error with the Sytem R version.
I attach a screenshot, which I think may be sufficiently informative.
SCT_RjEditor.png
SCT_RjEditor.png (141.07 KiB) Viewed 10265 times
Thanks for Jamovi's Team.
Maurizio
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Rj Editor (Error using System R)

Post by jonathon »

hmm, that is a bit puzzling. i'm not aware of any calls to `is()` in that function call.

but *is* is from the methods package, and on windows it sometimes doesn't attach properly (for reasons that have never been clear to me).

try adding

Code: Select all

requireNAMESPACE('methods')
or the slightly more heavy handed:

Code: Select all

library('methods')
to your script, and see if that fixes it. if it does, i'll add this line in 'behind the scenes'

cheers

jonathon
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Rj Editor (Error using System R)

Post by MAgojam »

Hi, @Jonathon

With

Code: Select all

requireNamespace('methods')
he does not do it, but with his heavy hand, he does it.

Code: Select all

R.version.string
library('methods')
library('jmv')
packageVersion('jmv')
descriptives(data)
Now the script works, thanks.

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

Re: Rj Editor (Error using System R)

Post by jonathon »

great, i'll update Rj accordingly.

thanks for reporting.

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

Re: Rj Editor (Error using System R)

Post by jonathon »

try uninstalling and reinstalling Rj, and see if that fixes the issue.

with thanks

jonathon
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Rj Editor (Error using System R)

Post by MAgojam »

Hi @jonathon,
sorry if I go on here and do not open a new topic, but I wanted to tell you this:
SO: Win 7 and 10 (ITA)
Jamovi (0.9.1.12) with Rj (1.0.1) and some scrip R that work without problems, both with "jamovi R" and "system R".

Now I'm trying the same R scripts with Rj and the 0.9.2.0 version of jamovi.
With active "jamovi R", if I use the entire data set and I have a variable (eg: ID_Progr) of type ID (the new type added in jamovi 0.9.2.0) I get the following error message:

Code: Select all

R
Argument 'vars' does not permit ID variables ('ID_Progr' is not valid)

Debug
Error: Argument 'vars' does not permit ID variables ('ID_Progr' is not valid)

self$options$check(checkData = TRUE)
option$check(checkValues, checkVars, checkData)
private$.check(data, checkValues, checkVars, checkData)
reject("Argument '{a}' does not permit ID variables ('{b}' is not valid)", a = self$name, b = columnName)
The error disappears if I limit the columns made available to the analysis by including a special comment at the top of the script, of the module (example):

Code: Select all

# (Age, BI_Ing, BI_Dim, BI_Gain)
library(jmv)
descriptives(data)
If I switch to "system R", I get the error message:
Memory segment version is too new

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

Re: Rj Editor (Error using System R)

Post by jonathon »

ah, thanks for the report.

i hadn't thought about ID's colliding with Rj, i'll update it shortly.

wrt the Memory segment being too new, the 0.9.2 requires a new version of jmvconnect, which i'll push out shortly. (and i guess i should improve that error message).

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

Re: Rj Editor (Error using System R)

Post by jonathon »

OK, i've pushed out a 1.0.2 of Rj, which will fix the ID issue, but the memory segment issue will have to wait for the new jmvconnect.

cheers
Vit
Posts: 65
Joined: Fri Apr 19, 2019 11:51 am

Re: Rj Editor (Error using System R)

Post by Vit »

Hi,

I have a fresh installation of jamovi (0.9.6.9) with freshly installed Rj editor (1.0.8) when I switch to System R jamovi gave immediately an error message "argument is of length zero".

I have installed jmvconnect package (1.0.8) using freshly installed R x64 3.5.3. both R and RStudio (1.2.1335) can see the jmvconnect package.

jamovi R in Rj Editor works just fine...

To make it complete:
- I am running Win10 Pro Czech
- jmvconnect folder in R address is C:\Program Files\R\R-3.5.3\library\jmvconnect

Do you have any suggestion on how to solve the "Argument is of length zero" error?

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

Re: Rj Editor (Error using System R)

Post by jonathon »

hi vit,

this is unexpected. could you see what version of jmvcore you have installed (and update it if it isn't the latest).

with thanks
Post Reply