<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Fisher test using R for data in Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Fisher-test-using-R-for-data-in-Splunk/m-p/163818#M186033</link>
    <description>&lt;P&gt;Hello. You will have to format your data in a table at then end of your search. The R app will automatically assign that table as the input to your R command. It would look something like this. &lt;/P&gt;

&lt;P&gt;index=summary stats=conversion_rate | table purchase view | r "&lt;BR /&gt;
result = fisher.test(input)&lt;BR /&gt;
output = data.frame(Result=c(result))&lt;BR /&gt;
"&lt;/P&gt;

&lt;P&gt;Your output will be two columns because it is capturing the confidence bounds as well and the p-value. If you want to return just the p-value from the fisher test change the last line to be output = data.frame(Result=c(result$p.value)).&lt;/P&gt;

&lt;P&gt;Hope this helps! &lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2015 18:45:14 GMT</pubDate>
    <dc:creator>clongo01</dc:creator>
    <dc:date>2015-04-23T18:45:14Z</dc:date>
    <item>
      <title>Fisher test using R for data in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fisher-test-using-R-for-data-in-Splunk/m-p/163817#M186032</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I want to perform fisher test on data in Splunk. The table passed to R looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary stats=conversion_rate 
| table _time purchase view
| fields - _time

purchase view
-------- ----
     747 2463
     537 2545
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to to the fisher.t(input), to compare 1st line and 2nd line, and get p-value as a result.&lt;/P&gt;

&lt;P&gt;but I got stuck at a very basic step, creating matrix from data passed from Splunk.&lt;BR /&gt;
Could anyone give me a sample for this? &lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 12:07:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fisher-test-using-R-for-data-in-Splunk/m-p/163817#M186032</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2015-04-23T12:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Fisher test using R for data in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fisher-test-using-R-for-data-in-Splunk/m-p/163818#M186033</link>
      <description>&lt;P&gt;Hello. You will have to format your data in a table at then end of your search. The R app will automatically assign that table as the input to your R command. It would look something like this. &lt;/P&gt;

&lt;P&gt;index=summary stats=conversion_rate | table purchase view | r "&lt;BR /&gt;
result = fisher.test(input)&lt;BR /&gt;
output = data.frame(Result=c(result))&lt;BR /&gt;
"&lt;/P&gt;

&lt;P&gt;Your output will be two columns because it is capturing the confidence bounds as well and the p-value. If you want to return just the p-value from the fisher test change the last line to be output = data.frame(Result=c(result$p.value)).&lt;/P&gt;

&lt;P&gt;Hope this helps! &lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 18:45:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fisher-test-using-R-for-data-in-Splunk/m-p/163818#M186033</guid>
      <dc:creator>clongo01</dc:creator>
      <dc:date>2015-04-23T18:45:14Z</dc:date>
    </item>
  </channel>
</rss>

