Skip to content

Commit 380b022

Browse files
committed
fix Issue #27 with residuals() method
1 parent 652e99d commit 380b022

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

R/methods.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ residuals.FDboost <- function(object, ...){
480480

481481
if(!any(class(object)=="FDboostLong")){
482482
resid <- matrix(object$resid())
483-
resid <- matrix(resid, nrow = NROW(resid))
483+
ydim <- ifelse(is.null(object$ydim[1]), NROW(resid), object$ydim[1])
484+
resid <- matrix(resid, nrow = ydim)
484485
resid[is.na(object$response)] <- NA
485486
}else{
486487
resid <- object$resid()

0 commit comments

Comments
 (0)