I bought a new laptop a few days ago (Windows 10) and installed R 4.0.0 and the last RStudio version (Desktop 1.2.5042) on it. Subsequently I ran the rtools40 installer and installed the latest versions of the popular R packages (including ggplot, plotly and so on). Everything seems to work, except for the RStduio viewer pane when trying to render a plotly plot. What happens is that, when I run a minimal example (like this https://plotly.com/r/line-charts/) the view pane is activated, but no plot is rendered. Also no error is raised and the RStudio R session starts draining a lot of CPU capacity, although no code is apparently running (e.g. I can run a plot() and it will be properly displayed in the plot pane).
Now, I've tried downgrading and running RStudio (3.x) from Anaconda - neither worked.
Also - my browser wold not render local plotly plots, bit it would render external plots (like in the example above https://plotly.com/r/line-charts/).
Any ideas?
Apparently it is an issue with R 4.0 and RStudio 1.2.5042 on Windows 10 x64:
https://github.com/rstudio/rstudio/issues/6737
I downgraded to R 3.6.1 and RStudio 1.2.5042 and the problem is gone.
RStudio is due to fix the issue with its v1.3-patch.
Related
I have a problem since that has to do with plotting in R and Rstudio. I am using a MacBook Pro 14'' with macOS Monterey Version 12.1. The RStudio version is 2022.12.0+353 (2022.12.0+353), and the R version is 4.2.2.
I was previously using R 4.2.0 and a previous version of RStudio and still the plots did not show up.
What happens is that as soon as I try to plot anything, the panel freezes and the only way to go forward is to press the red "stop" button of the console. Usually, the only way to go is to restart R because pressing the stop button is not enough. It happens with any plotting function that I am aware of, including ggplot(), hist(), and plot().
I have already tried to restart the laptop, to unload the packages and to update them.
Did anybody encounter a similar issue? It's quite puzzling to me.
Thanks,
Marco
I have already tried to restart the laptop, to unload the packages and to update them.
I solved the problem. my system did not recognise the Arial font. After installing it manually, ggplot worked again.
Thanks!
M
I recently updated R and RStudio and now all ggplots show up on a new pop-up window instead of on the plot pane. I updated R by using the updateR() function from the installr package. I then updated RStudio by going to Help -> Check for Updates. This is the only way I know how to update R and this is the first time I've encountered issues. This is happening on my Windows laptop but when I followed the same steps to update R and RStudio on my Windows work computer everything is working as expected, so only getting this issue on my laptop.
> version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 2.1
year 2022
month 06
day 23
svn rev 82513
language R
version.string R version 4.2.1 (2022-06-23 ucrt)
nickname Funny-Looking Kid
When I load ggplot2 -> library(ggplot2) , I get the following warning
Warning message: R graphics engine version 15 is not supported by this
version of RStudio. The Plots tab will be disabled until a newer
version of RStudio is installed.
When plotting a ggplot, a new window named R Graphics: Device 2 (ACTIVE) pops-up with the plot. I would like to have my plots showing on the plots tab/pane instead of on a new window.
Screenshot of what I see when plotting ggplot (Actual figure hidden for privacy purposes)...
When I go to Help -> Check For Updates in RStudio it says "You're using the newest version of RStudio."
I tried re-installing ggplot2 but this did not help. In RStudio, I also checked Tools -> Check for Package Updates... and it seems like I have the latest ggplot2 version.
Is this a known problem with the latest R update (I don't think so since it works fine on my Windows work computer) or did something go wrong when updating? What should I try? I do not know what is the best way to unistall and re-install R (if this is something I should try).
I initially tried, using RStudio, to install rgl using install.packages("rgl"), which appeared to have worked. It did give me a message that the binary is older than the source, and that it would install from the binary, but I received no other messages. However library(rgl) gets stuck and doesn't do anything.
I removed the package using remove.packages(rgl), and attempted to install from source using R CMD INSTALL rgl_0.95.1409.tar.gz. That gets stuck on "testing if installed package can be loaded." I had X11 installed, but I downloaded XQuartz 2.7.8 and tried again, with the same result.
?rgl::plot3d in RStudio does take me to the documentation for the plot3d function, so I think it installed, just not completely/successfully (rgl::plot3d as an attempt to call the plot3d function also results in endless computation).
However, I finally did manage to load rgl (and use plot3d) by manually launching the Xapp from the Terminal prior to loading the library in my current R session (just X in Terminal, xterm by itself doesn't seem to have the same effect). Can anyone explain why this might be the case, and if there is a workaround to avoid having to manually launch the Xapp? (I do not want to have an application running when I do not need it, but I will also probably sometimes forget to launch the Xapp prior to running this script.)
I'm running OS X Yosemite (10.10.5), RStudio 0.98.1103, R 3.1.3 3.2.2.
The 'rgl' package does not use XQuartz, but rather opens a separate X11 window. Not being able to launch X(11) automatically makes me think that either your system PATH does not have the X11 server in the search path or an environment variable needs to be fixed. I wasn't able to see any differences in the Sys.getenv() results after loading rgl but I see that I have these in my PATH: /usr/X11/bin:/usr/X11R6/bin1
For a while I was rather confused about this as well. The XQuartz.app appeared very similar to the the X11.app , showing up with the very similar icons, (both appearing in the Taskbar as "X".)
What is the meaning of the following error when I start RStudio, and how can I address it? I re-installed a new version of R (3.2.1) and did a reinstall of RStudio
"rsession.exe - Entry Point Not Found
The procedure entry point strerror_s could not be located in the dynamic link library msvcrt.dll."
I installed Rstudio with R(3.2.1) to my XP box and get this same error message when opening Rstudio. Clicking "OK" and moving past the error message yields what appears to be a perfectly good Rstudio. That is, I have used tutorials and it works as the tutorial indicates it should. Plotting is fine, calculating is fine, etc.
you can install a old version of Rstudio that was still supporting XP: For instance https://download1.rstudio.org/RStudio-0.98.245.exe
The answer from RockScience points to an out-of-date URL (and older version of RStudio). This is the official RStudio page for older versions, where version 0.98.1103 is available. This message was written in Oct 2016.
On installation the reported error does not occur and everything appears to work fine. However, the following appears in the Console:
Warning message:
R graphics engine version 11 is not supported by this version of RStudio.
The Plots tab will be disabled until a newer version of RStudio is installed.
Not sure of the full meaning of this warning but all plot types that I tested so far seem to work great. They do appear in a separate window, however, and not integrated into the "Plots" tab of RStudio. After installing the "ggplot2" package, the warning still occurs.
I have been having some weird issues with R (3.1.1) and RStudio (0.98.1079) and I suspect that it is due to the fact that these programs are not longer referencing the right places after I upgraded to Mac OSX 10.10.
In particular, I cannot seem to find packages that I know I have installed on my computer to run using the system command in the R console. That is, running man pdflatex in a Terminal window yields the help manual for PDFLATEX. However running system('man pdflatex') from the R console yields the error message No manual entry for pdflatex.
The issue persists even though I reinstalled R, RStudio and MacTex since I upgraded to Mac OSX 10.10. Any help would be appreciated!
Yosemite has a bug wherein some environment variables, including PATH, appear twice in a program's environment with different values. For instance, you might notice that Sys.getenv("PATH") will show you one PATH, and system("echo $PATH") will show you an entirely different one.
I expect that most of your problems are due to this bug.
There are a few workarounds you can try immediately:
You can manually forward PATH yourself. Try this:
> system2("man", "pdflatex", env=paste0("PATH=", Sys.getenv("PATH")))
Or, you can start RStudio from Terminal:
$ open /Applications/RStudio.app
Both the R and RStudio engineers have implemented workarounds in the last few days. R (as of 3.1.2) and RStudio (as of 0.98.1087) should behave as you'd expect.
There are a host of questions about similar problems. All of them appear to come up when you update OS X to either Yosemite or Sierra with an older version of R already installed.
The easiest solution is to completely uninstall R (note the comments about using which R !), and then to install it again.
This also solves problems such as R showing different version numbers in terminal and the GUI.