<div dir="ltr"><div> </div><div>I have a R list something like this -</div><div> </div><div>op=list(a=200, b="test", c=4.5)</div><div>when I pass it as an argument to Rcp Export function which the code looks like this in below.</div>
<div> </div><div>----------------------------------------</div><div>int n = xlist.length();<br></div><div>for (int I=0; I < n; I++) {</div><div>  SEXP s = xlist[I];</div><div>  if (Rf_isInteger(s)) {</div><div>  //do something</div>
<div>  }</div><div>  else if (Rf_isNumerc(s)) {</div><div>  //do other thing</div><div>  }</div><div>  else if (Rf_isString(s)) {</div><div>  //do other thing</div><div>  }</div><div>}</div><div> </div><div>However, both a and c go to the Rf_isNumeric if statement; but the first one is an integer, not sure why it did not go to into the Rf_isInteger if statement. </div>
<div> </div><div>Thanks.</div><div>  </div><div> </div></div>