load() Error: cannot open the the connection, cannot open compressed file #1042
Unanswered
thrivingproject
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I'm no expert, but I think this is due to working directory issues? Are you opening the project folder (that encloses both files) in VS Code? Then it should work I think. But if your R file (and data file) is nested deeper in a folder and accessed by the explorer, then I'm pretty sure you need to add the path from the project folder you opened to your load or use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm very new to R, VSCode, and GitHub, so please excuse any blunders related to jargon and/or protocols regarding posting discussion—I am currently learning R, C, and Python, have been using R Studio for R and VSCode for Python and C, but I prefer VSCode, so I downloaded the vscode-R extension and installed langugaeserver in R. However, I'm trying to load data from an .Rdata file which is in the same directory as the .Rmd file I'm working on, but when I run the chunk
{r} load("file.Rdata")
I get an error. The error says:Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
In addition: Warning message:
In readChar(con, 5L, useBytes = TRUE) :
cannot open compressed file 'file.Rdata', probable reason 'No such file or directory'
Can anyone please me, for I am confused and am able to assign variables and save them in the Global Environment, and the file is definitely not 'compressed' as the error message implies (it came in a .zip file that was uncompressed)? It would be greatly appreciated. Thank you kindly.
Using must recent version of R, VSCode, R extension (by Yukki Ueda), language server, and win 11.
Beta Was this translation helpful? Give feedback.
All reactions