Commit cb746f9e authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.6.9.6 refactor: replace lapply by NextMethod to classicaly extract elements...

v1.6.9.6 refactor: replace lapply by NextMethod to classicaly extract elements with '['.InputsModel and '['.OutputsModel
Refs #67
parent 6f438158
Pipeline #18986 passed with stages
in 12 minutes and 19 seconds
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.6.9.5
Version: 1.6.9.6
Date: 2021-01-08
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -2,7 +2,7 @@
### 1.6.9.5 Release Notes (2021-01-08)
### 1.6.9.6 Release Notes (2021-01-08)
#### New features
......
......@@ -113,12 +113,10 @@
i <- as.character(i)
}
if (is.numeric(i)) {
res <- .ExtractInputsModel(x, i)
.ExtractInputsModel(x, i)
} else {
res <- lapply(i, function(name) x[[name, exact = TRUE]])
names(res) <- i
NextMethod()
}
return(res)
}
......@@ -161,10 +159,8 @@
i <- as.character(i)
}
if (is.numeric(i)) {
res <- .ExtractOutputsModel(x, i)
.ExtractOutputsModel(x, i)
} else {
res <- lapply(i, function(name) x[[name, exact = TRUE]])
names(res) <- i
NextMethod()
}
return(res)
}
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