# Read simulation data from the mrangr package
simulated_com <- get_simulated_com()
# Extract one timestep, all species
r1 <- to_rast(simulated_com, time_points = 10)
# Extract multiple timesteps, one species
r2 <- to_rast(simulated_com, species = 2, time_points = c(1, 5, 10))
# Extract multiple timesteps, multiple species
r3 <- to_rast(simulated_com, species = c(1, 2), time_points = c(1, 5, 10))
Run the code above in your browser using DataLab