TommyJones / tidylda

Implements an algorithim for Latent Dirichlet Allocation using style conventions from the [tidyverse](https://style.tidyverse.org/) and [tidymodels](https://tidymodels.github.io/model-implementation-principles/index.html).
Other
41 stars 3 forks source link

Make tidylda consistent with Matrix update #69

Closed TommyJones closed 1 year ago

TommyJones commented 1 year ago

Letter from Matrix maintainers

Dear R Maintainer maintainer,

You are receiving this message because at least one CRAN or Bioconductor package that you maintain requires revisions due to deprecations in the forthcoming Matrix version 1.4-2, which you can install with

install.packages("Matrix", repos = "http://r-forge.r-project.org/")

(The list of 259 affected packages with 209 unique maintainers is at the end)

Matrix 1.4-2 will formally deprecate 187 coercion methods. More precisely, coercions of the form

as(object, Class)

where

will continue to work as before but signal a deprecation message or warning (message in the widely used dg.Matrix and d.CMatrix cases).

By default, the message or warning will be signaled with the first deprecated method call and suppressed after that. Signaling can be controlled via option Matrix.warnDeprecatedCoerce:

<=0 = be completely silent [[ at your own risk ! ]] 1 = warn each time

=2 = error each time [[ for debugging ]] NA = message or warn once then be silent [[ the default ]]

Deprecated coercions in your package sources (including examples, tests, and vignettes) should be revised to go via virtual classes only, as has been advocated for quite some time in

vignette("Design-issues", package = "Matrix")

For example, rather than

as(, "dgCMatrix")

we recommend (the full, a "permutation", or a simplification given the context of)

as(as(as(, "dMatrix"), "generalMatrix"), "CsparseMatrix")

To simplify the revision process, the development version of Matrix provides Matrix:::.as.via.virtual(), taking a pair of class names and returning as a call the correct nesting of coercions:

Matrix:::.as.via.virtual("matrix", "dgCMatrix") as(as(as(from, "dMatrix"), "generalMatrix"), "CsparseMatrix") Matrix:::.as.via.virtual("matrix", "lsTMatrix") as(as(as(from, "lMatrix"), "symmetricMatrix"), "TsparseMatrix") Matrix:::.as.via.virtual("dgCMatrix", "dtrMatrix") as(as(from, "triangularMatrix"), "unpackedMatrix")

We suggest checking package tarballs built with

options(Matrix.warnDeprecatedCoerce = n) # where n >= 1

in the .onLoad() hook (see ?.onLoad), so that all deprecated coercions are exposed in the check output. (If you find that a warning or error has been signaled from 'Matrix' itself, then we'd welcome a report containing a minimal reproducible example, so that we may revise our own code.)

If you are unable to make the requested changes before Sep 8 (~4 weeks from now), or if you need help or clarification while fixing your code, please let us know by replying and copying

Matrix-authors@r-project.org

Thank you very much!

TommyJones commented 1 year ago

377bce773919b078dfa77e0795c4fc37bc7f9431