install_cmdstan() function attempts to download and
install the latest release of
CmdStan or a
development version from a repository. Currently the necessary C++ tool
chain is assumed to be available (see Appendix B of the CmdStan
guide), but in the
future CmdStanR may help install the requirements.
rebuild_cmdstan() function cleans and rebuilds the cmdstan
installation. Use this function in case of any issues when compiling
cmdstan_make_local() function is used to read/write makefile flags
and variables from/to the
make/local file of a CmdStan installation.
Writing to the make/local file can be used to permanently add makefile
flags/variables to an installation. For example adding specific compiler
switches, changing the C++ compiler, etc. A change to the make/local file
should typically be followed by calling
install_cmdstan( dir = NULL, cores = getOption("mc.cores", 2), quiet = FALSE, overwrite = FALSE, timeout = 1200, release_url = NULL, flags = list() ) rebuild_cmdstan( dir = cmdstan_path(), cores = getOption("mc.cores", 2), quiet = FALSE, timeout = 600 ) cmdstan_make_local(dir = cmdstan_path(), flags = NULL, append = TRUE)
Path to the directory in which to install CmdStan. The default is
to install it in a directory called
The number of CPU cores to use to parallelize building CmdStan
and speed up installation. If
Should the verbose output from the system processes be
suppressed when building the CmdStan binaries? The default is
When an existing installation is found in
Timeout (in seconds) for the CmdStan build stage of the installation process.
Specifies the URL to a specific Cmdstan release to be
installed. By default set to
A list specifying any makefile flags/variables to be
written to the
flags=NULL then the existing
make/local are returned without writing anything, otherwise
the updated contents are returned.
# install_cmdstan(cores = 4) flags <- list( "CXX" = "clang++", "CXXFLAGS+= -march-native", PRECOMPILED_HEADERS = TRUE ) # cmdstan_make_local(flags = flags) # rebuild_cmdstan()