Skip to content

Running R Remotely on LINUX

8 messages · Michael Haenlein, Sarah Goslee, Arnaud Gaboury +4 more

#
Dear all,

I am used to running R locally on my Windows-based PC. Since some of my
computations are taking a lot of time I am now trying to move to a remote R
session on a LINUX server but I am having trouble to getting things work.

I am able to access the LINUX server using PuTTY and SSH. Once I have
access I can log in with my username and password (which is asked through
keyboard-interactive authentication). I can then open an R session.

Since I am not used to working with LINUX, I have several questions:

(1) Ideally I am looking for a Windows-based software that would allow me
to work on R as I am used to with the difference that the computations are
run remotely on the LINUX server. Does a software like this exist? Please
note that I do not think that I can install any software on the LINUX
server. But I can install stuff on my Windows-based PC.

(2) I am running an extensive simulation that takes about one week to run.
Right now it seems that when I log out of R on LINUX and close PuTTY, the R
session closes as well. Is there a way to let R run in the background for
the week and just check into the progress 1-2 times a day?

(3) Can I open several instances of R in parallel? On my PC I sometimes
have 2-3 windows open in parallel that work on different calculations to
save time. Not sure to which extent this is possible on LINUX.

I assume that this questions are very na?ve. But since I?m only used to
working with Windows I?m quite stuck at the moment. Any help would be very
appreciated!

Thanks in advance,

Michael




Michael Haenlein
Professor of Marketing
ESCP Europe
#
Hi Michael,

On Tue, Apr 14, 2015 at 12:57 PM, Michael Haenlein
<haenlein at escpeurope.eu> wrote:
I'm not even sure what this question means, sorry.
Start screen on the linux system, then start R. Once the R job is
running, you can disconnect from the screen with Ctrl-A Ctrl-D and the
R job will continue in the background. Google linux screen for more
information.
Sure. Using screen you can have multiple sessions going.

Sarah
#
On Tue, Apr 14, 2015 at 7:09 PM, Sarah Goslee <sarah.goslee at gmail.com> wrote:
Please have a look at this link[0]. It may help
[0]https://www.opencpu.org/

  
    
#
On Tue, Apr 14, 2015 at 11:57 AM, Michael Haenlein <haenlein at escpeurope.eu>
wrote:
?In addition to my off-list reply, you might want to talk to your Linux
person to see if you can use VNC no NoMachine (https://www.nomachine.com/)
to get a Linux graphical desktop ?connection (similar in concept to Windows
Remote Desktop) going. If you can do this, and can get KDE as the desktop
environment, then you can have a very Windows-ish Linux desktop displayed
on your Windows machine. But it will still be nice even with Gnome, or
XFCE, or even one of the other desktops (Linux has a lot of them, but I
think KDE is most similar to Windows U.I.) This will allow you to use
RStudio on Linux or have multiple terminal sessions going for multiple R
sessions. But this will _not_ allow you to disconnect from Linux while
maintaining the graphical desktop. At least, I don't think you can do that.
I could be wrong.
#
You should investigate using the parallel package. You have to have R installed on the Linux machine along with any contributed packages you use, but you can delegate tasks to it from within an Rgui or RStudio session running on your Windows box. There are even tutorials online that step you through setting up a "cloud" computer to serve this purpose.

It is possible to install R under your own account on a Linux server, but there are more hiccups to overcome in doing so. There is a small charge for using cloud servers, but if you use it right then the cost can be quite cheap.

Note that while you can set up Windows servers in the cloud, they are not as well suited to this remote use as Linux servers are, so it is worth the effort to learn enough to do that.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
On April 14, 2015 9:57:28 AM PDT, Michael Haenlein <haenlein at escpeurope.eu> wrote:
#
I suggest that you investigate installing RStudio server on the Linux
Box. If you do this, you can logon to RStudio (on the Linux server), and
it will look exactly like RStudio running on a windows box. You may need
some help configuring the Linux box to allow access to port 8787, which
is the default port that RStudio Server uses. You may also have to set
port forwarding on your cable modem or firewall.
John  


John David Sorkin M.D., Ph.D.
Professor of Medicine
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology and
Geriatric Medicine
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
You should investigate using the parallel package. You have to have R
installed on the Linux machine along with any contributed packages you
use, but you can delegate tasks to it from within an Rgui or RStudio
session running on your Windows box. There are even tutorials online
that step you through setting up a "cloud" computer to serve this
purpose.

It is possible to install R under your own account on a Linux server,
but there are more hiccups to overcome in doing so. There is a small
charge for using cloud servers, but if you use it right then the cost
can be quite cheap.

Note that while you can set up Windows servers in the cloud, they are
not as well suited to this remote use as Linux servers are, so it is
worth the effort to learn enough to do that.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
 Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------

Sent from my phone. Please excuse my brevity.

On April 14, 2015 9:57:28 AM PDT, Michael Haenlein
<haenlein at escpeurope.eu> wrote:
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Confidentiality Statement:
This email message, including any attachments, is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. Any unauthorized use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message.
#
Hi Michael,
Can't help you on the windows side
There is "screen", a utility that acts as a layer between your login and the actual shell(s) you open.
It allows to detach from and reattach to a session and would nicely fit this requirement.
I'll assume you are not producing any graphics output to screen, that would be difficult.
2 or 3 should be no problem - you'll only be limited by memory (and cores to stay efficient).
open as many connections (or consoles in screen) as needed and start an R in each.
#
On Tue, Apr 14, 2015 at 10:09 PM, John Sorkin
<jsorkin at grecc.umaryland.edu> wrote:
In case you just need a R server, with no IDE (like Rstudio provides
it), please have a look at this project[0]

[0]http://www.obiba.org/?q=node/63