library(g2r)
g2r is not yet on CRAN, it can be obtained from Github.
# install.packages("remotes") remotes::install_github("devOpifex/g2r")
# install.packages("devtools") devtools::install_github("devOpifex/g2r")
# install.packages("pak") pak::pkg_install("devOpifex/g2r")
git clone https://github.com/devOpifex/g2r.git
cd ./g2r
make init
Numerous figures depend on other packages (e.g.: maps & networks) but are only installed optionally, to install all of them includes "Suggests."
# install.packages("remotes") remotes::install_github( "devOpifex/g2r", dependencies = c("Imports", "Suggests") )
# install.packages("devtools") devtools::install_github( "devOpifex/g2r", dependencies = c("Imports", "Suggests") )
Numerous figures internally depend on other packages, namely the alter package, you will be prompted to install it if is not found on your machine.
Alter requires the V8 engine and corresponding V8 package.
V8
# Debian and Ubuntu
sudo apt-get install -y libv8-dev
# Mac
brew install v8
# Fedora (with EPEL release)
sudo yum install v8-devel
# install.packages("remotes") remotes::install_github("devOpifex/alter")
# install.packages("devtools") devtools::install_github("devOpifex/alter")
# install.packages("pak") pak::pkg_install("devOpifex/alter")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.