rpackagemanual

How to include Authors@R in the manual of R package?


I have the following description file as part of my R package

Package: blah
Title: What the Package Does (one line, title case)
Version: 0.0.0.9000
Authors@R: person("Jon", "Snow", email = "jon.snow@jonsnow.ac.uk", role = c("aut", "cre"))
Description: What the package does (one paragraph).
Depends: R (>= 3.5.1)
License: What license is it under?
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.0.9000

I have documented my code and would like to produce a manual that accompanies it. In a previous post, people have mentioned using the command R CMD Rd2pdf <work directory> and I managed to produce a manual.

The issue is that in my manual, the bit before R topics documented does not show the authors but everything else. I have installed packages such as devtools, knitr, roxygen2 and testthat. Any advice would be highly appreciated.


Solution

  • If you want to include multiple authors, you have to wrap all persons in c().

    See the DESCRIPTION of sf for example, which looks something like this:

    Authors@R: 
      c(person(given = "Edzer",
               family = "Pebesma",
               role = c("aut", "cre"),
               email = "edzer.pebesma@uni-muenster.de",
               comment = c(ORCID = "0000-0001-8049-7069")),
        person(given = "Jeroen",
               family = "Ooms",
               role = "ctb",
               comment = c(ORCID = "0000-0002-4035-0289")),
        person(given = "Kirill",
               family = "Müller",
               role = "ctb"))
    

    If there is only one author, you can simply write:

    Author: Lax Chan