Cross-compiling R packages with Fortran shared library - r

I am developing an R package that relies on some Fortran subroutines. I write my code under Linux, but to be able to collaborate with my colleagues who work with Windows, I would like to be able to compile a Windows version of my package.
How to compile an R package for Windows under Linux? I have been looking into this issue on the web and found many suggestions and possible solutions, but no clear advice on how to do this with recent versions of R. It looks like cross-compiling was supported in previous versions of R, but not anymore today.
I am able to compile my Fortran subroutine for Windows under Linux using MinGW, but I am not sure about the next steps to create a package that can be installed on Windows. Does anyone have experience with this?
Any help would be much appreciated, thank you!

Related

Is there an example of using CefSharp.OffScreen.NETCore under Linux?

There is a package CefSharp.OffScreen.NETCore
There is an example of its use under Windows
In theory, the package CefSharp.OffScreen.NETCore should be different from CefSharp.OffScreen cross-platform, that is, the ability to work under Linux. But judging by the example code of its use, it still depends on Windows.
Can this package CefSharp.OffScreen.NETCore work under Linux?
If it can, where can I see an example of its use under Linux?
CefSharp is built with Visual C++ which only runs on Windows.

Switching R version in RStudio temporarily

Sometimes I need to use older version of R in RStudio but I don't want to downgrade R permanently. RStudio for Windows offers a comfortable tool for switching R versions. It is sufficient to open Tools > Global Options > General and switch R version as shown in the picture. But it is not available in RStudio for Linux. I would appreciate some easy and fast method for switching R version, not upgrading/downgrading.
Thanks in advance for answers.

Seeking assistance to install several old R packages on PC running 64-bit, Windows 10

I am reaching out for help, I have a project that needs old versions (plural) of R.
Can anyone assist me to install several versions of R to run on R Studio? An example of the old version of R is at https://cran.r-project.org/bin/windows/contrib/3.3/
A nifty R script would be very handy.
MANY THANKS in advance.

R 3.4.1 Console Interface Very Slow on Mac

I have upgraded R from 3.3.3 to 3.4.1 and am finding that typing text directly into the R Console quickly becomes very laggy, even when R isn't using a lot of resources. I have observed this behavior running the last couple versions of macos sierra (10.12.6, etc.).
It is notable that R functions are not particularly slow when executed. Most of the time I use Textmate 2 to pass code to the console and the code passed in this fashion runs without delay.
I've done extensive searching, but I haven't found anyone else reporting this problem. I've found this behavior on two different macs: 2013 Macbook 13" and 2017 Macbook 15" and have encountered the same problem.
Is there an easy solution to this problem that I'm missing?
The only answer I have been able to find is to roll back R to version 3.3.3, which is the last version before R began using Clang and GNU Fortran to compile the executable (https://cran.r-project.org/bin/macosx/ for more info).
This is not an optimal solution since I have to go back to previous versions of some packages I use (which is further complicated by the hunt for the right version of problematic dependencies). I have been looking through the r-devel threads and don't see a discussion of this, which surprises me because I know that I can't be the only person dealing with this. I will contact the r-devel folks and will update here if I get any additional info.
Update
The discussion on this question has identified that the issue is with the macos R GUI. Unfortunately, it appears that the R GUI developers are aware of this issue, but it is not being listed as a bug. The developers suggest clearing the console – not a workable solution for me given how quickly the problem crops up.
I have come up with a better solution, though it is kind of odd. I realized that since the problem is with the GUI and not R, you can take an old version of the GUI (they are available from the R macos development page). I was hoping to be able to use GUI version 1.69, but this caused a crash immediately. version 1.68 on the other hand does work.
I installed R 3.4.1 on my computer and then downloaded the binary file for GUI version 1.68 and copied it into my applications folder (you don't have to do this, but if you do, make sure to rename the program because otherwise you will replace R). I think opened R via the GUI and loaded R 3.4.1 on R Mac GUI version 1.68. So far it seems to be working fine, confirming that the problem is indeed in the GUI.
The issue actually appeared long ago (at R3.1.2 release) once the developers started to use a newer version of Xcode (I think they moved from v.5 to v.8 and above). At that time Simon told me that this is Xcode and Apple's problem, so they can't do anything about it. He did however forced the compilation with an older Xcode which "avoided" the issue till R3.4. I presume they can no longer use this work-around.
Possible solution:
Try running: rm(list = ls(all.names = TRUE)) This should remove everything from your R console, including hidden objects.
Then run .rs.restartR(), which will restart R. Hopefully, whatever is clogging up the program will be gone.
Have you tried RStudio? I highly recommend that GUI to work with R.
If you need more speed you should considering using R with modified matrix products. For example, to use R with openBLAS I wrote a tutorial here: http://pacha.hk/2017-07-12_r_and_python_via_homebrew.html

How to install and manage multiple versions of R

I am working on a machine that has older version of R. I don't have root access on the machine, and the sys admin is on a vacation.
So the question I have is, how can I install and manage (the packages, especially) the latest version of R? Obviously I need to download the R package and install it, but a few detailed instructions from the community will help.
R noob here. Help will be greatly appreciated. Thanks

Resources