[Roxygen-commits] r27 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jun 3 07:06:03 CEST 2008
Author: pcd
Date: 2008-06-03 07:06:03 +0200 (Tue, 03 Jun 2008)
New Revision: 27
Modified:
pkg/R/main.R
pkg/R/parse.R
Log:
more reasonable entry point: parse.file
Modified: pkg/R/main.R
===================================================================
--- pkg/R/main.R 2008-06-03 05:02:50 UTC (rev 26)
+++ pkg/R/main.R 2008-06-03 05:06:03 UTC (rev 27)
@@ -1,7 +1,3 @@
-source('list.R')
source('parse.R')
-srcfile <- srcfile('example.R')
-srcrefs <- attributes(parse(srcfile$filename,
- srcfile=srcfile))$srcref
-parse.refs(zip.list(prerefs(srcfile), srcrefs))
+parse.file('example.R')
Modified: pkg/R/parse.R
===================================================================
--- pkg/R/parse.R 2008-06-03 05:02:50 UTC (rev 26)
+++ pkg/R/parse.R 2008-06-03 05:06:03 UTC (rev 27)
@@ -121,3 +121,10 @@
parse.refs <- function(prerefs.srcrefs)
Map(parse.ref, prerefs.srcrefs)
+
+parse.file <- function(file) {
+ srcfile <- srcfile(file)
+ srcrefs <- attributes(parse(srcfile$filename,
+ srcfile=srcfile))$srcref
+ parse.refs(zip.list(prerefs(srcfile), srcrefs))
+}
More information about the Roxygen-commits
mailing list