R hangs when trying to save as on mac running high sierra - r

R is hanging and freezing when I try to save as, happens on scripts and graphics files. R is running:
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
This error message happens every time I try to save as, aswell.
objc[7900]: Class FIFinderSyncExtensionHost is implemented in both
/System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit
(0x7fffa33dfb68) and
/System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride
(0x10993bcd8). One of the two will be used. Which one is undefined.
Have tried to use things like running R from bash like suggested in other answers to R hanging but this doesn't help.

Related

R not loading packages on some MAC versions

I am using the regular R console on a MAC Air with Monterrey as the OS and I'm still having issues loading packages. It is iffy, as to whether a package is loaded and ready to use. Sometimes packages will load and sometimes not. Also, it would not call up data sets that as a default are included in the R packages I'm trying to use. the weird thing is it would recognize the example dataset that is included because when I first tied to call them up, it would let me autocomplete the name. Then it stopped doing that. Then it started telling me that the file doesn't exist. I know I haven't used R in a while but this just seems buggy! any help would be appreciated.
The R version that I have installed is : R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics" and it was installed just last week.
It seems R was not properly installed on your machine.
Several persons reported that using the package manager in RStudio actually did the trick of updating the packages.

R memory issues after reinstall

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.

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.

Rscript calling different R version

I have read this post and this post and this post but the solutions there (most notably, using the full path to Rscript) have not resolved my problem:
I have installed the latest R on a server in my local directory (because the system wide R is out of date), and added this directory to the PATH environment variable in .bashrc. From the command line I get the following:
$ R --version
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
And
$ Rscript --version
R scripting front-end version 3.4.3 (2017-11-30)
Which is what I expect. However, if I have the following script (named test.r):
#!/path/to/my/local/bin/Rscript
sessionInfo()$R.version$version.string
I get this:
$ ./test.r
[1] "R version 3.3.2 (2016-10-31)"
Which is a different version.
(On a related note, when I use the parallel and doParallel libraries, it is apparent that the spawned processes are also using the older version of R. I suspect the root of these issues is the same.)
It seems to me that .bashrc is not the right place to set the PATH for this scenario. What is the right way to do this?
Thanks in advance!
EDIT
This scenario arose on an HPC cluster, and I found that module unload R removed the older version of R from my environment. However, even with the old R module loaded, my local version was still first in my PATH, as set by .bashrc. So the environment in which R is getting called by Rscript (or by #!/usr/bin/env Rscript, for that matter) must not be looking in my .bashrc. This is not a shock to me, but I still do not know The Right Way™ to set the PATH so the above works As Expected™.

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.

Resources