The ByteCompile & LazyLoading fields

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

The ByteCompile & LazyLoading fields

Colin Gillespie
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]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: The ByteCompile & LazyLoading fields

Jim Hester
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 <[hidden email]> 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]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Loading...