Skip to content

Commit

Permalink
docs: update CRAN install steps + 3.6.4 start
Browse files Browse the repository at this point in the history
  • Loading branch information
laresbernardo committed May 6, 2022
1 parent 5949456 commit 079a63e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 37 deletions.
2 changes: 1 addition & 1 deletion R/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Robyn
Type: Package
Title: Semi-Automated Marketing Mix Modeling (MMM) from Meta Marketing Science
Version: 3.6.3
Version: 3.6.4
Authors@R: c(
person("Gufeng", "Zhou", , "[email protected]", c("aut")),
person("Leonel", "Sentana", , "[email protected]", c("aut")),
Expand Down
4 changes: 2 additions & 2 deletions R/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

* Install Robyn latest package version:
```{r}
## CRAN VERSION: TBA
# install.packages("Robyn")
## CRAN VERSION
install.packages("Robyn")
## DEV VERSION
# If you don't have remotes installed yet, first run: install.packages("remotes")
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

* Install Robyn latest package version:
```{r}
## CRAN VERSION: TBA
# install.packages("Robyn")
## CRAN VERSION
install.packages("Robyn")
## DEV VERSION
# If you don't have remotes installed yet, first run: install.packages("remotes")
Expand Down
16 changes: 0 additions & 16 deletions website/docs/installation.mdx

This file was deleted.

37 changes: 21 additions & 16 deletions website/docs/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,55 @@ import useBaseUrl from '@docusaurus/useBaseUrl';

It is necessary to have the [**R 4.0.0 version (or higher)**](https://www.r-project.org/) installed in order to be able to run this code. R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS. To
[download R.](https://cran.r-project.org/mirrors.html), please choose your
preferred [CRAN mirror.](https://cran.r-project.org/mirrors.html). **Please make sure you have restarted your R session once you have installed the latest R version.**
preferred [CRAN mirror](https://cran.r-project.org/mirrors.html). **Please make sure you have restarted your R session once you have installed the latest R version.**

**Optional (and recommended)**: after you've installed R, you may install [RStudio IDE](https://www.rstudio.com/products/rstudio/download/) for a better and smoother experience. RStudio IDE is a set of integrated tools designed to help you be more productive with R and Python. It includes a console, syntax-highlighting editor that supports direct code execution, and a variety of robust tools for plotting, viewing history, debugging and managing your workspace.

---
## 2. Installing the package

Please run `remotes::install_github("facebookexperimental/Robyn/R")` to install the package. If you haven't installed the `remotes` package previously, run `install.packages('remotes')`first.
To install or update Robyn to the latest stable version of the package, run:
```
install.packages("Robyn")
```

Robyn requires the Python library [Nevergrad](https://facebookresearch.github.io/nevergrad/).
You must install it once for the code to work properly.
Please find [here](https://rstudio.github.io/reticulate/articles/python_packages.html) more info about installing Python packages via reticulate.
**NOTE**: If you're interested in installing the latest or a specific **dev version** instead, run `remotes::install_github("facebookexperimental/Robyn/R")`. If you haven't installed the `remotes` package previously, run `install.packages('remotes')` first.

1. First step is to install the [reticulate package](https://rstudio.github.io/reticulate/) via the following command: `install.packages(‘reticulate’)`
2. Load the package using: `library(reticulate)`
3. Install nevergrad. You have 2 options:
Robyn also requires the Python library [Nevergrad](https://facebookresearch.github.io/nevergrad/).
**You must install it once for the code to work properly**. Please find [here](https://rstudio.github.io/reticulate/articles/python_packages.html) more info about installing Python packages via reticulate.

1. First step is to install the [reticulate package](https://rstudio.github.io/reticulate/) (if you haven't before) and load it:
```
install.packages("reticulate")
library(reticulate)
```
2. Install `nevergrad` Python library. You have 2 options:

- **Option 1: nevergrad installation via PIP**
- **Option 1: using PIP**

```
virtualenv_create("r-reticulate")
py_install("nevergrad", pip = TRUE)
use_virtualenv("r-reticulate", required = TRUE)
```

- **Option 2: nevergrad installation via conda**
- **Option 2: using conda**

```
conda_create("r-reticulate") # must run this line once
conda_install("r-reticulate", "nevergrad", pip=TRUE)
conda_create("r-reticulate")
conda_install("r-reticulate", "nevergrad", pip = TRUE)
use_condaenv("r-reticulate")
```

If it's taking too long to download, you have a slow or unstable internet connection, and have issues while installing the package, try setting `options(timeout=400)`

In case nevergrad still cannot be imported after installation, please locate your python file and run this line using your path:
```
use_python("~/Library/r-miniconda/envs/r-reticulate/bin/python")
```
For Windows, if you get openssl error, please see instructions [here](https://stackoverflow.com/questions/54558389/how-to-solve-this-error-while-installing-python-packages-in-rstudio/54566647) and [here](https://dev.to/danilovieira/installing-openssl-on-windows-and-adding-to-path-3mbf) to install and update openssl.

---
## 3. Getting started with the [demo.R](https://github.com/facebookexperimental/Robyn/blob/main/demo/demo.R) script

Open the [demo.R](https://github.com/facebookexperimental/Robyn/blob/main/demo/demo.R) script in the inst folder as a quick start guide that aims to cover most common use-cases.
Open the [demo.R](https://github.com/facebookexperimental/Robyn/blob/main/demo/demo.R) script in the `inst` folder as a quick start guide that aims to cover most common use-cases.
The demo will allow you to test the package using a simulated dataset.

---

0 comments on commit 079a63e

Please sign in to comment.