Both @MonikaFu and I get an error when running devtools::document(), althought the messages vary slightly. In neither case are the messages particularly insightful.
My reprex:
devtools::load_all(path = "/path/to/git/r2dii.plot")
#> ℹ Loading r2dii.plot
devtools::document(pkg = "/path/to/git/r2dii.plot")
#> ℹ Updating r2dii.plot documentation
#> ℹ Loading r2dii.plot
#> Error in eval(code, envir = envir) : object 'fun' not found
Created on 2025-02-13 with reprex v2.1.0
Note: I changed my local path to "/path/to/git/r2dii.plot" in this issue