The volesti
package provides R with functions for volume estimation and sampling. In particular, it provides an R interface for the C++ library volesti.
volesti
computes approximations of volume of polytopes given as a set of points or linear inequalities or as a Minkowski sum of segments (zonotopes). There are algorithms for volume approximation as well as algorithms for sampling, rounding and rotating polytopes. Last but not least, volesti
provides implementations of geometric algorithms to compute the score of a portfolio given asset returns and to detect financial crises in stock markets.
The latest stable version is available from CRAN.
The latest development version is available in this repository.
To use the development version you need to follow these steps:
-
Clone the
Rvolesti
repository. -
Build and install the package by running (from an
R
terminal):
Rcpp::compileAttributes()
devtools::build()
install.packages("volesti")
or from a bash terminal:
Rscript -e 'Rcpp::compileAttributes()'
R CMD INSTALL --no-multiarch --with-keep.source .
The following packages should be installed: Rcpp
, RcppEigen
, BH
, devtools
.
Optionally the user can run tests and examples by running (from an R
terminal):
devtools::test()
devtools::run_examples()
The user can generate or update the documentation:
Rcpp::compileAttributes() # updates the Rcpp layer from C++ to R
roxygen2::roxygenize(roclets="rd") # updates the docs based on roxygen comments
and generate a pdf with the docs:
pack = "volesti"
path = find.package(pack)
system(paste(shQuote(file.path(R.home("bin"), "R")), "CMD", "Rd2pdf", shQuote(path)))
The documentation contains examples for all available functions.
More examples are available in man/examples
directory.
Copyright (c) 2012-2024 Vissarion Fisikopoulos
Copyright (c) 2018-2024 Apostolos Chalkis
You may redistribute or modify the software under the GNU Lesser General Public License as published by Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.