From james.f.hester at gmail.com  Tue Jul  4 10:04:50 2017
From: james.f.hester at gmail.com (Jim Hester)
Date: Tue, 4 Jul 2017 10:04:50 +0200
Subject: [Rd] The ByteCompile & LazyLoading fields
In-Reply-To: <CADbDLZ=YQ9vdHXQ6CzAYmY0syYRJ8aZ0xuYkUzszJ4bgYkDXjQ@mail.gmail.com>
References: <CADbDLZ=YQ9vdHXQ6CzAYmY0syYRJ8aZ0xuYkUzszJ4bgYkDXjQ@mail.gmail.com>
Message-ID: <CAD6tx95Ayf3+0-WLiQRZdL9TpcLBgvb6MHFPC2WLR4xDZvf0_g@mail.gmail.com>

In WRE [1] it states

> Several optional fields take logical values: these can be specified as ?yes?, ?true?, ?no? or ?false?: capitalized values are also accepted.

And if you look at the source [2], [3] you will see exactly what
values this entails.

[1]: https://cran.r-project.org/doc/manuals/r-release/R-exts.html#The-DESCRIPTION-file
[2]: https://github.com/wch/r-source/blob/212add0254abe36d1f77e5248f9c9a2bf95884d8/src/library/tools/R/install.R#L1111
[3]: https://github.com/wch/r-source/blob/a3a73a730962fa214b4af0ded55b497fb5688b8b/src/library/tools/R/utils.R#L2162-L2168

On Mon, Jul 3, 2017 at 2:35 PM, Colin Gillespie <csgillespie at gmail.com> wrote:
> Hi,
>
> In the DESCRIPTION file the ByteCompile and LazyLoading arguments appear to
> accept any value.
>
> From the manual the field should be a "logical field". However, authors
> interpret this in a variety of ways:
>
> unique(tools::CRAN_package_db()$ByteCompile)
> # [1] NA     "TRUE" "yes"  "true" "Yes"  "no"
> # unique(tools::CRAN_package_db()$LazyData)
> # [1] NA               "true"           "TRUE"           "yes"
>  "no"             "false"
> # [7] "True"           "Yes"            "FALSE"          "YES"
>  "LazyData: true" "NA"
> # [13] "No"
>
> I presume that all non NA are treated as TRUE.
>
> This observation applies to other logical fields in the DESCRIPTION file.
>
> Colin
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] The ByteCompile & LazyLoading fields
Jim Hester