[R-pkg-devel] Issue of itemize in man file
I'm doing a major update of the optimx package and things were going relatively smoothly until this weekend when files that have passed win-builder gave NOTEs on r-devel for several manual (.Rd) files. The NOTE is of the form * checking Rd files ... NOTE checkRd: (-1) fnchk.Rd:40-41: Lost braces in \itemize; \value handles \item{}{} directly checkRd: (-1) fnchk.Rd:43: Lost braces in \itemize; \value handles \item{}{} directly checkRd: (-1) fnchk.Rd:45: Lost braces in \itemize; \value handles \item{}{} directly The source of this looks like \item{msg}{A text string giving information about the result of the function check: Messages and the corresponding values of \code{excode} are: \itemize{ \item{fnchk OK;}{ \code{excode} = 0; \code{infeasible} = FALSE} \item{Function returns INADMISSIBLE;} { \code{excode} = -1; \code{infeasible} = TRUE} ... } I've not seen this before, nor does a search give any hits. Does anyone have any ideas? Or is this a glitch in r-devel as things are tried out.? I don't get the NOTE on win-builder R-release nor on local R CMD check. Note that the \itemize is to give a second-level list i.e., for expanding output of one of the \value objects returned, namely the return codes. Best, John Nash __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Issue of itemize in man file
On Sun, 22 Oct 2023 10:43:08 -0400 J C Nash wrote: >\itemize{ > \item{fnchk OK;}{ \code{excode} = 0; > \code{infeasible} = FALSE} The \item command inside \itemize{} lists doesn't take arguments. Did you mean \describe{} instead of \itemize{}? -- Best regards, Ivan __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Issue of itemize in man file
I ran into the same issue last week with .Rd files that were previously accepted on CRAN and concluded that the package checks are becoming more critical about this aspect of Rd syntax, which is good. To reproduce the note outside R-devel and by that identify which files in your package are affected you could run for every Rd file in your man folder: tools::checkRd(Rd = file, listOK = FALSE) Vincent On Sun, 22 Oct 2023 at 16:53, Ivan Krylov wrote: > > On Sun, 22 Oct 2023 10:43:08 -0400 > J C Nash wrote: > > >\itemize{ > > \item{fnchk OK;}{ \code{excode} = 0; > > \code{infeasible} = FALSE} > > The \item command inside \itemize{} lists doesn't take arguments. > Did you mean \describe{} instead of \itemize{}? > > -- > Best regards, > Ivan > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Issue of itemize in man file
Thanks. That seems to be the issue. Also vincent's suggestion of checkRd. JN On 2023-10-22 10:52, Ivan Krylov wrote: On Sun, 22 Oct 2023 10:43:08 -0400 J C Nash wrote: \itemize{ \item{fnchk OK;}{ \code{excode} = 0; \code{infeasible} = FALSE} The \item command inside \itemize{} lists doesn't take arguments. Did you mean \describe{} instead of \itemize{}? __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Failing to write config file in linux
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 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
Re: [R-pkg-devel] Failing to write config file in linux
On Sun, 22 Oct 2023 16:52:50 + "Keshav, Krishna" wrote: > 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 Can you place the edited configuration file under tools::R_user_dir('geohabnet', 'config') instead of the package directory? -- Best regards, Ivan __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Failing to write config file in linux
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" 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 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