1. Introduction

The (hidden) directory .R in the dplR source repository contains
suggested R initialization files to use when building, checking and
installing (compiling) the dplR package.  The initialization files
should generally be placed in HOME/.R/ where HOME is the user's home
directory.  Some customization may be required depending on the
platform.  Check if the files already exist and combine the suggested
"dplR settings" with your previous settings if appropriate.


2. List of files included, and the settings explained

* Makevars

This file is used when R CMD INSTALL compiles the C source code
included in dplR.  The compiler flags in the Makevars file should work
with the GCC compiler.  Other compilers may require different flags.

The following variables are set:

CFLAGS=-Wall -pedantic -Wextra

  The purpose of the flags is to enable more thorough warnings than
  those used by default [1, Customizing package compilation].  The
  warnings are useful in the development phase when making changes to
  the C code.  Because all issues should be solved before releasing
  the package on CRAN, there is no need to distribute a Makevars file
  with dplR (as long as Makevars serves no other purpose than to add
  more compile time checks).  Spurious warnings may occur when using
  an old compiler.  A list of known cases:
    - warning about imaginary constants being a GNU extension by
      Apple's gcc 4.2, OS X 10.7

Note that a matching platform-specific Makevars file
(Makevars-R_PLATFORM, Makevars.win or Makevars.win64), if available,
takes precedence over a generic Makevars file.  If you already have a
platform-specific Makevars file, consider adding these definitions
there.

* build.Renviron

This is used with R CMD build [2, Checking and building packages].
The following environment variables are set:

LC_ALL=en_US.UTF-8

  The locale is set to use the UTF-8 character set and US English.
  UTF-8 is used because dplR specifies UTF-8 as its Encoding in the
  DESCRIPTION file.  The language setting may not matter, but one must
  be chosen, and the en_US.UTF-8 locale is probably available on most
  systems.

* check.Renviron

Settings for R CMD check [2, Checking and building packages]: locale
as in build.Renviron.


References

[1] R Installation and Administration (R-devel).
    http://cran.r-project.org/doc/manuals/r-devel/R-admin.html
    (Accessed 2022-05-26)

[2] Writing R Extensions (R-devel).
    http://cran.r-project.org/doc/manuals/r-devel/R-exts.html
    (Accessed 2022-05-26)

