Is it possible to run a command during package install?

I am sorry for the late answer. For the record, there are several ways to run code during installation, one is to use a configure script. E.g. this is how you would run an R script: purrr/configure at f67f77134cd258fced27834595c4091f49be62e1 · tidyverse/purrr · GitHub

OTOH for your use case it might be better to supply a function in the package that can download and install the external software. There are several examples for this in CRAN packages, e.g. webshot::install_phantomjs() is one.

2 Likes