Can RStudio (IDE NOT server) be configured to use remote R setup? - r

I am transitioning my debian setup into one where all debian-repository external apps run in dedicated docker containers.
In this context rstudio, of which I am a heavy user, has me puzzled ... does anybody have insight into whether it's possible to run it as a client to remote R installation?

What is a very cool feature of RStudio is RStudio Server. You install RStudio Server on you Ubuntu server and log in to a specific port where RStudio Server is running. You then get your full RStudio interface in your web browser. This allows you to run all your R analyses from any computer that has a modern browser and an internet connection.
R then runs on the remote server, asking almost no resource from the computer you are connecting from.

Related

Serve an opencpu app on an ipv4 address in a windows environment

The way opencpu "productionnise" an app is to get your own linux server then to install your package and then launch your app.
Before that, I am still in a dev environment, where I work on a windows machine.
I would like to run the app locally behind a firewall and send the ipv4 link of my machine to a collegue, to allow him to test my app, using my machine as a server.
Is there a way to serve my app on the Ipv4 address of my windows machine?
From what I understand, on a windows machine, the adviced architecture would be more to use a vm to emulate a linux server. But if there is a way to avoid it, it would be nice.
You can start a local OpenCPU server via opencpu::ocpu_start_server(), which uses port 5656 by default. If you then point your browser to http://<your-ip>:5656/ocpu, you will be greeted with the normal OpenCPU interface.

How to run R codes on remote machine from local machine

maybe the question title is a little bit weird... I will explain more here...
Basically, suppose that I have a local laptop and a remote machine. I can of course run R tasks on the remote machine itself. Now I wonder if I can connect the remote machine from my local R and run the tasks on the remote machine while I still call these things in my local machine... that is I don't need to open R or type/source R codes on the remote machine.
One related thing is that I am considering to develop a small app with R-shiny. As far as I understand, though I just started looking into it, one can have R installed the local machine and use the app - the calculation will be done in R on the same machine. This question is essentially that if it is possible to add a feature of “connection to a calculation back end” in the app, i.e. by connecting to the remote machine, the task is done on the remote machine when one uses the app on his local machine.
You can do this with RStudio Server. It runs RStudio inside a web server on the remote machine. You connect to it from the web browser on your local laptop, so you can still enter your R code on the local machine.
RStudio Server can be downloaded here:
https://www.rstudio.com/products/rstudio/download-server/

How do I view the Meteor app running on the VM at localhost:3000?

Hi I'm trying to make my first meteor app. I just made an app and have run it. I've also upgraded to latest meteorite and meteor. I just created a new app and have run it.
App running at: http://localhost:3000/
But I cannot view this webpage on my host computer. I'm running meteor on an ubuntu vm.
It was working before I updated meteorite and meteor and installed the iron-router package to an app I'm working on.
check in the console you might have the error as template is not defined, Meteor is not defined etc...
I too was unable to connect to the Meteor App that was being developed on a centos VM.
The followuing worked:
Setup:
Windows 7/8.1 with Following tools installed:
Putty
VMW Workstation
Centos VM (Server or GUI based)
Chrome/Mozilla Browsers
Launch the VM from VMW Workstation
Console into the VM using Putty
Launch the Meteor App. Will show its listening at localhost?3000
Launch a new session of Putty.
Go To SSH-Tunnels - Source: 3000, Destination - Localhost:3000. Save this settings
Connect to the VM with these settings
Launch the browser and and navigate to localhost:3000
Worked for me, hope does for all
As you have determined, the message on the vm regarding localhost:3000 refers to the vm that is running meteor, and localhost on your computer refers to your computer.
The secure fix for this is to create an encrypted tunnel to connect localhost:3000 on your computer to localhost:3000 on the remote computer.
Start the meteor app on the VM so that you get the message about it being ready on localhost:3000
On the local computer open another terminal window and initiate a second connection to the VM with:
ssh -L 3000:localhost:3000 yourUSER#remoteHOST
This assumes you are running Linux. If you are on Windows, look at the options for your SSH client. It may have similar options to create tunnels.
Open a web browser on your local computer and go to http://localhost:3000
The ssh tunnelling software will sense the connection to localhost:3000 on your computer and will connect you to localhost:3000 on the remote, forwarding the data through an encrypted tunnel.
If this seems like a lot of trouble, there are paid developer platforms like http://nitrous.io that can run meteor and have a web based IDE that can simplify this sort of thing for you so you do not need to run the tunnel. Another way to simplify is to not use a remote VM, but install Meteor on the home computer and only copy the code to a VM when it is finished and ready for production.
If you don't want to run on localhost:3000 at all, but on the webserver on port 80, you might check to see if there is an environment variable that switches the code from development mode to production.

Shiny works fine on localhost but not from remote host, where re is shiny-server.conf on a Windows?

After updating R from 3.0.2 to 3.0.3 and updating the shiny package the applications I wrote are no longer accessible from remote hosts. They work fine when accessed from machine they are running on using http://localhost:8101. The host OS is Windows Server 2008R2.
I have the feeling that there is a setting a config file that is disallowing access from remote hosts. Where is shiny-server.conf on Windows? I searched for it but could not find it.
Thanks.
you could run app using host parameter:
runApp("you_app", host="0.0.0.0")
and it should be vailable from outside (if there is not any firewall/apache/proxy etc)
Default value for host is 127.0.0.1.

RStudio through SecureCRT

I would like to setup RStudio so that it uses a remote R session (console) that I am connected to through secureCRT. Is there a way to tunnel commands so that they are sent directly from RStudio to that remote session?
I'm not aware of any way to do this, but if your goal is to have an R session running somewhere remotely that you can connect to from anywhere, this is indeed possible using RStudio.
Set up the RStudio Server--it will start a web server that serves the RStudio IDE as a web app. From there, you can connect to your R session (and IDE session) from any web browser.

Resources