Hello, Many thanks for your reply.
Very helpful. I have made the necessary changes. Regards, Havisha On Mon, Dec 5, 2022 at 12:01 PM Ivan Krylov <krylov.r...@gmail.com> wrote: > On Mon, 5 Dec 2022 11:14:19 +0400 > "Jahajeeah, Havisha" <hjahaje...@utm.ac.mu> wrote: > > > Will a binary package resolve the above issue? > > Due to an interaction between the way R binary packages work and the > way you have implemented the Greymodels:::ui variable, this binary > package will only work on your computer. (And, well, on other computers > where the library path is the same.) A better workaround would be to > ask your users to install the source package instead of installing the > binary package when one is available for their platform. > > The code that creates the `ui` variable in your package is evaluated > when the binary package is built by CRAN (or you). The resulting object > contains file paths that are only valid on CRAN computers (or your > computer). You need that code to run on users' computers after the > package is installed, not on CRAN computers (or your computer) when > it's built. In order to achieve that, you need to change the definition > of the `ui` variable into a function. The function doesn't even have to > take arguments; you can just prepend function() to the right-hand side > of the assignment. Inside the `run_app` function, call that function > instead of referring to that variable. This will make sure that the > temporary object created by `ui()` contains the file paths from the > user's computer. > > -- > Best regards, > Ivan > [[alternative HTML version deleted]] ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel