<?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 R script error in Qlik sense  AAI in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/R-script-error-in-Qlik-sense-AAI/m-p/1511009#M14499</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;&lt;SPAN&gt;SSE R plug in for a decision tree in Qlik sense.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the sample qvf, the decision tree could be successfully generated by:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;R.ScriptAggrExStr('SNSN',' 
library(rpart); 
library(partykit); 
library(d3r); 
library(grid);
library(jsonlite);
d3_party(rpart(survived ~ ., data=q, method="class")); 
',
sex, pclass, age_b, survived)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I want to use the generated decision tree to get the prediction result in the "Table", so I tried to use the code below:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;R.ScriptEvalExStr('SNSN','  
library(rpart);  
library(partykit);  
library(d3r);  
library(grid); 
library(jsonlite); 
model&amp;lt;-rpart(survived ~ ., data=q, method="class");  
predict(model,type="class"); '
, sex, pclass, age_b, survived)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But it did not work, and SSEtoRserve.exe was saying:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;Error: variables 'sex', 'pclass', 'age_b' were specified with different types from the fit&lt;/PRE&gt;&lt;P&gt;Any one with some ideas about this?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 07:13:49 GMT</pubDate>
    <dc:creator>linjiao2c</dc:creator>
    <dc:date>2024-11-16T07:13:49Z</dc:date>
    <item>
      <title>R script error in Qlik sense  AAI</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/R-script-error-in-Qlik-sense-AAI/m-p/1511009#M14499</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;&lt;SPAN&gt;SSE R plug in for a decision tree in Qlik sense.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the sample qvf, the decision tree could be successfully generated by:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;R.ScriptAggrExStr('SNSN',' 
library(rpart); 
library(partykit); 
library(d3r); 
library(grid);
library(jsonlite);
d3_party(rpart(survived ~ ., data=q, method="class")); 
',
sex, pclass, age_b, survived)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I want to use the generated decision tree to get the prediction result in the "Table", so I tried to use the code below:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;R.ScriptEvalExStr('SNSN','  
library(rpart);  
library(partykit);  
library(d3r);  
library(grid); 
library(jsonlite); 
model&amp;lt;-rpart(survived ~ ., data=q, method="class");  
predict(model,type="class"); '
, sex, pclass, age_b, survived)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But it did not work, and SSEtoRserve.exe was saying:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;Error: variables 'sex', 'pclass', 'age_b' were specified with different types from the fit&lt;/PRE&gt;&lt;P&gt;Any one with some ideas about this?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:13:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/R-script-error-in-Qlik-sense-AAI/m-p/1511009#M14499</guid>
      <dc:creator>linjiao2c</dc:creator>
      <dc:date>2024-11-16T07:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: R script error in Qlik sense  AAI</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/R-script-error-in-Qlik-sense-AAI/m-p/1514012#M14500</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You expect SNSN. Can you change the respective &lt;U&gt;number&lt;/U&gt; variables in:&lt;/P&gt;&lt;P&gt;--&amp;gt;num(pclass) as pclassNumber&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&amp;gt;&lt;SPAN&gt;num(survived) as survivedNumber&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/Christos K.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 06:49:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/R-script-error-in-Qlik-sense-AAI/m-p/1514012#M14500</guid>
      <dc:creator>ckarras22</dc:creator>
      <dc:date>2018-11-29T06:49:52Z</dc:date>
    </item>
  </channel>
</rss>

