[R-pkg-devel] Category (Subjection) in R documentation for package
Duncan Murdoch
murdoch.duncan at gmail.com
Tue Oct 3 00:01:44 CEST 2017
On 02/10/2017 8:10 AM, Mohammad Tanvir Ahamed wrote:
> Thanks.
> But @section makes some section in individual functions help file.
No, I said to put it in the package help file, not an individual
function help file.
But
> I am in interested to add section in main index file of the package.
> This is more or less like sort functions by alphabetic order on the main
> help index of the package. But here I want to add section by my own, not
> with alphabetic order.
There are at least a couple of different locations where a "help index"
is stored. One is in the file <...>/html/00Index.html, where <..> is
the path given by system.file(package="yourpackage"). This file is
produced automatically when the package is built or installed (I forget
which), and there's no way to control the formatting at the level you
want. So a gross hack would be to replace that file with a file of your
own choosing, but you would certainly not be allowed to do that if you
wanted your package to appear on CRAN.
Duncan Murdoch
>
> Regards.............
> Tanvir Ahamed
> Stockholm, Sweden | mashranga at yahoo.com
>
>
>
>
>
>
> On Monday, October 2, 2017, 9:59:06 AM GMT+2, David Hugh-Jones
> <davidhughjones at gmail.com> wrote:
>
>
>
>
>
> In roxygen2 you do
>
> @section Section name:
>
> The colon is important.
>
> David
>
> On 1 October 2017 at 19:50, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> > On 01/10/2017 12:42 PM, Mohammad Tanvir Ahamed via R-package-devel wrote:
> >
> >> I am building package R-studio (Roxygen2).
> >> In the package function documentation, now the standard format is to
> show all function name.
> >>
> >> Now I want to categorize those function under some section/heading.
> >> Can any one please hey me regarding this issue?
> >> Is there any way or idea how one can do it ?
> >>
> >
> >
> > I don't know how to do this with Roxygen2, but what you want to get
> is a package help page (typically yourpackage-package.Rd with
> \alias{yourpackage-package}, and maybe also \alias{yourpackage}). On
> that page you can have sections using
> >
> > \section{section_title}{
> > some content
> > }
> >
> > The "some content" can be a list of links to your help topics using
> \itemize, \enumerate, or \tabular. See the built-in manual "Writing R
> Extensions", and presumably some Roxygen2 documentation to tell you how
> to let all of this get through to the .Rd file.Duncan Murdoch
> >
> >
> > ______________________________ ________________
> > R-package-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/l istinfo/r-package-devel
> >
>
>
More information about the R-package-devel
mailing list