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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 6 11:30:46 CEST 2009


Author: romain
Date: 2009-06-06 11:30:45 +0200 (Sat, 06 Jun 2009)
New Revision: 140

Modified:
   pkg/svTools/R/sidekick.R
Log:
minor fixes in svTools (sidekick)

Modified: pkg/svTools/R/sidekick.R
===================================================================
--- pkg/svTools/R/sidekick.R	2009-06-06 08:47:22 UTC (rev 139)
+++ pkg/svTools/R/sidekick.R	2009-06-06 09:30:45 UTC (rev 140)
@@ -29,16 +29,10 @@
 		if( file %~% '^rwd:' ){
 			file <- sub( 'rwd:', getwd(), file ) 
 		}
-		
-		filename <- file
-		file <- file( filename, encoding = encoding )
-		on.exit( close( file ) )
-	} else {
-		filename <- summary(file)$description
 	}
 	
 	### try to parse and return an error if failed
-	p <- try( parse( file ), silent = TRUE )
+	p <- try( parse( file, encoding = encoding ), silent = TRUE )
 	if( p %of% "try-error" ){
 		return( list( type = "error", data = parseError( p ) ) )
 	}



More information about the Sciviews-commits mailing list