RStudio locally + R cloudly - r

Is there any way to run RStudio locally on my machine but using a remote machine running R as engine instead of my local R install?
To be clear I know that there's the possibility to use RStudio server with a web GUI but I am asking something different. I want to use both my local RStudio app connected to a remote machine running R (possibly through ssh).
Is it possible?

The High Performance Computing Task View may be of some assistance. Unfortunately, I haven't found an easy way to do this and instead simply forward a local RStudio instance on our Linux cluster over X using SSH. You'll need XQuartz if you're on OS X.
I suppose that RStudio Server is probably a better way of doing this. You can easily tie in the RStudio authentication to PAM on your Linux server to authenticate.
ssh -X user#server.com rstudio

Related

Point RStudio to remote R instance

I would like to have RStudio running on my local machine (os x) and the R executable on a remote computer.
I'm aware that I could run RStudio Server on the remote machine and connect to it using a web interface, however I abhor using web interfaces for things like this due to the delays and limited ability to move windows and use shortcuts.
Since RStudio isn't stand alone but points to an R executable elsewhere on the local machine (in a location that can be varied), it seems like in theory this pointer could be to a remote location. (Is there some reason this is incorrect?)
How might I accomplish this?

Running R code via Rstudio on a remote server not by browser

Is there a way to use a local Rstudio installation on my machine which is actually running the code on a remote server where I can run distributed jobs via SLURM?
Can it be compatible with version control and dockers?
The remoter package does what you are wanting to do very well. You start R on the remote server and run remoter :: server(showmsg=TRUE). Then in you local RStudio you run
remoter :: client (). Works fairly flawlessly.
My main issue is that when you run help it comes from the remote session in the console rather than the help window.
https://cran.r-project.org/web/packages/remoter/vignettes/remoter.pdf

Difference between using RStudio on a virtual machine and Rstudio on RServer

I am new in R and I am working with a datasets that has more than 5 millions of observations. So I thought that it would be a good idea to use RStudio on a virtual machine instead of using it on my local machine.
I am reading the documentation about virtual machines and RServer but it is still not clear to me if I have to use Microsoft R Server to create a VIM and then just install Rstudio as I would do in my local machine or if I can create a generic VIM and then install RStudio. Which is the correct way? Why?
If both of these options are possible, which one is the best?
Please help me. Sorry for my confusion.
You can do either. If you are using Azure (which I think you are given that you mention Microsoft R Server), there is also the Data Science VM, which will come preinstalled with RStudio and many other useful programs.
R Server is more for production workloads with R, so unless you are planning that you could probably stick with the Data Science VM. If you end up choosing this option, you can connect directly to an RStudio instance on the R Server from the Azure portal.

Using RStudio with R backend on cluster via SSH

I have access to (not authority over) a computing cluster which has R installed. Is there a way for me to use R-Studio on my local computer -- but have the code running on the cluster via SSH?
To clarify -- No I don't really have non-SSH access, no I can't install R-Studio (server or desktop) on the cluster.
In line with the hackish options #hrbrmstr mentioned...
If your aim is to run mostly non-interactive code, then you can probably establish an n-node parallel::makePSOCKcluster() on the remote machines and run each of your commands via parallel like commands. Similarly, you could use package::svSocket, see this neat demo on YouTube for more details than fit in a reasonable answer.
But, given that you said RStudio, I suspect you are thinking of interactive use, and the above would be doable (but painful). Nothing I know of will let you just pretend that the remote machine is the local machine (which is a pity to be sure). However you might be able to hack something together, with sink() etc and a server and client side loop, e.g. How to connect two computers using R?.

install R on a server which cannot get access to internet

I need to install R on a windows server which does not allow me to get access outside network, i.e., internet. Can I install that as follows: I install the R as well as needed package on another machine, and copy the whole folder to that server. Will this approach work?
Yes, it will. R happily runs off a usb stick, you could use that to copy your installation over.
See here for mre:
Running R on a USB drive
R on Windows FAQ on running R off USB drive
Copying off an existing machine may make assumptions about registry entries etc. This approach seems safer to me.
Easy: Buy the new iPhone5, purchase the Tethering Data Plan, connect your new custom mini-iPhone -to -USB cable to your server, and you've got an internet connection!

Resources