Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

124 plnmodels is not compatible with r 41 #125

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: PLNmodels
Title: Poisson Lognormal Models
Version: 1.2.0
Version: 1.2.1
Authors@R: c(
person("Julien", "Chiquet", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0002-3629-3429")),
Expand All @@ -26,7 +26,7 @@ License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Depends: R (>= 3.4)
Depends: R (>= 3.6)
LazyData: true
biocViews:
Imports:
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Current version

* fix use of native pipe to ensure compatibility with R 3.6 (merge PR #125, fix #124)

# PLNmodels 1.2.0 (2024-03-05)

* new feature: ZIPLN (PLN with zero inflation) for standard PLN and PLN Network
Expand Down
4 changes: 2 additions & 2 deletions R/ZIPLN.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ ZIPLN_param <- function(
) {

covariance <- match.arg(covariance)
if (covariance == "fixed") stopifnot("Omega must be provied for fixed covariance" = inherits(Omega, "matrix") | inherits(Omega, "Matrix")) |> try()
if (covariance == "fixed") stopifnot("Omega must be provied for fixed covariance" = inherits(Omega, "matrix") | inherits(Omega, "Matrix")) %>% try()
if (inherits(Omega, "matrix") | inherits(Omega, "Matrix")) covariance <- "fixed"
if (covariance == "sparse") stopifnot("You should provide a positive penalty when chosing 'sparse' covariance" = penalty > 0) |> try()
if (covariance == "sparse") stopifnot("You should provide a positive penalty when chosing 'sparse' covariance" = penalty > 0) %>% try()
if (penalty > 0) covariance <- "sparse"
if (!is.null(inception)) stopifnot(isZIPLNfit(inception))

Expand Down
Loading