I figured I can actually use NA_LOGICAL, NA_INTEGER , NA_REAL...

Thanks for your help. 


-----Original Message-----
From: Dominick Samperi [mailto:[email protected]] 
Sent: Monday, February 07, 2011 5:33 PM
To: WEI ZHANG
Cc: [email protected]
Subject: Re: [Rcpp-devel] passing NA from C++ to R

R has its own way of representing NA's. See, for example, the fts
package at CRAN,
in particular, the file src/tslib/tslib/utils/numeric.traits.hpp.

Dominick

On Mon, Feb 7, 2011 at 5:23 PM, WEI ZHANG <[email protected]> wrote:
> I would like to know how can I pass NA from C++ to R.
>
> For example, for any integer in C++ , if == -999, I would like to set to
NA
> to pass to R.
>
>
>
> Thanks.
>
>
>
> _______________________________________________
> Rcpp-devel mailing list
> [email protected]
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
>

_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to