Skip to content

R console not loading .RProfile on startup #9211

@EllaKaye

Description

@EllaKaye

System details:

Positron and OS details:

Positron Version: 2025.08.0 build 130
Code - OSS Version: 1.102.0
Commit: 76ddce5
Date: 2025-08-01T20:08:51.894Z
Electron: 35.6.0
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Darwin arm64 24.6.0

Session details:

R 4.5.1
LLM model used in for Positron Assistant: Claude 4 Sonnet

Describe the issue:

In my global .RProfile I have the line:

options(my_option = "hello")

When I start an R Session in Position and run getOption("my_option") it returns NULL. It's the same when I start R in the Positron terminal and try from there. When I run the same line of code in the latest RStudio, or in R in the Mac terminal app, I get "hello" as expected.

I've tried debugging this with Positron Assistant, which suggested trying the following commands - here they are with the output:

> file.exists("~/.Rprofile")
[1] TRUE
> path.expand("~/.Rprofile")
[1] "/Users/ellakaye/.Rprofile"
> Sys.getenv("HOME")
[1] "/Users/ellakaye"
> Sys.getenv("R_USER")
[1] ""
> R.home()
[1] "/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources"
> list.files(R.home("etc"), pattern = "profile|environ", full.names = TRUE)
[1] "/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/etc/Renviron"
> getOption("my_option")
NULL
> try(source("~/.Rprofile"))
> getOption("my_option")
[1] "hello"

It then advised me to file a bug report!

Steps to reproduce the issue:

  1. Add options(my_option = "hello") to your global .RProfile
  2. Try calling getOption("my_option") in Positron

Expected or desired behavior:

getOption("my_option") returns "hello".

Were there any error messages in the UI, Output panel, or Developer Tools console?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions