We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 49d7908 + 263a690 commit 80e69c6Copy full SHA for 80e69c6
inst/include/Rcpp/sugar/functions/ifelse.h
@@ -2,7 +2,7 @@
2
//
3
// ifelse.h: Rcpp R/C++ interface class library -- ifelse
4
5
-// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2010 - 2014 Dirk Eddelbuettel and Romain Francois
6
7
// This file is part of Rcpp.
8
@@ -54,7 +54,7 @@ class IfElse : public VectorBase<
54
55
inline STORAGE operator[]( int i ) const {
56
int x = cond[i] ;
57
- if( Rcpp::traits::is_na<LGLSXP>(x) ) return x ;
+ if( Rcpp::traits::is_na<LGLSXP>(x) ) return Rcpp::traits::get_na<RTYPE>() ;
58
if( x ) return lhs[i] ;
59
return rhs[i] ;
60
}
0 commit comments