[Sciviews-commits] r111 - pkg/svTools/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 12 12:09:15 CET 2009


Author: romain
Date: 2009-02-12 12:09:15 +0100 (Thu, 12 Feb 2009)
New Revision: 111

Modified:
   pkg/svTools/R/sidekick.R
Log:
small fix to cope with srcref being oif size 6 in R-devel

Modified: pkg/svTools/R/sidekick.R
===================================================================
--- pkg/svTools/R/sidekick.R	2009-02-04 12:24:03 UTC (rev 110)
+++ pkg/svTools/R/sidekick.R	2009-02-12 11:09:15 UTC (rev 111)
@@ -51,7 +51,6 @@
 
 
 sidekickParse <- function( p = try( parse(file), silent = TRUE) , top = TRUE, env = new.env(), parent = 0, file ){
-	
 	if( top ) {		
 		env[["data"]] <- data.frame( 
 			id = integer(0), 
@@ -76,7 +75,7 @@
 	hasAttrs <- "srcref" %in% names(atts)
 	ids <- maxId + 1:length(p)
 	if( hasAttrs ){
-		srcrefs <- t( sapply( attr(p, "srcref"), as.integer ) )  
+		srcrefs <- t( sapply( attr(p, "srcref"), function( y ) as.integer(y)[1:4] ) )  
 		colnames( srcrefs ) <- paste("srcref", 1:4 , sep = "")
 		srcrefs <- as.data.frame( srcrefs ) 
 		modes <- sapply( p, mode )



More information about the Sciviews-commits mailing list