Download, unzip, check permissions, and test the bioregion's binary files
Source:R/install_binaries.R
install_binaries.RdThis function downloads and unzips the 'bin' folder required to run certain
functions of the bioregion package. It also verifies if the files have the
necessary permissions to be executed as programs. Finally, it tests whether
the binary files are running correctly.
Usage
install_binaries(
binpath = "tempdir",
download_only = FALSE,
infomap_version = c("2.1.0", "2.6.0", "2.7.1", "2.8.0")
)Arguments
- binpath
A
characterstring specifying the path to the folder that will host thebinfolder containing the binary files (see Details).- download_only
A
logicalvalue indicating whether the function should only download thebin.zipfile or perform the entire process (see Details).- infomap_version
A
charactervector or a singlecharacterstring specifying the Infomap version(s) to install.
Details
By default, the binary files are installed in R's temporary
directory (binpath = "tempdir"). In this case, the bin folder will be
automatically removed at the end of the R session. Alternatively, the binary
files can be installed in the bioregion package folder
(binpath = "pkgfolder").
A custom folder path can also be specified. In this case, and only in this
case, download_only can be set to TRUE, but you must ensure that the
files have the required permissions to be executed as programs.
In all cases, PLEASE MAKE SURE to update the binpath and check_install
parameters accordingly in netclu_infomap, netclu_louvain, and
netclu_oslom.
See also
For more details illustrated with a practical example, see the vignette: https://biorgeo.github.io/bioregion/articles/a1_install_binary_files.html.
Author
Maxime Lenormand (maxime.lenormand@inrae.fr)
Boris Leroy (leroy.boris@gmail.com)
Pierre Denelle (pierre.denelle@gmail.com)