Commit edc63ad9 authored by Nicolau Manubens's avatar Nicolau Manubens
Browse files

Solving bug with nested environments.

parent 79bb9d6b
Pipeline #928 canceled with stage
......@@ -1357,6 +1357,22 @@ test_that("Dimension names are propagated correctly.", {
f)
})
# Test nested environments are linked properly
test_that("Nested environments are linked properly.", {
#create input
forecast <- array(dim = c('31', '12', '4'),
rnorm(31 * 12 * 4))
names(dim(forecast)) <- c('sday', 'syear', 'ensemble')
anomaly_simple <- function(data) {
avg <- Apply(data, c('syear', 'ensemble'), mean)[[1]]
anom <- Apply(data, c('sday'), function(x) x - avg)[[1]]
return(anom)
}
anomaly <- anomaly_simple(forecast)
})
# TODOS:
# TESTS FOR MARGINS
# TESTS FOR DISORDERED TARGET_DIMS
......
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