How to debug IML functions in custom Integromat apps? - make.com

I know that it is possible to write tests for IML functions using the VS Code plugin but couldn't find anything similar to console.log. Is logging available in IML functions?

Use the debug() function inside your own IML functions instead of trying to use console.log. When your IML function is called from any module, the output from the debug() function will be shown in the Live Stream panel within Chrome's Integromat DevTool extension. Similar output will also be available in the Console tab unless this feature is turned off in the DevTool.
For example, writing debug("This is a debug message."); in your IML function will produce the following output:
Integromat DevTool can be downloaded from the Chrome Web Store.

Related

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.

How to call a custom R script using Android?

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?

Automatic documentations of functions for Shiny app using RStudio

I am developing a Shiny app at the moment and getting to a point with more functions than I expected. I plan to start automated testing with testthat and I would love to document my functions with roxygen2.
Since I am using RStudio, I started a new shiny app project. Now I am wondering, since I want the documentation and testing done, if I should instead start a package in RStudio to get all the devtools functions.
I am wondering, how to get the functions documented properly and like in the build, to test the examples. Plus using the testthat functions. How can I set up a project like this?
Since I found now a workflow which works for me, I described this on a different question.
developing shiny app as a package and deploying it to shiny server

Is there any method or plug in to handle R packages in NetBeans

I have created a NetBean GUI application.In that GUI i have added several menu items and i want to handle several statistical functions when clicking each menu items.For that purpose i need R plug in Netbeans such that I can easily link with R.
Thanks
Depending on your requirements there are different ways to do this, e.g. eval, link, pipe, socket or stub. I will write about these 5 methods here:
EVAL:
You can call R and pass in a script-file, R will evaluate the script and return the result of the statistical computation to the console.
(Please also tell us what operating-system you are running on, in the following I will just assume you are running on Windows)
If you have a file a.txt:
1+2
You can enter in the console cmd.exe:
R.exe -f a.txt
LINK:
You link some C-code to the R-sources: this is probably not very interesting to you because Netbeans is written in Java and linking would be difficult.
PIPE:
This is the possiblity you would choose if you want to also use the R-GUI. The above console-eval-option only produces textual output but with this method you can (eventually) also produce graphics and transmit them to Netbeans. You use named pipes (again, i have to assume you are using Windows) which you can open on the R-side with the function pipe().
SOCKET:
analogues, but with the function socketConnection
STUB:
You write a DLL in e.g. C, load the DLL using dyn.load(), and call functions in it with the function .C(); in that DLL you can use e.g. a pipe or socket to communicate with Java.

Resources