From 0189b7e11443d55df4939b5a9fc6f45ae335be98 Mon Sep 17 00:00:00 2001 From: Sean Thimons Date: Fri, 30 Oct 2026 16:22:21 +0000 Subject: [PATCH] docs: point older-R users to P3M binaries --- README.md | 27 ++++++++++++++++++++++++++- vignettes/articles/shiny-app.Rmd | 5 +++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d5f4f1e..797ecab 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,8 @@ singlehitapp::run_app() # opens the app in your browser ``` To install a specific release, replace `*release` with its tag, for example -`app@v0.4.0`. +`app@v0.4.0`. On an older version of R, see +[Older versions of R](#older-versions-of-r) first. The tabs, from left to right: @@ -110,6 +111,30 @@ other: library(singlehit) ``` +### Older versions of R + +singlehit and the app contain no compiled code, but some of their dependencies +do. CRAN provides ready-to-install (binary) versions of packages only for the +current R release and the one before it. With an older R, packages may be +installed from source, which can be slow and may fail without compilers +(Rtools on Windows, Xcode on macOS). + +Posit Public Package Manager (P3M) provides binaries for several older R +versions as well, on Windows, macOS, and common Linux distributions. Point R +at it before installing anything, including pak: + +```r +options(repos = c(CRAN = "https://packagemanager.posit.co/cran/latest")) +install.packages("pak") # if you don't have it yet +pak::repo_add(CRAN = "PPM@latest") # adds your Linux distribution's binaries +pak::pak("seanthimons/singlehit") # or the app, as shown in "Shiny app" +``` + +These settings last only for the current R session. The first line also +covers devtools users. On Linux, pak itself still installs from source; see +[pak's installation guide](https://pak.r-lib.org/reference/install.html) for a +binary. If your R is older than P3M covers, update R. + ## Input data format Every entry point (`as_dose_response()`, `read_dose_response()`, diff --git a/vignettes/articles/shiny-app.Rmd b/vignettes/articles/shiny-app.Rmd index 7dfdc86..1998172 100644 --- a/vignettes/articles/shiny-app.Rmd +++ b/vignettes/articles/shiny-app.Rmd @@ -25,6 +25,11 @@ To install a specific release, replace `*release` with its tag, for example `app@v0.4.0`. This replaces any other version of singlehit you have installed, including a development version from `main`. +If you use an R version older than the current release and the one before it, +first follow [Older versions of R](../index.html#older-versions-of-r). It sets +up Posit Public Package Manager so that pak and the dependencies install as +ready-built binaries instead of being compiled. + Then start it whenever you want to use it: ```r