Skip to content

Commit 2dd23a7

Browse files
authored
Merge pull request #28 from LucasKook/master
Fixing issue #27
2 parents 6c172c5 + 380b022 commit 2dd23a7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

R/methods.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,9 @@ fitted.FDboost <- function(object, toFDboost = TRUE, ...) {
479479
residuals.FDboost <- function(object, ...){
480480

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

0 commit comments

Comments
 (0)