[Rcpp-commits] r2954 - pkg/Rcpp/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 5 13:01:21 CEST 2011


Author: romain
Date: 2011-04-05 13:01:21 +0200 (Tue, 05 Apr 2011)
New Revision: 2954

Modified:
   pkg/Rcpp/R/00_classes.R
Log:
not showing 'docstring:' if there is no docstring to show

Modified: pkg/Rcpp/R/00_classes.R
===================================================================
--- pkg/Rcpp/R/00_classes.R	2011-04-05 10:54:02 UTC (rev 2953)
+++ pkg/Rcpp/R/00_classes.R	2011-04-05 11:01:21 UTC (rev 2954)
@@ -46,7 +46,10 @@
     ), 
     methods = list( 
         info = function(prefix = "    " ){
-             paste( paste( prefix, signatures, ifelse(const, " const", "" ), "\n", prefix, prefix, "docstring :", docstrings) , collapse = "\n" )   
+             paste( 
+                paste( prefix, signatures, ifelse(const, " const", "" ), "\n", prefix, prefix, 
+                    ifelse( nchar(docstrings), paste( "docstring :", docstrings) , "" ) 
+                ) , collapse = "\n" )   
         }
     )
 )



More information about the Rcpp-commits mailing list