This guide explains how to install arenalytics on a machine that has
no internet connection. You will need the file
arenalytics_offline_pkgs.zip provided by
your administrator or a colleague (see the section Preparing the
bundle at the bottom if you are the one creating it). The bundle
can be downloaded [here].
Prerequisites
Make sure the following software is already installed on your machine before you start.
| Software | Notes |
|---|---|
| R ≥ 4.1 | https://cran.r-project.org |
| RStudio | https://posit.co/download/rstudio-desktop/ |
| Rtools (Windows, source bundle only) | Not needed if you use the Windows binary bundle. Only required to compile the source bundle; download the version matching your R from https://cran.r-project.org/bin/windows/Rtools/ |
| Xcode Command Line Tools (macOS only) | Only for the source bundle. Open the Terminal app and run
xcode-select --install
|
| Quarto CLI | Required for report generation. https://quarto.org/docs/get-started/ |
Step 1 — Create a new R project
- Open RStudio.
- Go to File › New Project › New Directory › New Project.
- Name the project (e.g.
arenalytics) and choose a folder on your machine. - Click Create Project.
You should now be inside a fresh RStudio project with an empty workspace.
Step 2 — Choose and extract the bundle
Two bundles are available. Pick one:
| Bundle | Use when | Speed |
|---|---|---|
arenalytics_offline_pkgs_WIN.zip |
You are on Windows with R 4.6.x | Fast — pre-compiled, no Rtools needed |
arenalytics_offline_pkgs.zip |
Any other platform (macOS, Linux), or a different R version | Slow — compiled from source, needs a compiler |
Windows users should use the
_WINbundle. It contains pre-compiled binaries, so installation takes seconds instead of an hour and does not require Rtools. It only works on R 4.6.x — check yours withR.version.string.
- Copy your chosen zip into the project folder you just created (the
same folder that contains the
.Rprojfile). - Extract it there:
- Windows: right-click the zip → Extract All… → keep the default destination.
- macOS / Linux: double-click the zip, or run in the Terminal:
You should now have a sub-folder
(arenalytics_offline_pkgs/ or
arenalytics_offline_pkgs_WIN/) laid out as a standard CRAN
repository that R can install from.
Step 3 — Install the packages
Open the RStudio Console pane and run the commands for your bundle.
Option A — Windows binary bundle (recommended on Windows)
Install the dependencies first (as pre-compiled binaries), then
arenalytics itself (pure R, from its source tarball). Two
explicit steps are used because a single type = "both" call
does not reliably resolve a local file:// repo.
local_repo <- paste0("file:///", normalizePath("arenalytics_offline_pkgs_WIN", winslash = "/"))
deps <- c(
"bsicons", "bslib", "DT", "dplyr", "ggplot2", "htmltools", "jsonlite",
"purrr", "quarto", "rlang", "scales", "shiny", "shiny.i18n", "shinyjs",
"shinyWidgets", "srvyr", "stringr", "tibble", "tidyr", "zip"
)
# 1. Dependencies as pre-compiled Windows binaries (no compiler, seconds)
install.packages(deps, repos = local_repo, type = "win.binary")
# 2. arenalytics itself (pure R — installs instantly, no Rtools)
install.packages("arenalytics", repos = local_repo, type = "source", dependencies = FALSE)
dependencies = FALSEis used because every required package is already listed explicitly, so R does not need to resolve (and fail to find) optionalSuggestssuch asknitrandrmarkdown.
Option B — Source bundle (macOS, Linux, other R versions)
local_repo <- paste0("file:///", normalizePath("arenalytics_offline_pkgs", winslash = "/"))
install.packages(
pkgs = c(
"arenalytics",
"bsicons", "bslib", "DT", "dplyr", "ggplot2", "htmltools",
"jsonlite", "purrr", "quarto", "rlang", "scales", "shiny",
"shiny.i18n", "shinyjs", "shinyWidgets", "srvyr",
"stringr", "tibble", "tidyr", "zip"
),
repos = local_repo,
type = "source",
dependencies = FALSE
)This compiles every package from source and may take 10–60 minutes. A compiler is required (Rtools on Windows, Xcode CLT on macOS). A lot of console output is normal.
Troubleshooting
package 'XYZ' is not available
The package was not included in the bundle. Ask your administrator to
regenerate the bundle using
inst/extdata/make_offline_bundle.R.
Installation is very slow / stuck compiling
(Windows)
You are using the source bundle. Switch to the Windows binary bundle
(arenalytics_offline_pkgs_WIN.zip, Option A) — it is
pre-compiled and installs in seconds.
package 'XYZ' ... is not available with the
Windows bundle
Your R version does not match the bundle. The _WIN bundle
targets R 4.6.x; check R.version.string and either install
R 4.6.x or use the source bundle.
Compilation errors on Windows (source bundle)
Rtools is likely missing or the wrong version. Make sure the Rtools
version matches your R version (e.g. Rtools46 for R 4.6.x).
Compilation errors on macOS
Run xcode-select --install in the Terminal and retry.
could not find function "shiny_run_arenalytics"
The arenalytics package itself was not installed. Repeat Step 3.
Preparing the bundle (for administrators)
If you are the one providing the bundles, run the following script on a machine with internet access. It downloads all required packages and their dependencies and produces both bundles:
source("data-raw/make_offline_bundle.R")This creates, in data-raw/:
-
arenalytics_offline_pkgs.zip— source packages (any platform) -
arenalytics_offline_pkgs_WIN.zip— Windows binaries for R 4.6.x
To target a different R version for the Windows bundle, change the
win_ver variable near the top of the script. Share the
appropriate bundle along with this vignette with your users.