Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 5, 2023
1 parent 62b86f7 commit 39a39f0
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions R/null_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ null_model <- function(model, verbose = TRUE, ...) {
} else {
if (!is.null(offset_term)) {
tryCatch(
{
do.call(stats::update, list(model, ~1, offset = str2lang(offset_term)))
},
do.call(stats::update, list(model, ~1, offset = str2lang(offset_term))),
error = function(e) {
if (verbose) {
format_warning(
Expand Down Expand Up @@ -77,12 +75,10 @@ null_model <- function(model, verbose = TRUE, ...) {
re.terms <- paste0("(", sapply(.findbars(f), safe_deparse), ")")
nullform <- stats::reformulate(re.terms, response = resp)
null.model <- tryCatch(
{
if (!is.null(offset_term)) {
do.call(stats::update, list(model, formula = nullform, offset = str2lang(offset_term)))
} else {
stats::update(model, nullform)
}
if (!is.null(offset_term)) {
do.call(stats::update, list(model, formula = nullform, offset = str2lang(offset_term)))
} else {
stats::update(model, nullform)
},
error = function(e) {
msg <- e$message
Expand Down

0 comments on commit 39a39f0

Please sign in to comment.