Cannot use Rj with system R
- atomicchain
- Posts: 5
- Joined: Mon Jan 26, 2026 11:36 pm
Cannot use Rj with system R
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
Re: Cannot use Rj with system R
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"))
}
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"))
}
- atomicchain
- Posts: 5
- Joined: Mon Jan 26, 2026 11:36 pm
Re: Cannot use Rj with system R
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
> 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
Re: Cannot use Rj with system R
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
with thanks
jonathon
- atomicchain
- Posts: 5
- Joined: Mon Jan 26, 2026 11:36 pm
Re: Cannot use Rj with system R
Thanks to you for all your work and effort in this community. I'll be on the lookout for the update.