Cyclops icon indicating copy to clipboard operation
Cyclops copied to clipboard

as(<numLike>, "dgeMatrix") is deprecated

Open schuemie opened this issue 2 years ago • 0 comments

Under specific circumstances, the following warning is thrown:

as(<numLike>, "dgeMatrix") is deprecated since Matrix 1.5-0; do as(as(as(., "dMatrix"), "generalMatrix"), "unpackedMatrix") instead

I suspect this originates here. The following code reproduces this behavior, but only once per R session:

library(survival)
poissonData <- dplyr::tibble(
  y = 0,
  caseId = 1,
  x = TRUE,
  logDays = 3.4
)

cyclopsData <- Cyclops::createCyclopsData(
  y ~ x + strata(caseId) + offset(logDays),
  modelType = "cpr",
  data = poissonData
)

Could the code be modified as suggested in the warning?

schuemie avatar Dec 06 '22 09:12 schuemie