<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Dirk and Romain,<small><small><br>
      </small></small>Spot on. I will stick to float for the foreseeable
    future. <br>
    Thanks a lot, <br>
    <br>
    Dirk, <br>
    I still couldn't find information for the <b>Rcpp:List</b> class
    from here:<br>
    <a class="moz-txt-link-freetext" href="http://dirk.eddelbuettel.com/code/rcpp/html/namespaceRcpp.html">http://dirk.eddelbuettel.com/code/rcpp/html/namespaceRcpp.html</a><br>
    More generally, where is the best place to look for information
    about a particular class? <br>
    <br>
    Cheers, <br>
    Cedric<br>
    <br>
    <br>
    <br>
    On 21/12/10 17:44, <a class="moz-txt-link-abbreviated" href="mailto:romain@r-enthusiasts.com">romain@r-enthusiasts.com</a> wrote:
    <blockquote cite="mid:49645.1292953486@r-enthusiasts.com"
      type="cite">
      <pre wrap="">
 Le mar 21/12/10 17:24, "Cedric Ginestet" <a class="moz-txt-link-abbreviated" href="mailto:c.ginestet05@googlemail.com">c.ginestet05@googlemail.com</a> a &eacute;crit:
</pre>
      <blockquote type="cite">
        <pre wrap="">Dear Rcpp experts, 

When passing a vector/argument with infinite values to a C++
function, the R wrapper returns NA's. [See the code below] Is there a
way around this to ensure that infinite values are preserved from R to
C++ and then from C++ to R again? 
</pre>
      </blockquote>
      <pre wrap="">
There is no such thing as an infinite value for integers in R. 

</pre>
      <blockquote type="cite">
        <pre wrap="">as.integer(Inf)
</pre>
      </blockquote>
      <pre wrap="">[1] NA
Message d'avis :
NAs introduits lors de la conversion automatique

The D matrix you build is a numeric matrix, when you use the IntegerMatrix constructor, there is coercion to an integer matrix. 

Hope this helps, 

Romain

</pre>
      <blockquote type="cite">
        <pre wrap="">######################################
D  src3  IntegerMatrix xD(D);
IntegerVector Drow(xD.ncol()); 
for(int i=0; i return xD;
'
rowExtraction  cxxfunction(signature(D="matrix"),body=src3,plugin="Rcpp",verbose=TRUE)
rowExtraction(D)
######################################

Thank you very much, 
Cedric 

-- 
Cedric Ginestet 
Centre for Neuroimaging Sciences (L3.04) 
NIHR Biomedical Research Centre 
Department of Neuroimaging 
Institute of Psychiatry, Box P089 
King's College London 
De Crespigny Park
London 
SE5 8AF 
Tel: (+44) 20-3228-3052
Fax: (+44) 20-3228-2116
Email: <a class="moz-txt-link-abbreviated" href="mailto:cedric.ginestet@kcl.ac.uk">cedric.ginestet@kcl.ac.uk</a>



</pre>
      </blockquote>
      <pre wrap="">
</pre>
    </blockquote>
  </body>
</html>