Installed packages may not be modified because they are permitted to be 
installed with read-only access. You have no option to proceed in this 
direction.

Configuration files are normally stored in the user's working directory. 
Dotfiles are a common convention in *nix operating systems, but in Windows the 
conventions are a bit different. The most general solution is to allow the user 
to specify an R option in .Rprofile [1], but you can setup defaults depending 
on the user's OS to back that up in case they don't actually take the steps to 
do that.

[1] https://stat.ethz.ch/R-manual/R-devel/library/base/html/options.html

On October 22, 2023 9:52:50 AM PDT, "Keshav, Krishna" <kkes...@ufl.edu> wrote:
>Hi,
>
>My package is failing on linux based systems because of an attempt to write in 
>a location of package. One of the core features that we would like user to 
>have is to modify the values in the config file, for which package has a 
>function for user to provide modified config. In future, they should be able 
>to provide individual parameters for the config for which also we will be 
>writing to config in package directory /inst/ so that it can later be fetched. 
>I understand that policy doesn’t allow writing to home directory. Is there a 
>workaround for this? Or what could be other potential solutions to explore.
>
>Snippet –
>https://github.com/GarrettLab/CroplandConnectivity/blob/923a4a0ca4a0ce8376068ee80986df228ea21d80/geohabnet/R/params.R#L57
>
>Error –
>     ── Failure ('test-parameters.R:38:3'): Test 6: Test to set new 
> parameters.yaml ──
>     Expected `set_parameters(new_param_file)` to run without any conditions.
>     ℹ Actually got a <simpleWarning> with text:
>     cannot create file 
> '/home/hornik/tmp/R.check/r-release-gcc/Work/build/Packages/geohabnet/parameters.yaml',
>  reason 'Read-only file system'
>
>
>Best Regards,
>Krishna Keshav
>
>
>       [[alternative HTML version deleted]]
>
>______________________________________________
>R-package-devel@r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
Sent from my phone. Please excuse my brevity.

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to