Deploy R script in a portable usb form - r

I have an R script which I want to deploy so that it's idiot-proof, one click runs it etc. Unfortunately I don't have the means to pay for a server, and the environment in which it needs to run does not allow the installation of new software, only portable style apps can be run. (School computers) My script also relies on several non-base packages.
Is there any way to deploy R and my script in an easy to run way so it can be used off a usb stick?

You can install R on a USB drive and use it on any computer running the same OS. If you're using Windows, see question 2.6 of the R for Windows FAQ.

If you made the USB stick a bootable disk environment (say linux) with R installed on it, you could boot off it and do it that way.

Related

Notebook instance running R with a GPU

I am new to cloud computing and GCP. I am trying to create a notebook instance running R with a GPU. I got a basic instance with 1 core and 0 GPUs to start and I was able to execute some code which was cool. When I try to create an instance with a GPU I keep getting all sorts of errors about something called live migration, or that there are no resources available, etc. Can someone tell me how to start an R notebook instance with a GPU? It can't be this difficult.
The CRAN (The Comprehensive R Archive Network) doesn't support GPU. However, you can follow this link might help you to install a Notebook instance running R with a GPU. You need a machine with Nvidia GPU drivers installed then install R and Jupyter Lab. After that compile those R packages which require it for use with GPU's.

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.

Setting up RStudio Portable Default R version

I recently discovered a portable version of R and RStudio #
http://rportable.sourceforge.net/
Open source rocks!
At any-rate, I am jumping from pc to pc at my university, and I'd like to get Portable R-studio to recognize Portable R as the default R version. Most computers at the university already have several versions of r-installed, and RStudio uses one of those versions of R. When I go into the Global Options to change the default version, it does not "see" portable R on the USB drive.
I am basically hopping I can run R without constantly having to download packages, specifying the work directory, downloading Scripts, data from Google Drive, etc...
Any suggestions? I am open. Thanks for your help.
I did not need to touch the registry.
I first installed R portable and then R Studio portable, both from Sourceforge.
After launching R Studio for the first time, I was shown the option of choosing the installation of R to be used, as shown in
https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R
I browsed to branch \PortableApps\R-Portable\App\R-Portable\bin, where executables are located. There I selected the 64-bit version.
If you want to change later the version used, you open R Studio and go to Tools -> Option -> General -> R Version.
This avoids modifying the registry, with the two advantages of Portable Apps:
Leaving no trace of the app in the system (or, at least, a much milder one).
Being really portable (or, at least, much more so).
On Windows, RStudio uses the system registry to find where installed versions of R are located. You'll need to edit the registry yourself to let it know about new versions. Fortunately you can do this in HKEY_CURRENT_USER so admin rights shouldn't be required. Here are the keys and values you'll want to write:
http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Does-R-use-the-Registry_003f
More detail about how RStudio selects the R version to run here:
https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R
The link to R Portable above is a bit misleading. In order to run a portable version of R AND RStudio, you also need the 27MB portable RStudio here. What's even more confusing is that it has the same name as the RPortable file.
It took me a bit of time to figure that one out. Perhaps you could edit your question to point to both for those who wish for an IDE?
And, IMHO, it's not truly portable, because when you move from one machine to another you need to specify the R version on your USB drive and also the work directory. Pity.
I manage to link RStudio (not portable version) to the aforementioned version of R Portable, directly through Global Options -> R Version -> Choose a specific version of R -> Browse,
and the trick was selecting the R-Portable\App\R-Portable folder. Choosing another one doesnt allow RStudio to find the instalation.
Im running RStudio 1.1.463.
Bye!

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!

OpenCL development platform?

I am developing OpenCL code on a linux cluster through SSH -
are there any tools that would make this process easier, i.e.
something like NVIDIA Parallel Nsight for OpenCL ?
No there is no such tool, though you might try developing your code using ordinary computer and post production versions there..
If the computer where you perform development is also running Linux, you can easily mount a remote folder as local. In a Gnome environment, open Nautilus (the file manager), click File => Connect to server, chose SSH, fill the required parameters, and you have a remote folder as local.
You can then use any IDE you want to develop code, and maybe perform simple runs, tests and debugs if the OpenCL tools (compiler, debugger) you're using remotely are also installed locally. However, To compile and properly run the code on the cluster, you need to use the ssh client on the command line.

Resources