How to call a custom R script using Android? - r

I'm looking to build an Android app which calls an R script on clicking a button. I don't know how to get an R script to run using Android. I tried using openCPU but couldn't get ahead with it. Can anyone tell me how to call a custom R script using Android?

Related

Executing R script from Azure function

I want to execute a R script every time an azure function is triggered. The R script executes perfectly on Azure machine learning Studio. But I am failing to execute through azure function.
Is there any way to execute it?
AFAIK you'll have to create your own Runtime as R isn't supported natively.
Have you already tried "Create a function on Linux using a custom container"? Interestingly they have given R as the example of custom runtime, so hopefully that answers your question.

How to run R script by voice (or chatbot)?

Which R function or R package to use to run an R script via:
voice (voice command)?
chatbot?
I have developped a script that makes some tasks and I m looking for a way to run it and get output data via voice or chatbot
I have already read this one about chatbot https://www.r-bloggers.com/initiating-development-of-a-chatbot-with-plumber-and-ngrok/ but any other tutorial / ressource / R package is really appreciated.
I have also discovered this project that allows user to drive a Shiny app via voice (using Javascript) : https://github.com/yihui/shiny-apps/blob/master/voice/app.R

send invisible command from Electron to R via xterm.js

I am trying to build an Electron app to open a terminal emulator (using xterm.js) and inside that to run R.
Already found this very useful example, and able to automatically run R. But since the Electron user interface will have menus and dialogs (including a data viewer), it is mandatory to:
detect when new objects have been created in the R environment
return (for instance a new data frame) to the Electron app in order to display it
I am thinking to have a set of background R functions to report all of that, however I don't know if:
it is possible to send an invisible command to xterm (which will have an active R session)
the Electron app can receive (invisible) messages from xterm (more specifically, from the R process that is opened within xterm)
All this communication between the Electron app and the R session within xterm should not be echoed in the terminal, of course. It should be somewhat similar to RStudio, where the new R objects are automatically reported from the console to the user interface.
Any suggestion would be highly appreciated.

How to enable browserURL function when using `learnr`

I am using learnr to build up in-class slides held by shiny.io. The codes I would like to show includes some calling an external API. The file is smoothly compiled and uploaded to shiny.io. However, when I ran the codes through the shiny server, I got an error stating that
Cannot visit /tmp/RtmplHHftl/ID_20180123212516_1458.html because the browseURL function is disabled.
I searched online and found only one relevant post from Rstudio connect stating that the problem can be solved by using functions like shiny::tags$a function without any instruction about where and how to insert such functions.

Run R.NET in and Azure Function

I am trying to integrate R into an Azure Function.
Instead of just calling the R exe - I want to be able to try the R.NET library to make it easier to pass and collect data between .NET and R. For example, respond to an event.
It runs fine locally, but once deployed as an Azure function, I get various errors. The latest ": This engine is not running. You may have forgotten to call Initialize"
For anyone else wanting to try this, I had to force the Azure function to run as 64bit, and also install the R extension library to the function. at RDotNet.REngine.CheckEngineIsRunning()
Has anyone had any success? Is anyone with R.NET experience wanting to help getting to work as an Azure function environment?
Looking at the code in R.NET for the functions RDotNet.REngine.GetInstance(), RDotNet.REngine.CheckEngineIsRunning(), and RDotNet.REngine.Initialize(), it appears as though creating the engine instance via RDotNet.REngine.GetInstance() should help you avoid this issue, as after calling that the method should be running, and you should not be encountering this area.
It is possible that you are encountering some error in creating this instance. Looking at the code comments about usage in the above link, it looks like an environment variable needs to be set for PATH. It is possible that the code you used to set this up does not work in Azure Functions. You can manually set environment variables in Azure Functions by using App Settings.

Resources