Attempted steps taken to fix -
Deleted RData, RProfile, etc., where found
System Information:
RStudio Edition: (Desktop or Server) 2025.05.1+513
RStudio Version:
OS Version: Sequoia 15.5
R Version: 4.5.1
Output your diagnostics report (if possible):
No errors. Log follows:
R Session Startup Failure Report
RStudio Version
RStudio 2025.05.1+513 "Mariposa Orchid " (ab7c1bc7, 2025-05-30) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2025.05.1+513 Chrome/132.0.6834.210 Electron/34.5.1 Safari/537.36
I have also reinstall R and RStudio to latest updates. This is quite frustrating. Luckily, I have an M3 where both are working, but this is depriving me of a computer.
If you run rstudio --run-diagnostics (or whatever the Mac version of the command is) in a terminal, it should write a text file somewhere and tell you in the terminal where to find the file. Does that file contain any error messages that are more informative than what you initially posted?
I did screen record to capture the message the flashed during opening: "R encountered a fatal error while opening. Session terminated." Opening from Terminal just takes me to the same screen.
"No diagnostics" meaning the file is not written, or meaning the file is written but contains nothing of interest?
R running is useful to know, but I've seen reports of R working but RStudio being blocked from communicating with it due to a firewall or something else getting in the way of RStudio communicating with R (I think). I was hoping the text file would identify something like that if it were happening.
Also, just to leave no stone unturned, are R and RStudio running under the same user account with the same file access?
RStudio 2025.05.1+513 "Mariposa Orchid " (ab7c1bc7, 2025-05-30) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2025.05.1+513 Chrome/132.0.6834.210 Electron/34.5.1 Safari/537.36
SUCCESS! And I have to thank ChatGPT for leading me through 3 hours of bash commands making sure that RS was pointing to the correct R 64-bit executable, after rebulding the preferences and environment. Apparently on the M1s RS can have trouble finding the correct binary.
Troubleshooting RStudio Fatal Error on M1 Mac (Apple Silicon)
1. Check RStudio Architecture
Run in Terminal:
file /Applications/RStudio.app/Contents/MacOS/RStudio
Should show support for both x86_64 and arm64 (universal binary)
library(tidyverse) # Data manipulation and visualization
library(glmnet) # LASSO regression
library(caret) # Cross-validation and model evaluation
library(pROC) # ROC curves and AUC
library(lubridate) # Date handling
library(gridExtra) # Multiple plots
library(ggplot2) # Advanced plotting
library(zoo) # For rolling window functions
cat("Loading S&P 500 and macroeconomic data...\n")
Loading S&P 500 and macroeconomic data...
Load data
data <- read.csv("monthly.csv", stringsAsFactors = FALSE)
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'monthly.csv': No such file or directory
I suggest making this a new question. Also, assuming that the working directory is set to the home of the data file (not visible in your code excerpt), does changing the file to "./monthly.csv" in the read.csv function help?