[R-pkg-devel] Failing to write config file in linux

Keshav, Krishna kke@h@v @end|ng |rom u||@edu
Sun Oct 22 18:52:50 CEST 2023


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]]



More information about the R-package-devel mailing list