Re: [R-pkg-devel] help fixing CRAN package sos-now fails on GitHub
> Duncan Murdoch > on Mon, 22 May 2023 15:38:10 -0400 writes: > On 22/05/2023 3:07 p.m., Ivan Krylov wrote: >> I fed your vignette to R CMD Sweave, and here's the >> relevant fragment from the resulting *.tex file: >> >>> This returned a {\tt "findFn"} object identifying 405 >>> help pages. When this was run while preparing this >>> manuscript, the sixth row was {\tt pspline_checker} in >>> the \pkg{JOPS} package, which has a {\tt Score} of >>> 47. (On another day, the results could be different, >>> because CRAN changes over time.) This was the sixth row >>> in this table, because it is in the \pkg{JOPS} package, >>> which had a total of 54 help pages matching the search >>> term, but this was the only one whose name matched the >>> {\tt pattern} passed to {\tt grepFn}. >> >> This corresponds to the following part of the vignette: >> >>> This returned a {\tt "findFn"} object identifying >>> \Sexpr{nrow(g)} help pages. When this was run while >>> preparing this manuscript, the sixth row was {\tt >>> \Sexpr{gFunc6}} in the \pkg{\Sexpr{gPac6}} package, >>> which has a {\tt Score} of \Sexpr{gScore6}. >> >> So, you need to escape the underscores in >> gFunc6. Probably not gPac6 because underscores are not >> allowed in package names. >> > Nice find. Just in case Spencer has trouble with escaping > the escapes, I think he should change >"{\tt \Sexpr{gFunc6}}" > to >"{\tt \Sexpr{sub("_", "_", gFunc6)}} > Even better would be to write a little function > "sanitizeForLatex" that did this and any other necessary > changes, and call that. Yes, indeed (2 x). If I grep the base R package sources, I find three occurrences of something like the above: grep --color -nH --null -e 'sub *(.*_' */R/*.R tools/R/Rd2latex.R:295:x <- fsub("\\_", "_", x) tools/R/Rd2latex.R:303:x <- fsub("\\_", ".Rul.", x) tools/R/Rd.R:681:txt <- gsub("\\_", "_", txt, fixed=TRUE) all of which do the transformation in the other direction (because *.Rd in those cases already *is* LaTeX-alike, and needs to convert for non-LaTeX use). Note that the last one gives a hint to be more general --- gsub() also working a.g. for 'parse_me_not' --- *and* possibly faster (fixed=TRUE) leading to "{\tt \Sexpr{gsub("_", "_", gFunc6, fixed=TRUE)}} Martin __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] help fixing CRAN package sos-now fails on GitHub
On 23/05/2023 6:53 a.m., Martin Maechler wrote: Duncan Murdoch on Mon, 22 May 2023 15:38:10 -0400 writes: > On 22/05/2023 3:07 p.m., Ivan Krylov wrote: >> I fed your vignette to R CMD Sweave, and here's the >> relevant fragment from the resulting *.tex file: >> >>> This returned a {\tt "findFn"} object identifying 405 >>> help pages. When this was run while preparing this >>> manuscript, the sixth row was {\tt pspline_checker} in >>> the \pkg{JOPS} package, which has a {\tt Score} of >>> 47. (On another day, the results could be different, >>> because CRAN changes over time.) This was the sixth row >>> in this table, because it is in the \pkg{JOPS} package, >>> which had a total of 54 help pages matching the search >>> term, but this was the only one whose name matched the >>> {\tt pattern} passed to {\tt grepFn}. >> >> This corresponds to the following part of the vignette: >> >>> This returned a {\tt "findFn"} object identifying >>> \Sexpr{nrow(g)} help pages. When this was run while >>> preparing this manuscript, the sixth row was {\tt >>> \Sexpr{gFunc6}} in the \pkg{\Sexpr{gPac6}} package, >>> which has a {\tt Score} of \Sexpr{gScore6}. >> >> So, you need to escape the underscores in >> gFunc6. Probably not gPac6 because underscores are not >> allowed in package names. >> > Nice find. Just in case Spencer has trouble with escaping > the escapes, I think he should change >"{\tt \Sexpr{gFunc6}}" > to >"{\tt \Sexpr{sub("_", "_", gFunc6)}} > Even better would be to write a little function > "sanitizeForLatex" that did this and any other necessary > changes, and call that. Yes, indeed (2 x). If I grep the base R package sources, I find three occurrences of something like the above: grep --color -nH --null -e 'sub *(.*_' */R/*.R tools/R/Rd2latex.R:295:x <- fsub("\\_", "_", x) tools/R/Rd2latex.R:303:x <- fsub("\\_", ".Rul.", x) tools/R/Rd.R:681:txt <- gsub("\\_", "_", txt, fixed=TRUE) all of which do the transformation in the other direction (because *.Rd in those cases already *is* LaTeX-alike, and needs to convert for non-LaTeX use). Note that the last one gives a hint to be more general --- gsub() also working a.g. for 'parse_me_not' --- *and* possibly faster (fixed=TRUE) leading to "{\tt \Sexpr{gsub("_", "_", gFunc6, fixed=TRUE)}} Martin Yes, a good idea to use gsub and fixed = TRUE. There are some changes in the other direction as well in that file (Rd format is very complicated). I think the characters it handles are \, &, $, %, _, #, {, }, ^, ~, occurring near line 145. Only _ is allowed in a "syntactic" name, but others might turn up when trying to display other code. Duncan __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Question about notes
I'm checking a package in RHub via RStudio (devtools::check_rhub()) and I'm receiving the following note: checking for non-standard things in the check directory ... NOTE Found the following files/directories: ''NULL'' I am unable to find this NULL file/directory anywhere, even with the ls() command in RStudio. I even deleted my local repo and re-cloned it, but this note persists. What can I do to solve this? Thanks in advance, Jo�o Santos. Esta mensagem e eventuais anexos podem conter informa��es privilegiadas, confidenciais e/ou protegidas por sigilo legal e por direitos autorais. A divulga��o, distribui��o, reprodu��o ou qualquer forma de utiliza��o do teor deste documento depende de autoriza��o do emissor, sujeitando-se o infrator �s san��es legais. O emissor desta mensagem utiliza este recurso no exerc�cio do seu trabalho ou em raz�o dele, eximindo-se o empregador de qualquer responsabilidade por utiliza��o indevida ou pessoal. Caso esta comunica��o tenha sido recebida por engano, por favor avisar imediatamente ao emissor respondendo esta mensagem. Este ambiente est� sujeito a monitora��o. This message and any of its attachments may contain information that is privileged, confidential and/or protected by legal secrecy and copyright laws, being the violator subject to legal prosecution. The dissemination, distribution, reproduction or any use of the content of this document may be done upon written authorization of the issuer. The sender uses this electronic mailing system in the course of his/her work or on its account, being the employer exempted from any responsibility for inappropriate or personal use. If this communication has been received in error, please immediately notify the sender by replying this message. This environment is subject to monitoring. [[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] Question about notes
On Tue, 23 May 2023 17:32:21 + João Pedro de Almeida dos Santos wrote: > checking for non-standard things in the check directory ... NOTE > Found the following files/directories: > ''NULL'' > > I am unable to find this NULL file/directory anywhere The code inside your tests or examples may be creating a file named like this. If you show us the code, we may be able to find it. Can you reproduce this by running R CMD check --as-cran PACKAGE.tar.gz locally? -- Best regards, Ivan __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] help fixing CRAN package sos-now fails on GitHub
On 5/22/23 2:38 PM, Duncan Murdoch wrote: On 22/05/2023 3:07 p.m., Ivan Krylov wrote: I fed your vignette to R CMD Sweave, and here's the relevant fragment from the resulting *.tex file: This returned a {\tt "findFn"} object identifying 405 help pages. When this was run while preparing this manuscript, the sixth row was {\tt pspline_checker} in the \pkg{JOPS} package, which has a {\tt Score} of 47. (On another day, the results could be different, because CRAN changes over time.) This was the sixth row in this table, because it is in the \pkg{JOPS} package, which had a total of 54 help pages matching the search term, but this was the only one whose name matched the {\tt pattern} passed to {\tt grepFn}. This corresponds to the following part of the vignette: This returned a {\tt "findFn"} object identifying \Sexpr{nrow(g)} help pages. When this was run while preparing this manuscript, the sixth row was {\tt \Sexpr{gFunc6}} in the \pkg{\Sexpr{gPac6}} package, which has a {\tt Score} of \Sexpr{gScore6}. So, you need to escape the underscores in gFunc6. Probably not gPac6 because underscores are not allowed in package names. Nice find. Just in case Spencer has trouble with escaping the escapes, I think he should change "{\tt \Sexpr{gFunc6}}" to "{\tt \Sexpr{sub("_", "_", gFunc6)}} CLOSE: That didn't work, but the following did: {\tt \Sexpr{gsub("_", "_", gFunc6)}} Even better would be to write a little function "sanitizeForLatex" that did this and any other necessary changes, and call that. That would doubtless be better, but I don't know enough to do that, and the above worked. Thanks very much to Duncan, Ivan, Vincent and Uwe, who contributed to this thread and the resolution of this problem. Spencer Graves Duncan Murdoch __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] masked from 'package:utils':,, ?
Hello, All: CRAN checks for sos on 8 of the 13 platforms complain about the following: The following object is masked from 'package:utils': ? This is code that Duncan Murdoch contributed to this package around 2009. I have no idea how to fix this. It's only a NOTE, so CRAN would probably accept it. However, I felt a need to ask about this before I submitted the package to CRAN without asking this group for suggestions. What do you think? Thanks, Spencer Graves __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] masked from 'package:utils':,, ?-2
Hello, All: CRAN checks for sos on 8 of the 13 platforms complain about the following:[1] The following object is masked from 'package:utils': ? This is code that Duncan Murdoch contributed to this package around 2009. I have no idea how to fix this. It's only a NOTE, so CRAN would probably accept it. However, I felt a need to ask about this before I submitted the package to CRAN without asking this group for suggestions. What do you think? Thanks, Spencer Graves [1] https://cran.r-project.org/web/checks/check_results_sos.html __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] masked from 'package:utils':,, ?
This is harmless and should be accepted by CRAN (if masking existing functions were illegal half of the tidyverse would be banned ...). It's there because it needs to be defined in order to enable the ??? alias for findFn(). sos:::"?" (and experimentation) show that use of a single ? is passed through to the original 'utils' version. On 2023-05-23 4:59 p.m., Spencer Graves wrote: Hello, All: CRAN checks for sos on 8 of the 13 platforms complain about the following: The following object is masked from 'package:utils': ? This is code that Duncan Murdoch contributed to this package around 2009. I have no idea how to fix this. It's only a NOTE, so CRAN would probably accept it. However, I felt a need to ask about this before I submitted the package to CRAN without asking this group for suggestions. What do you think? Thanks, Spencer Graves __ 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