[Roxygen-devel] roxygen script
Tobias Verbeke
tobias.verbeke at gmail.com
Wed Aug 4 21:43:59 CEST 2010
L.S.
On 08/04/2010 06:28 PM, Peter Danenberg wrote:
> Thanks, Bart; Manuel and I were trying to come up with a general
> mechanism for modifying the behavior of roxygenize by e.g. specifying
> options, adding roclets, etc.
>
> use.Rd2=TRUE could be specified by a more general mechanism; or do you
> think it warrants its own option?
As far as I understand Rd2 only extends Rd. Wouldn't it make sense
to merge Rd2 and Rd, and drop Rd2 alltogether ? Support of S4 seems
too fundamental to make it optional, for example.
Great to hear BTW you're preparing further work on roxygen.
This is a beautiful project and really deserves active
development and bug fixing!
Best,
Tobias
>> 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
>>
>>
>>
>> _______________________________________________
>> Roxygen-devel mailing list
>> Roxygen-devel at lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel
>>
> _______________________________________________
> Roxygen-devel mailing list
> Roxygen-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel
>
More information about the Roxygen-devel
mailing list