How come XQuartz/X11 makes the file explorer called with tk_choose.files look like this? - r

MacOS: High Sierra, version 10.13.6
R version: 3.6.1
R studio verison: 1.2.1335
I have been using Anaconda to manage my R packages for a while now. However, I keep getting errors in regards to C and Fortran compilers when trying to install and run packages that depend on them through the Anaconda R studio distribution. Thus I started using the stand-alone version of R studio again. I use the tcltk package in pretty much all of my scripts to easily choose file paths to load multiple data sets etc. When using the tcltk::tk_choose.files() command through the Anaconda R studio distribution, the file explorer window looks like the standard file explorer in MacOS. However, when using the same command in the stand-alone version the file explorer looks like this when running through XQuartz/X11:
My question is why the file explorer suddenly looks this "old" and if there is a way to fix it so I can continue using tcltk? Otherwise are there any alternatives?
I have tried out rJava together with rChoiceDialogs but I cannot get the rChoiceDialogs::jchoose.files() to work.

I managed to solve the issue. Meaning the file explorer looks normal again. I uninstalled my R, RStudio, and XQuartz. I then reinstalled all three using homebrew following the guide posted here.

Related

How to upgrade RStudio version?

Recently I've tried to install keras package in R. I ran the following commands:
install.packages("keras") library(keras)
But when I ran is_keras_avalable() I got FALSE.
I was told, that the problem with unsuccessful 'keras' installation may come from the old RStudio version, which is installed on my notebook (I work in RStudio 3.4.0). I was adviced to reinstall RStudio and to get a brand new version.
Could you, please, tell me how to do it? I'd be very pleased if you provide me with the necessary links for installing the latest RStudio version on Windows 8.1.
Thank you for your help.
RStudio is an application (specifically, an Integrated Development Environment, or IDE). This is a common tool for using R, which is a computer language. Much like Microsoft Word is a common tool for writing documents in English (or other languages - and in fact you can use RStudio to write files other languages like RMarkdown, Python, SQL, French, or Swahili.). However, just like you can write English in programs other than Word, you can also write and run R code in programs other than RStudio.
You can find the most recent version on the RStudio website, or you can look in the Help menu and select "Check for updates", which will give you a download link if a newer version is available.
Given the version number you show, 3.4.0, you need to upgrade R (the language), not RStudio (the application). The current RStudio version as I write this is 1.3.*, while the current R version is 4.0.*.
The place you need to go to update R is CRAN - their website has download links for Windows, Mac, and Linux.

How to change R versions on Mac

I'm trying to use the legacy version of R to run a package on Mac.
On Windows there is a switch in the General tab. However, it is not found on Mac RStudio. I referred to this post: https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R
And I do not quite understand the 3 options:
Run the installer from CRAN for the R version you want to be current
List item Use the RSwitch utility available at: http://r.research.att.com/
Update the R.framework/Versions/Current directory alias directly
using ln -s
Especially for RSwitch utility, how do I even open/use that?
Thanks!
This old question is again timely, with the move to R version 4.
There is an RSwitch.app available for MacOS 10.14+ that provides this functionality via a menu bar app. You can choose which of your R builds to use, integrating with the standard Mac GUI and with RStudio. (I've had trouble with the newest Mac GUI not working with R 3.6.3 but RStudio seems to work fine with both that and R 4.0.1 along with this RSwitch.app.) The help pages for Rswitch show what's going on underneath, if you prefer to work via a command line.
If you use a standard .pkg via GUI to install a newer version of R it will effectively forget the other versions. You can use the command
pkgutil --forget (path to package name)
with the .pkg to overcome that. (I've had trouble installing from a tarball instead; might just be my incompetence.) Installing an older version from a .pkg won't overwrite a newer version but in that case it might be safest to omit any attempt to instal older Tcl/Tk and Texinfo, selectable with the "Customize" button at the "Installation Type" stage of the installation. With security settings in MacOS you might have trouble opening some R .pkg files; the awkward workaround is to use Control/right/two-finger click on the file in the Finder, then select ‘Open With’ and ‘Installer’ from the menu that appears.
The version of RSwitch.app noted in the question is still available via a link from this page. This is evidently 32-bit as it is disabled on my Mac under OS 10.14.

Is R Studio compatible with R 3.4.x?

I have R 3.4.3 installed on my computer. When I point R Studio to this version of R, the program loads a white screen.
Is R Studio compatible with R 3.4.x? What is the highest version of compatibility?
It actually would depend on the version of Rstudio. For the latest ones - yes it is. If your Rstudio is outdated (version 0.*.*) it might have problems with the newest versions of R.
The first step would be to check your R installation. Start R without Rstudio and see if it works. If it doesn't you need to re-install R. If R works fine, then reinstalling Rstudio might be the easiest solution.

Install old version of R on Windows 10

How do I install an old version of R on a window 10 64 PC.
I am currently running R 3.2.3 with RStudio without any problems. However a package I want to use (GSIF) only works on R2.15. I have found that it is possible to easily get RStudio to work with different R versions and I have found and downloaded the old version of R I want ( R-2.15.1-w.tar.gz) from the CRAN archives. My problems is cannot work out how to install the R-2.15.1-w.tar.gz package on a windows machine or in fact even if it is the right package for windows. All the instruction I can find seem to relate to Linux.
Any guidance greatly appreciated.
You can hold down the Control key during the launch of RStudio you can cause the R version selection dialog to display at startup.
https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R

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