From a26c1039448f5d815a4788bdca953e4f67fcaf5c Mon Sep 17 00:00:00 2001 From: Jouni Helske Date: Sun, 8 Sep 2024 16:30:11 +0300 Subject: [PATCH] no need for newdata --- R/predict.R | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/R/predict.R b/R/predict.R index d5b80686..fc48fd32 100644 --- a/R/predict.R +++ b/R/predict.R @@ -32,12 +32,6 @@ predict.nhmm <- function( !is.null(newdata[[time]]), "Can't find time index variable {.var {time}} in {.arg newdata}." ) - } else { - stopifnot_( - !is.null(object$data), - "Model does not contain original data and argument {.arg newdata} is - {.var NULL}." - ) object <- update(object, newdata = newdata) } S <- object$n_states @@ -141,15 +135,8 @@ predict.mnhmm <- function( !is.null(newdata[[time]]), "Can't find time index variable {.var {time}} in {.arg newdata}." ) - } else { - stopifnot_( - !is.null(object$data), - "Model does not contain original data and argument {.arg newdata} is - {.var NULL}." - ) object <- update(object, newdata = newdata) } - T_ <- object$length_of_sequences N <- object$n_sequences S <- object$n_states