<!-- README.md is generated from README.Rmd. Please edit that file -->
# capriv
<!-- badges: start -->
<!-- badges: end -->
The goal of capriv is to draw sankey charts, related tables and capri maps.
## Installation
### Requirements
- TIDYKML: tidykml reads selected elements and values from KML files.
- GDXRRW: GDXRRW is an interface between General Algebraic Modeling System (GAMS) and R, it transfers data between GAMS and R and calls gams from within R.
- GAMS environment system: It operations on GAMS data.
- CAPRIR: capriR is a tool for processing, visualizing and analysing both the databases and simulation results of CAPRI.
``` r
# The R devtools package allows packages that are hosted on GitHub to be installed directly from there.
install.packages("devtools")
library(devtools)
# tidykml
devtools::install_github("briatte/tidykml")
library(tidykml)
# Installation gdxrrw from GitHub
devtools::install_github("GAMS-dev/gdxrrw/gdxrrw")
# Or installation from website: <https://support.gams.com/gdxrrw:interfacing_gams_and_r>, then download the required file and point to the specific path of the file.
install.packages("D:/public/yang/CAPRIR_Project/gdxrrw_1.0.5.zip", repos = NULL, type="source")
# Checking if gdxrrw is installed For GAXRRW to work it must be load shared libraries from the GAMS System directory.
library(gdxrrw)
# The igdx command can be used to show what GAMS system directory GDXRRW has found.
igdx()
# if GDX library has not been loaded, tell where is located GAMS.
igdx("D://gams//win64//24.9")
# caprir
devtools::install_git("https://git-dmz.thuenen.de/mindstep/caprir.git")
library(caprir)
```
You can install the released version of capriv from [Thünen Gitlab](https://git-dmz.thuenen.de/mindstep/capriv.git) with:
devtools::install_git("https://git-dmz.thuenen.de/mindstep/capriv.git")
# load packages
requiredPackages = c('caprir','gdxrrw', 'usethis','hablar', 'tibble','networkD3','readxl','tidyr','dplyr','reshape2','data.table','plotly','webshot','gt')
for(p in requiredPackages){
if(!require(p,character.only = TRUE)) install.packages(p)
library(p,character.only = TRUE)
}
## References
- <https://git-dmz.thuenen.de/capri/capri_reports>
- <https://github.com/trialsolution/caprir>