# NOT RUN {
#getting example data
data(simulation)
data(accumulationRate)
#aggregating first simulation outcome
sim.output.aggregated <- aggregateSimulation(
simulation.output = simulation[1],
accumulation.rate = accumulationRate,
sampling.intervals = c(2,6))
#comparing simulations
par(mfrow = c(3,1))
#notice the subsetting of the given column of the input list
plot(sim.output.aggregated[[1,1]]$Time,
sim.output.aggregated[[1,1]]$Pollen,
type = "l",
xlim = c(500, 1000),
main = "Annual"
)
plot(sim.output.aggregated[[1,2]]$Time,
sim.output.aggregated[[1,2]]$Pollen,
type = "l",
xlim = c(500, 1000),
main = "2cm"
)
plot(sim.output.aggregated[[1,3]]$Time,
sim.output.aggregated[[1,3]]$Pollen,
type = "l",
xlim = c(500, 1000),
main = "6cm"
)
#check differences in nrow
nrow(sim.output.aggregated[[1,1]]) #original data
nrow(sim.output.aggregated[[1,2]]) #2cm
nrow(sim.output.aggregated[[1,3]]) #6cm intervals
# }
Run the code above in your browser using DataLab