Cannot use Rj with system R

Everything related to the development of modules in jamovi
Post Reply
User avatar
atomicchain
Posts: 5
Joined: Mon Jan 26, 2026 11:36 pm

Cannot use Rj with system R

Post by atomicchain »

Hi! I'm trying to use Rj with my system's R installed version(4.5.2) and when I switch from jamovi R to system R, the following message appears: Invalid version specification 'R.exe'. Anyone could please help? I'm using jamovi 2.7.17.0
User avatar
jonathon
Posts: 2937
Joined: Fri Jan 27, 2017 10:04 am

Re: Cannot use Rj with system R

Post by jonathon »

hi,

i think there's something unusual about the values in your registry

can you tell us the values of these registry entries?

# Try HKEY_LOCAL_MACHINE first
regHLM <- file.path("SOFTWARE", "R-core", "R64", fsep = "\\")
entries <- try(readRegistry(regHLM,
hive = "HLM",
maxdepth = 2,
view = "64-bit"))

# If not found, try HKEY_CURRENT_USER
if (inherits(entries, 'try-error')) {
regHCU <- file.path("SOFTWARE", "R-core", "R64", fsep = "\\")
entries <- try(readRegistry(regHCU,
hive = "HCU",
maxdepth = 2,
view = "64-bit"))
}
User avatar
atomicchain
Posts: 5
Joined: Mon Jan 26, 2026 11:36 pm

Re: Cannot use Rj with system R

Post by atomicchain »

Thanks for replying. Here's the result:

> regHLM
[1] "SOFTWARE\\R-core\\R64"
> entries
$`4.5.2`
$`4.5.2`$InstallPath
[1] "C:\\Program Files\\R\\R-4.5.2"
> regHCU
Error: object 'regHCU' not found
User avatar
jonathon
Posts: 2937
Joined: Fri Jan 27, 2017 10:04 am

Re: Cannot use Rj with system R

Post by jonathon »

thanks for letting us know. i think Rj doesn't handle this particular combo of registry information correctly. i've created a PR to fix the issue, and i'm just waiting on maurizio to review it for me, then we'll push out a fixed version.

with thanks

jonathon
User avatar
atomicchain
Posts: 5
Joined: Mon Jan 26, 2026 11:36 pm

Re: Cannot use Rj with system R

Post by atomicchain »

Thanks to you for all your work and effort in this community. I'll be on the lookout for the update.
Post Reply