# create data with 5 identical scenarios
p <- add_dimension(maxample("pop")[1:3, 1:3, ], nm = paste0("scen", 1:2))
str(p)
str(dimReduce(p))
# set years to same value
p[, , ] <- setYears(p[, 1, ], NULL)
str(p)
str(dimReduce(p))
# set regions to same value
p[, , ] <- setCells(p[1, , ], "GLO")
str(p)
str(dimReduce(p))
Run the code above in your browser using DataLab