Currently ‘box’ assumes that ‘rstudioapi’ is installed if the code is run from inside RStudio:
|
document_path = rstudioapi::getActiveDocumentContext()$path |
However, this is apparently not always the case. Make code conditional on the package’s existence, or avoid depending on it altogether.