R memory issues after reinstall - r

I have been running several R scripts without issue until one day I tried to open RStudio and it said "Fatal error: unable to open base package in R." I uninstalled and reinstalled both R and RStudio, which solved that issue. However, now when I run one of the R scripts that I had been running previously, I get a "cannot allocate vector of size" error (this is a modeling script with several models and iterations).
Additionally, when I try to load a very large dataset, I was previously able to load it with the line memory.limit(size=18000). Now, it doesn't let me set it to anything above 4000, so I cannot load the dataset. I get the error "Error in memory.limit(size=18000): don't be silly!: your machine has a 4Gb address limit"
I am currently running RStudio 2021.09.2 and R 4.1.2. Before the reinstall, I believe I was running RStudio 1.4.1106 and R 4.1.0.
Thank you.

I had a very similar issue, and it turned out that after updating RStudio, it defaulted to using the 32-bit version of R instead of the 64-bit one. Once I switched it to the 64-bit one in RStudio, the memory issue stopped.
To do this, in RStudio on Windows go to Tools > Global Options and then change the R version... drop-down to the appropriate one installed on your system.

Related

Error Starting R, The R session failed to start

I have seen the message after I terminated R, as one of options proposed while I was constantly getting this message R is taking longer than usual
I am using R x 64 Version 4.1.0
RStudio 1.4.1717, "Juliet Rose" (df86b69e, 2021-05-24) for Windows
Several times, I have attempted to uninstall(and clean AppData)/ reinstall both R and Rstudio, with no improvement.
A reinstallation of RStudio should fix this.

R studio crashes when trying to use package Geneland

I have installed package Geneland (https://github.com/gilles-guillot/Geneland) using github on my MacOS BigSur v.11.2.2 , R version 4.0.4 (2021-02-15), after running it successfully in past and then deleting it.
First time, I have a huge problem with the installation, but now there was no problems with gfortran etc. that I have encountered when installing it for the first time.
Right now I am dealing with R session aborted ("R Session Aborted: R encountered a fatal error. The session was terminated.") when I try to run PostProcessChain after running the MCMC analysis. R session just crushes with no error information. So the software itself run the analysis successfully, I just cannot get any output of the results.
Is there any solution to this or at least a way to find out where is the problem?
The only difference is that I think I had older version of R before.
Thank you for your help.

RStudio Install Packages and Package Updates both download then fail with cannot open file

Running happily with R 3.4 and RStudio 1.0.143 under Win10 this problem occured bringing project development to a halt. Downloads each occur and are unzipped and then the a presumably first file in the first item gets:
Error in install.packages : cannot open file 'C:/Users/Admin/Documents/R/
win-library/3.4/file30504386b80/rJava/javadoc/resources/background.gif':
Permission denied
and the prompt returns.
Updating to R version 3.4.1 (2017-06-30), RStudio Version 1.0.153 was to no avail. Using the OS to remolve all R versions and trying again with 3.4.1 did not work. Removing R again and deleting the R directory to refresh the library did not work. My virius software like to tell how helpful it has been and has not, so that issue seems unlikely.
Giving the user full control of the R library did not help.
could package-updates be a tag like install-updates?
It looks there is a problem between Java and rJava.
You should try reinstalling Java using chocolatey package manager (https://chocolatey.org/) and then reinstall rJava package.
I had a similar issue two weeks ago on a windows laptop.
I had this problem for a long time. only in RStudio.
Install the package on R and Library it. Go to RStudio and require the package.
It works!

Running system command from R console cannot locate installed programs since upgrading to Mac OSX 10.10

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.

R package "repmis" crashes R on library(repmis)

I tried installing a list of packages this morning and had an error which crashed R when I ran library(repmis)
install.packages("repmis")
library(repmis)
I've uninstalled & reinstalled R (on my mac by deleting the app and downloading the new build), but still get an app crash when I run library(repmis).
Can anyone tell me why? And/or how I can more effectively uninstall R to get this package to work again?
Problem solved, I restarted the computer and repeated the procedure above and this time received a prompt to install a Java 6 runtime.
I'm guessing that the dialogue box had issues displaying earlier because of some system printer windows I had open.

Resources