Learn R Programming

rjags (version 4-18)

pkg.compile.flags: Get package compile flags

Description

Function to check binary compatibility for R packages implementing JAGS modules, as well as retrieving the necessary compile flags to link to the same version of JAGS that rjags itself uses.

Usage

pkg.compile.flags(type = c("ALL", "JAGS_ROOT", "JAGS_VERSION", "RJAGS_VERSION",
  "CPPFLAGS", "CXXFLAGS", "LIBS"), print=type!="ALL")

Value

The function prints and returns (invisibly) one of the following character strings, depending on the type requested:

ALL

A list of all the values below (default).

JAGS_ROOT

The location of the JAGS installation that rjags is linked to.

JAGS_VERSION

The version of JAGS linked to.

RJAGS_VERSION

The version of the rjags package.

CPPFLAGS

The required PKG_CPPFLAGS.

CXXFLAGS

The required PKG_CXXFLAGS (may be empty).

LIBS

The required PKG_LIBS.

Arguments

type

the compile flag to display (see value)

print

by default the value is printed using cat (for easier use in Makevars files) except when the type is ALL

Author

Matt Denwood

Details

This function is provided for authors of R packages implementing JAGS modules for use within the Makevars(.win/ucrt) files in order to ensure that these packages are binary compatible with rjags. See also load.pkg.module

Examples

Run this code
pkg.compile.flags()

Run the code above in your browser using DataLab