greta lets you write your own model like in BUGS, JAGS and Stan, except that you write models right in R, it scales well to massive datasets, and it’s easy to extend and build on.
See the website for more information, including tutorials, examples, package documentation, and the greta forum.
You can install the current release version of the package from CRAN:
install.packages("greta")
Or install the development version of greta
from r-universe:
install.packages("greta", repos = c("https://greta-dev.r-universe.dev", "https://cloud.r-project.org"))
(Note - installing from r-universe is just like installing from CRAN, and should be faster and more convenient than installing from GitHub)
You can also install the development version of greta
via GitHub:
devtools::install_github("greta-dev/greta")
The install_greta_deps()
function helps install the Python dependencies (Google's TensorFlow and tensorflow-probability).
By default, install_greta_deps()
installs versions TF 2.15.0, and TFP version 0.23.0, using python 3.10. To change the versions of TF, TFP, or python that you want to use, you specify the deps
argument of install_greta_deps()
, which used greta_deps_spec()
. See ?install_greta_deps()
or ?greta_deps_spec()
for more information.
This helper function, install_greta_deps()
, installs the exact pythons package versions needed. It also places these inside a conda environment, "greta-env-tf2". This isolates these exact python modules from other python installations, so that only greta
will see them. This helps avoids installation issues, where previously you might update tensorflow on your computer and overwrite the current version needed by greta
. Using this "greta-env-tf2" conda environment means installing other python packages should not be impact the Python packages needed by greta
.
If these python modules aren't yet installed, when greta
is used, it provides instructions on how to install them for your system. If in doubt follow those.