File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,9 @@ Rcomplex Rf_ComplexFromReal(double, int*);
103103				  Memory.h, PrtUtil.h, Utils.h */ 
104104#undef  CALLED_FROM_DEFN_H
105105
106+ Rboolean  Rf_asRbool (SEXP  x ,SEXP  call );
107+ 
108+ 
106109/* UUID identifying the internals version -- packages using compiled 
107110   code should be re-installed when this changes */ 
108111#define  R_INTERNALS_UUID  "2fdf6c18-697a-4ba7-b8ef-11c0d92f1327"
@@ -1727,6 +1730,7 @@ int R_NaN_is_R_NA(double);
17271730void  R_RestoreHashCount (SEXP  rho );
17281731
17291732# define  allocCharsxp 		Rf_allocCharsxp
1733+ # define  asRbool 		Rf_asRbool
17301734# define  asVecSize 		Rf_asVecSize
17311735# define  asXLength 		Rf_asXLength
17321736# define  begincontext 		Rf_begincontext
Original file line number Diff line number Diff line change @@ -1824,6 +1824,14 @@ int asLogical(SEXP x)
18241824    return  asLogical2 (x , /* checking = */  0 , R_NilValue );
18251825}
18261826
1827+ Rboolean  asRbool (SEXP  x , SEXP  call )
1828+ {
1829+     int  ans  =  asLogical2 (x , 1 , call );
1830+     if  (ans  ==  NA_LOGICAL )
1831+ 	errorcall (call , _ ("NA in coerciaon to Rboolean" ));
1832+     return  ans ;
1833+ }
1834+ 
18271835
18281836int  asInteger (SEXP  x )
18291837{
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments