[R-pkg-devel] Error uploading file on CRAN

Jahajeeah, Havisha hj@h@jee@h @end|ng |rom utm@@c@mu
Mon Dec 5 12:50:30 CET 2022


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.r00t using gmail.com> wrote:

> On Mon, 5 Dec 2022 11:14:19 +0400
> "Jahajeeah, Havisha" <hjahajeeah using 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]]



More information about the R-package-devel mailing list