diff --git a/R/Utils.R b/R/Utils.R index 6aa1f33f9e5dafbef3ca55578ce38f55c50765bb..0b9e988db9d59b71c90e735bc1d3e2a9c029573b 100644 --- a/R/Utils.R +++ b/R/Utils.R @@ -218,16 +218,17 @@ res } +.IndexOutputsModel <- function(x, i) { # '[.OutputsModel' <- function(x, i) { -# if (!inherits(x, "OutputsModel")) { -# stop("'x' must be of class 'OutputsModel'") -# } -# if (is.factor(i)) { -# i <- as.character(i) -# } -# if (is.numeric(i)) { -# .ExtractOutputsModel(x, i) -# } else { -# NextMethod() -# } -# } + if (!inherits(x, "OutputsModel")) { + stop("'x' must be of class 'OutputsModel'") + } + if (is.factor(i)) { + i <- as.character(i) + } + if (is.numeric(i)) { + .ExtractOutputsModel(x, i) + } else { + NextMethod() + } +}