From 6f450306cabb385b638eebaeb77de55c9b0ff1db Mon Sep 17 00:00:00 2001 From: Niek Den Teuling Date: Tue, 5 Jan 2021 23:20:53 +0100 Subject: [PATCH] Moved predict ellipsis to back. Resolves #13 --- R/model.R | 4 +--- man/predict.lcModel.Rd | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/R/model.R b/R/model.R index 4c40372e..6d02b7a6 100644 --- a/R/model.R +++ b/R/model.R @@ -710,9 +710,7 @@ nobs.lcModel = function(object, ...) { #' # Prediction matrix for id S1 for all clusters #' predIdAll <- predict(model, newdata = data.frame(Id = "S1", Time = time(model))) #' @family model-specific methods -predict.lcModel = function(object, ..., - newdata = NULL, - what = 'mu') { +predict.lcModel = function(object, newdata = NULL, what = 'mu', ...) { # special case for when no newdata is provided if (is.null(newdata)) { newdata = model.data(object) diff --git a/man/predict.lcModel.Rd b/man/predict.lcModel.Rd index e9fcb826..bd0073fe 100644 --- a/man/predict.lcModel.Rd +++ b/man/predict.lcModel.Rd @@ -4,17 +4,17 @@ \alias{predict.lcModel} \title{lcModel predictions} \usage{ -\method{predict}{lcModel}(object, ..., newdata = NULL, what = "mu") +\method{predict}{lcModel}(object, newdata = NULL, what = "mu", ...) } \arguments{ \item{object}{The \code{lcModel} object.} -\item{...}{Additional arguments.} - \item{newdata}{Optional \code{data.frame} for which to compute the model predictions. If omitted, the model training data is used. Cluster trajectory predictions are made when ids are not specified.} \item{what}{The distributional parameter to predict. By default, the mean response 'mu' is predicted. The cluster membership predictions can be obtained by specifying \code{what = 'mb'}.} + +\item{...}{Additional arguments.} } \value{ If \code{newdata} specifies the cluster membership; a \code{data.frame} of cluster-specific predictions. Otherwise, a \code{list} of \code{data.frame} of cluster-specific predictions is returned.