[R-pkg-devel] Status of adbcpostgresql
Hi all, I submitted the first release of adbcpostgresql (an R repackaging of ADBC's Postgres driver) about a month ago and it has been pending human inspection (I think) since then. I did reply-all to the email once to inquire about status but haven't heard back. Where is the best place to direct communication about the status of the package? I am certainly happy to fix any problems that arise. Cheers, -dewey __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [Rd] [R-pkg-devel] Problem with "compacting" pdf files.
> Ivan Krylov writes: Thanks: committed now. Best -k > Dear Rolf, > (Moving this one to R-devel...) > On Sun, 1 Oct 2023 21:01:13 + > Rolf Turner wrote: >> I *really* think that the instructions from CRAN could have been >> clearer! Without your guidance I'd have been at a total loss. > Since the CRAN e-mails quote the R CMD check messages verbatim, would > it have been enough if R CMD check suggested using --compact-vignettes? > Index: src/library/tools/R/check.R > === > --- src/library/tools/R/check.R (revision 85249) > +++ src/library/tools/R/check.R (working copy) > @@ -3079,7 +3079,8 @@ > " 'qpdf' made some significant size reductions:\n", > paste(" ", res, collapse = "\n"), > "\n", > - " consider running tools::compactPDF() on these > files\n") > + " consider running tools::compactPDF() on these > files,\n", > + " or build the source package with > --compact-vignettes\n") > } > if (R_check_doc_sizes2) { > gs_cmd <- find_gs_cmd() > @@ -3093,7 +3094,8 @@ > " 'gs+qpdf' made some significant size > reductions:\n", > paste(" ", res, collapse = "\n"), > "\n", > - ' consider running > tools::compactPDF(gs_quality = "ebook") on these files\n') > + ' consider running > tools::compactPDF(gs_quality = "ebook") on these files,\n', > + ' or build the source package with > --compact-vignettes=both\n') > } > } else { > if (!any) noteLog(Log) > Or is there anything else you would prefer to be reworded? Should the > message link to Writing R Extensions, section 1.4? Recently there was a > project to improve the R CMD check messages [*], but I managed to miss > almost all of it. > -- > Best regards, > Ivan > [*] https://github.com/r-devel/r-project-sprint-2023/issues/55 > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] as(, "dgTMatrix")' is deprecated.
Hi Martin, On 10/3/23 10:17, Martin Maechler wrote: >> Duncan Murdoch >> on Tue, 3 Oct 2023 12:59:10 -0400 writes: > > On 03/10/2023 12:50 p.m., Koenker, Roger W wrote: > >> I’ve been getting this warning for a while now (about > >> five years if memory serves) and I’m finally tired of it, > >> but also too tired to track it down in Matrix. As far as > >> I can grep I have no reference to either deprecated > >> object, only the apparently innocuous Matrix::Matrix(A, > >> sparse = TRUE). Can someone advise, Martin perhaps? I > >> thought it might come from Rmosek, but mosek folks don’t > >> think so. > >>https://groups.google.com/g/mosek/c/yEwXmMfHBbg/m/l_mkeM4vAAAJ > > > A quick scan of that discussion didn't turn up anything > > relevant, e.g. a script to produce the warning. Could you > > be more specific, or just post the script here? > > > In general, a good way to locate the source of a warning > > is to set options(warn=2) to turn it into an error, and > > then trigger it. The traceback from the error will > > include a bunch of junk from the code that catches the > > warning, but it will also include the context where it was > > triggered. > > > Duncan Murdoch > > Indeed. > > But Roger is right that it in the end, (almost surely) it is > from our {Matrix} package. > > Indeed for several years now, we have tried to make the setup > leaner (and hence faster) by not explicitly define coercion > from to because the size of > is here about 200, and we don't want to have to provide > 200^2 = 40'000 coercion methods. 40,000 coercion methods sounds indeed crazy. But have you considered having 200 coercions from ANY to ? For example the coercion from ANY to dgTMatrix would do as(as(as(from, "dMatrix"), "generalMatrix"), "TsparseMatrix"). Maybe the ANY->xyzMatrix methods could even be generated programmatically? Best, H. > > Rather, Matrix package users should use to high level abstract Matrix > classes such as "sparseMatrix" or "CsparseMatrix" or > "TsparseMatrix" or "dMatrix", "symmetricMatrix". > > In the case of as(, "dgTMatrix") , if you > replace "dgTMatrix" by "TsparseMatrix" > the result will be the same but also work in the future when the > deprecation may have been turned into a defunctation ... > > Martin > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Hervé Pagès Bioconductor Core Team hpages.on.git...@gmail.com [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] as(, "dgTMatrix")' is deprecated.
thanks, good to know, although at my age this is the sort of knowledge that has a very short half-life. ;-) R > On Oct 4, 2023, at 9:57 AM, Mikael Jagan wrote: > > > There is a call to mosek and I assumed that this wasn’t going to be helpful > > for most R-devel recipients. I tried Duncan’s very reasonable suggestion > > about options() but it didn’t produce the desired error, so perhaps this > > isn’t really a warning but something else??? > > > > The details are described in news(package="Matrix") under "Changes in version > 1.5-0" and implemented in Matrix:::Matrix.DeprecatedCoerce. That version was > released in Sep 2022. > > At the time, it was too disruptive to signal a proper deprecation warning > with every as(., "d(g.|.C)Matrix") call, for every reverse dependency of > Matrix, so we decided that in those most common cases we would use message() > instead of warning(). A corollary was that options(warn=n) would not have > the usual effect, so we advertised an alternative to affected maintainers: > >in R: > >options(Matrix.warnDeprecatedCoerce=n) > >on the command line: > >R_MATRIX_WARN_DEPRECATED_COERCE=n R CMD check *.tar.gz > > But maybe it is time to begin signaling warnings unconditionally ... > > Mikael > > > For those who might have rmosek installed, I’m doing: > > > > library(REBayes) > > demo(GLmix1) > > > > Thanks, > > Roger > > > > > > > On Oct 3, 2023, at 6:17 PM, Martin Maechler > > stat.math.ethz.ch> wrote: > > > > > >> Duncan Murdoch > > >>on Tue, 3 Oct 2023 12:59:10 -0400 writes: > > > > > >> On 03/10/2023 12:50 p.m., Koenker, Roger W wrote: > > >>> I’ve been getting this warning for a while now (about > > >>> five years if memory serves) and I’m finally tired of it, > > >>> but also too tired to track it down in Matrix. As far as > > >>> I can grep I have no reference to either deprecated > > >>> object, only the apparently innocuous Matrix::Matrix(A, > > >>> sparse = TRUE). Can someone advise, Martin perhaps? I > > >>> thought it might come from Rmosek, but mosek folks don’t > > >>> think so. > > >>> https://urldefense.com/v3/__https://groups.google.com/g/mosek/c/yEwXmMfHBbg/m/l_mkeM4vAAAJ__;!!DZ3fjg!71re8ipw9fFStkMab0wGuPNSzSaAhPI5vwxd1BCQ7a55mYiRpAq2prn9-wREqKL_G2uBYboXISQfxZYCZ9AFxCnwxdzqTw$ > > >>> > > > > > >> A quick scan of that discussion didn't turn up anything > > >> relevant, e.g. a script to produce the warning. Could you > > >> be more specific, or just post the script here? > > > > > >> In general, a good way to locate the source of a warning > > >> is to set options(warn=2) to turn it into an error, and > > >> then trigger it. The traceback from the error will > > >> include a bunch of junk from the code that catches the > > >> warning, but it will also include the context where it was > > >> triggered. > > > > > >> Duncan Murdoch > > > > > > Indeed. > > > > > > But Roger is right that it in the end, (almost surely) it is > > > from our {Matrix} package. > > > > > > Indeed for several years now, we have tried to make the setup > > > leaner (and hence faster) by not explicitly define coercion > > > from to because the size of > > > is here about 200, and we don't want to have to provide > > > 200^2 = 40'000 coercion methods. > > > > > > Rather, Matrix package users should use to high level abstract Matrix > > > classes such as "sparseMatrix" or "CsparseMatrix" or > > > "TsparseMatrix" or "dMatrix", "symmetricMatrix". > > > > > > In the case of as(, "dgTMatrix") , if you > > > replace "dgTMatrix" by "TsparseMatrix" > > > the result will be the same but also work in the future when the > > > deprecation may have been turned into a defunctation ... > > > > > > Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] as(, "dgTMatrix")' is deprecated.
> There is a call to mosek and I assumed that this wasn’t going to be helpful for most R-devel recipients. I tried Duncan’s very reasonable suggestion about options() but it didn’t produce the desired error, so perhaps this isn’t really a warning but something else??? > The details are described in news(package="Matrix") under "Changes in version 1.5-0" and implemented in Matrix:::Matrix.DeprecatedCoerce. That version was released in Sep 2022. At the time, it was too disruptive to signal a proper deprecation warning with every as(., "d(g.|.C)Matrix") call, for every reverse dependency of Matrix, so we decided that in those most common cases we would use message() instead of warning(). A corollary was that options(warn=n) would not have the usual effect, so we advertised an alternative to affected maintainers: in R: options(Matrix.warnDeprecatedCoerce=n) on the command line: R_MATRIX_WARN_DEPRECATED_COERCE=n R CMD check *.tar.gz But maybe it is time to begin signaling warnings unconditionally ... Mikael > For those who might have rmosek installed, I’m doing: > > library(REBayes) > demo(GLmix1) > > Thanks, > Roger > > > > On Oct 3, 2023, at 6:17 PM, Martin Maechler stat.math.ethz.ch> wrote: > > > >> Duncan Murdoch > >>on Tue, 3 Oct 2023 12:59:10 -0400 writes: > > > >> On 03/10/2023 12:50 p.m., Koenker, Roger W wrote: > >>> I’ve been getting this warning for a while now (about > >>> five years if memory serves) and I’m finally tired of it, > >>> but also too tired to track it down in Matrix. As far as > >>> I can grep I have no reference to either deprecated > >>> object, only the apparently innocuous Matrix::Matrix(A, > >>> sparse = TRUE). Can someone advise, Martin perhaps? I > >>> thought it might come from Rmosek, but mosek folks don’t > >>> think so. > >>> https://urldefense.com/v3/__https://groups.google.com/g/mosek/c/yEwXmMfHBbg/m/l_mkeM4vAAAJ__;!!DZ3fjg!71re8ipw9fFStkMab0wGuPNSzSaAhPI5vwxd1BCQ7a55mYiRpAq2prn9-wREqKL_G2uBYboXISQfxZYCZ9AFxCnwxdzqTw$ > > > >> A quick scan of that discussion didn't turn up anything > >> relevant, e.g. a script to produce the warning. Could you > >> be more specific, or just post the script here? > > > >> In general, a good way to locate the source of a warning > >> is to set options(warn=2) to turn it into an error, and > >> then trigger it. The traceback from the error will > >> include a bunch of junk from the code that catches the > >> warning, but it will also include the context where it was > >> triggered. > > > >> Duncan Murdoch > > > > Indeed. > > > > But Roger is right that it in the end, (almost surely) it is > > from our {Matrix} package. > > > > Indeed for several years now, we have tried to make the setup > > leaner (and hence faster) by not explicitly define coercion > > from to because the size of > > is here about 200, and we don't want to have to provide > > 200^2 = 40'000 coercion methods. > > > > Rather, Matrix package users should use to high level abstract Matrix > > classes such as "sparseMatrix" or "CsparseMatrix" or > > "TsparseMatrix" or "dMatrix", "symmetricMatrix". > > > > In the case of as(, "dgTMatrix") , if you > > replace "dgTMatrix" by "TsparseMatrix" > > the result will be the same but also work in the future when the > > deprecation may have been turned into a defunctation ... > > > > Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [R-pkg-devel] Rmarkdown package vignette that reference online images: how to fail gracefully?
On Tue, 3 Oct 2023 14:52:26 -0700 Vinh Nguyen wrote: > Could not fetch > https://live.staticflickr.com/65535/52281215570_5f9cc90a12_o.png This is Pandoc failing to bundle external resources from the final Markdown file, not your R code. > Error: processing vignette > 'Ex-04-Webscraping-Online-Data-Files.Rmd' failed with diagnostics: > pandoc document conversion failed with error 61 My psychic debugging powers tell me that this is the vignette you're having problems with: https://github.com/vinhdizzo/IRexamples/blob/main/vignettes/Ex-04-Webscraping-Online-Data-Files.Rmd If you look at the vignette as it is on CRAN, you can see that the images aren't actually loaded from live.staticflickr.com, but are included as base64 PNG blobs in the HTML file. This is much less efficient than a plain PNG file. I think that your package will become smaller if you disable this bundling and include the original PNG files in your package. You may be able to squeeze some more savings by using pngcrush / optipng to compress the images further. The parameter responsible for this base64 encoding is called self_contained, which defaults to TRUE in the rmarkdown::html_document format, which prettydoc::html_pretty inherits from. Set it to FALSE in the YAML header of the vignette. Note that some other scripts and CSS files may be loaded from external sources if you do that. As a user, I would prefer this not to be the case, but I don't know enough about rmarkdown to set your vignette up to bundle everything except the images. -- Best regards, Ivan __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Rmarkdown package vignette that reference online images: how to fail gracefully?
Dear members of R-package-devel, CRAN has the following policy: Packages which use Internet resources should fail gracefully with an informative message if the resource is not available or has changed (and not give a check warning nor error). I have a CRAN-accepted package with vignettes that use Rmarkdown. One of the vignettes involves a lot of images, so rather than embed the raw images in the vignette, I reference the images on Flickr (to keep the package size small enough to be hosted on CRAN). Every half year or so, I'll get a message from CRAN maintainers that the package is not failing gracefully on one of their servers due to their build and testing processes. The error message looks as follows: Could not fetch https://live.staticflickr.com/65535/52281215570_5f9cc90a12_o.png HttpExceptionRequest Request { host = "live.staticflickr.com" port = 443 secure = True requestHeaders = [] path = "/65535/52281215570_5f9cc90a12_o.png" queryString = "" method = "GET" proxy = Nothing rawBody = False redirectCount = 10 responseTimeout = ResponseTimeoutDefault requestVersion = HTTP/1.1 } (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = , addrCanonName = }, host name: Just "live.staticflickr.com", service name: Just "443"): does not exist (Name or service not known)) Error: processing vignette 'Ex-04-Webscraping-Online-Data-Files.Rmd' failed with diagnostics: pandoc document conversion failed with error 61 What's the recommended way for making this fail gracefully? Again, I am pointing to the images online. I am aware of .Rbuildignore, but using this would make the vignettes not hosted on the CRAN package page. Thanks in advance for your help. -- Vinh __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [Rd] as(, "dgTMatrix")' is deprecated.
Thanks, Ivan, I should have had the initiative to do this myself. I’ve now written to the Mosek folks in the hope that they will update this in Rmosek. Best Roger > On Oct 3, 2023, at 8:47 PM, Ivan Krylov wrote: > > On Tue, 3 Oct 2023 16:50:55 + > "Koenker, Roger W" wrote: > >> I thought it might come from Rmosek, but mosek folks don’t think so. > > I downloaded the Rmosek source package using > > download.packages( > 'Rmosek', '.', > repos='https://urldefense.com/v3/__https://download.mosek.com/R/10.1__;!!DZ3fjg!-J68cgVdf_vRXm7yhSxSNzoDv6i6681nySXG9qhE808C3UTKTWGNCfZEWchGfsh2FZbBpQJuWa8Tr8_mo3f2xFo$ > ' > ) > > ...and there are the deprecated calls: > > > Rmosek/R$ grep -C2 -r as\(.*dgT > toCSCMatrix.R- } > toCSCMatrix.R- else if (is(obj,"dgCMatrix")) { > toCSCMatrix.R:obj <- as(obj,"dgTMatrix") > toCSCMatrix.R- } > toCSCMatrix.R- else if (is(obj,"list") && > setequal(names(obj),c("i","j","v","ncol","nrow"))) { > -- > toCSCMatrix.R- x=obj[['v']], > toCSCMatrix.R- dims=c(obj[['nrow']], obj[['ncol']]) ) > toCSCMatrix.R:obj <- as(tmp, "dgTMatrix") > toCSCMatrix.R- } > toCSCMatrix.R- else if (canCoerce(obj,"dgTMatrix")) { > toCSCMatrix.R-# Assume coercion is meaningful, and that > toCSCMatrix.R-# users are aware of computational overhead. > toCSCMatrix.R:obj <- as(obj,"dgTMatrix") > toCSCMatrix.R- } > toCSCMatrix.R- else { > > > -- > Best regards, > Ivan __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel