Commit 28f7ed14 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

feat(Utils): add a .IndexOutputs function to index OutputsModel objects

- to be replaced by '[.OutputsModel' in airGR 2.0
Refs # 122
parent a508fbcf
Pipeline #22921 passed with stages
in 10 minutes and 24 seconds
......@@ -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()
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment