Skip to content
Prev 2143 / 10988 Next

[Rcpp-devel] Boolean vector from R to C++

On Thu, Apr 14, 2011 at 10:00 AM, Cedric Ginestet
<c.ginestet05 at googlemail.com> wrote:
In R a logical vector is an IntegerVector.  You could transform it to
a std::vector<bool> if you were particularly concerned about space but
you would lose the ability to represent missing values.  That is,
elements of an R logical vector can be TRUE, FALSE or <NA> whereas the
C++ bool type can only be true or false.