Skip to content

Commit

Permalink
replace use of isFALSE for compatability with R < 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
hturner committed Apr 1, 2019
1 parent 5a38f59 commit 3779dcd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/PlackettLuce.R
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ PlackettLuce <- function(rankings,
stopifnot(all(weights > 0L))

# check gamma prior specification
if (isFALSE(gamma)) gamma <- NULL # in case specified as FALSE
if (is.logical(gamma) && length(gamma) == 1L && !is.na(gamma) && !gamma)
gamma <- NULL # in case specified as FALSE
if (!is.null(gamma)) { # specified or TRUE
if (isTRUE(gamma)) gamma <- list(shape = 10, rate = 10)
stopifnot(names(gamma) == c("shape", "rate"))
Expand Down

0 comments on commit 3779dcd

Please sign in to comment.