From hb at biostat.ucsf.edu  Fri May  2 19:07:14 2014
From: hb at biostat.ucsf.edu (Henrik Bengtsson)
Date: Fri, 2 May 2014 10:07:14 -0700
Subject: [Rd] Authors@R: and Author field
In-Reply-To: <53634F84.7000207@knut-krueger.de>
References: <53634F84.7000207@knut-krueger.de>
Message-ID: <CAFDcVCSAc2f+YoOH7LQRMWU07H49opUZWfbDfeAmpxoMSQUfCA@mail.gmail.com>

On Fri, May 2, 2014 at 12:55 AM, Knut Krueger <rh at knut-krueger.de> wrote:
> Hi to all
>
>
> Authors at R: c(person("fooa","foob", role = c("aut","cre"),
>                       email = "fooa.foob at fooc.de"),
>          person("foo1","foo2", role = c("ctb"),
>                  email = "foo1.foo2 at foo3.de"))
> Author: fooa foob, with contributions from foo1 foo2
> using r CMD check --as-cran ..   (R 3.1 and Windows) I get an error
>
> Author field differs from that derived from Authors at R
>    Author:    'fooa foob, with contributions from foo1 foo2
>    Authors at R: 'fooa foob [aut, cre], foo1 foo2 [ctb]'
>
> as I can see it is the same as in
> http://cran.r-project.org/doc/manuals/R-exts.html#The-DESCRIPTION-file
>
> and additionally
>  > Both 'Author' and 'Maintainer' fields can be omitted if a suitable
> 'Authors at R' field is given.

Yes, that passage in WRE is confusing/misleading, because it will give
a NOTE with 'R CMD check --as-cran'
[https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15470].   In
order not to get that NOTE, you need to use:

Authors at R: c(person("fooa","foob", role = c("aut","cre"), email =
"fooa.foob at fooc.de"),
                     person("foo1","foo2", role = c("ctb"), email =
"foo1.foo2 at foo3.de"))
Author: fooa foob [aut, cre], foo1 foo2 [ctb]

The 'Author' field *must be the same* as the string generated by R
from 'Authors at R'.

>
> is not working if the Author field is empty  or missing it will give an
> error

Actually, you can drop the 'Author' field unless you need build your
package on legacy versions of R.  I think in R (>= 2.14.0), you can
use the 'Authors at R' field by itself.  Many package do that.

Hope this helps,

Henrik

>
> Kind regards Knut
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Authors@R: and Author field
Henrik Bengtsson