[Roxygen-devel] roxygen script
Janssen, B.J.
B.J.Janssen at tue.nl
Wed Aug 4 13:39:16 CEST 2010
Hi,
I added the "-s" option to the roxygen script in pkg/src/ . A svn diff to revision 249 is given below.
If the option is set then use.Rd2=TRUE will be used in the call to roxygenize.
So for example:
R CMD roxygen -d -s basedir
now works and enables Rd2 instead of Rd.
I chose the letter 's' because use.Rd2 effectively means it is able to parse S4 classes.
Regards,
Bart Janssen
Index: roxygen
===================================================================
--- roxygen (revision 249)
+++ roxygen (working copy)
@@ -19,13 +19,14 @@
Options:
-d (Destructive) operate in place on SOURCE
-u (Unlink) clean TARGET first
+ -s (Rd2) enable parsing of S4 tags
-h (Help) print short help message and exit
-v (Version) print roxygen version info and exit
Report bugs to <roxygen-devel at lists.r-forge.r-project.org>."
-while getopts duhv OPT; do
+while getopts dushv OPT; do
case $OPT in
d|+d)
destructive="TRUE"
@@ -33,6 +34,9 @@
u|+u)
unlink="TRUE"
;;
+ s|+s)
+ rd2="TRUE"
+ ;;
h|+h)
echo ${usage}
exit 0
@@ -95,15 +99,18 @@
: ${unlink:="FALSE"}
: ${copy:="TRUE"}
+: ${rd2:="FALSE"}
debug () {
- echo source: "${source}"\; target: "${target}"\; copy: "${copy}"\; unlink: "${unlink}"
+ echo source: "${source}"\; target: "${target}"\; copy: "${copy}"\; unlink: "${unlink}"\; rd2: "${rd2}"
}
+
R_EXE="${R_HOME}/bin/R"
echo "library(roxygen)
roxygenize(package.dir=${source},
roxygen.dir=${target},
copy.package=${copy},
- unlink.target=${unlink})" | \
+ unlink.target=${unlink},
+ use.Rd2=${rd2})" | \
"${R_EXE}" --no-restore --slave
More information about the Roxygen-devel
mailing list