I am using Visual Studio Code with the R extension, but I’m having trouble getting my data to show up in the global environment. When I run a script that creates a data frame, I can see the output in the console, but the data frame is not visible in the global environment tab. issues
I also get the following error messages in the Problems panel:
- Cannot register 'r.rpath.windows'. This property is already registered.
- Cannot register 'r.rpath.mac'. This property is already registered.
- Cannot register 'r.rpath.linux'. This property is already registered.
Here is the content of my settings.json file:
- "r.rpath.mac": "/usr/local/bin/r",
- "r.bracketedPaste": true,
- "r.rterm.mac": "/Library/Frameworks/Python.framework/Versions/3.11/bin/radian",
- "r.plot.useHttpgd": true,
- "r.workspaceViewer.showObjectSize": true
Can anyone help me fix this issue? Thanks!
From your image, I see in the status bar that R has not been attached to active terminal:
R:(not attached). Try to click on the icon and attach R to active terminal. If your current R is attached (e.g, if you see some thing like R 4.3.1 or the R version currently installed on your system), then from theprimary side barin the right side of thevscodeclick onR iconand look up theGlobal EnvironmentunderWorkspacewhere the data are stored. You must see the data there.If the option above doesn't successful,
try to kill the current terminal and go to the terminal menu and create new terminal.I had similar issue and was able to solve the issue as what I explained. Hope these could help.