Janko Thyson
2010-Sep-15 13:29 UTC
[Rd] Roxygen: question regarding 'use.Rd2' and creation of DESCRIPTION
Dear List, I ran into the following two problems while using the package 'roxygen': QUESTION 1 I split the relevant R-Code for my package into the following scripts: classes.R (S4), functions.R ('standard' functions), generics.R (S4), methods.R (S4). Function package.skeleton() generates Rd-files for all class defs, function defs etc. in dir 'pkg/man'. So far, so good. Now, I'd like to run 'roxygenize()' on dir 'pkg' and face the problem that the argument 'use.Rd2' only works for parts of the Rd-files, no matter how it is specified. Setting it FALSE works for all non-S4 defs, setting it TRUE works for all S4-defs ('works' in the sense of ending up with non-empty \title{} in the Rd-files). However, both types of defs are in 'pkg/man' or 'pkg/R', respectivley. I implemented a workaround in which each of the four scripts is addressed separately by package.skeleton() and roxygenize(). The resulting Rd-files are stored in temp dirs (e.g. 'pkg/tmp_classes', 'pgk/tmp_functions' etc.) and are merged to 'pkg/man' at the very end of the process. But I figured there must be a better or at least more elegant way to do this. Any hints? I should mention that not all of my defs (be it non-S4 or S4) are already prepended with roxygen-code (related to this post http://stackoverflow.com/questions/2316356/can-roxygen-ignore-non-user-funct ions), yet the workaround creates non-empty \title{} for all Rd-files. Is this also possible by running package.skelleton() and roxygenize() just once? QUESTION 2 Even though I followed the roxygen vignette closely and also had a look at the webvis package as suggested here http://stackoverflow.com/questions/3086081/how-do-you-write-your-package-doc umentation, I still cannot reproduce a DESCRIPTION file that reflects the specifications I made via the part of the roxygen-code that is related to stating the package title, author etc. The outcome in the Rd file '<pkg_name>-package.Rd' is fine, but the DESCRIPTION file itself still looks like the dummy created by package.skelleton. Am I doing something wrong here? Thanks very much for any suggestions, Janko