Splunk Dev

How to run R code from some other apps

harshal_chakran
Builder

Hi,

I tried running a script file which i had uploaded on R Project and it is working fine. Now how do or what changes or settings are required to run "|r myscript.r" from other apps in splunk.

Any documentation on same will be highly appreciated.

0 Karma

SanthoshSreshta
Contributor

use output command in the query. like

source ('cal_segm_pie.r')
output = clus()
"

0 Karma

rfujara_splunk
Splunk Employee
Splunk Employee

Have you tries putting...

|r myscript.r

... as searchString of a dashboard panel?

Create a new app, click on dashboards, select one or a new dashboard and finally add a new panel (chart, table, ..) by putting the r command (like above) as search string.

0 Karma

harshal_chakran
Builder

yes, i tried but it's not working. So ultimately i switched to rpy2 for python to connect with R.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...