[Rcpp-commits] r1592 - pkg/Rcpp
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jun 18 10:38:17 CEST 2010
Author: romain
Date: 2010-06-18 10:38:16 +0200 (Fri, 18 Jun 2010)
New Revision: 1592
Modified:
pkg/Rcpp/TODO
Log:
TODO: added comment on SingleLogicalResult
Modified: pkg/Rcpp/TODO
===================================================================
--- pkg/Rcpp/TODO 2010-06-18 08:37:47 UTC (rev 1591)
+++ pkg/Rcpp/TODO 2010-06-18 08:38:16 UTC (rev 1592)
@@ -77,8 +77,22 @@
IntegerVector xx(20) ;
xx[ range(0,9) ] = seq_len(10 ) ;
- o
+ o SingleLogicalResult does not have an operator bool() because of R missing
+ values. So we need is_true, is_false and is_na for SingleLogicalResult
+ objects so that we can do:
+
+ if( is_true( all( x < 5 ) ) ){
+ ...
+ }
+ We can already do
+
+ if( all( x < 5 ).is_true() ){
+ ...
+ }
+
+ but the syntax above seems more natural. maybe not.
+
Testing
o we need to update the doRUnit.R file and replace :
More information about the Rcpp-commits
mailing list