distances <- french_cities_distances[1:10, 1:10] / 1000 ## convert to km
production <- rep(1, 10)
attractiveness <- log(french_cities$area[1:10])
all_flows <- grid_blvim(distances, production, seq(1.05, 1.45, by = 0.2),
seq(1, 3, by = 0.5) / 400,
attractiveness,
bipartite = FALSE,
epsilon = 0.1, iter_max = 1000,
)
all_flows_df <- sim_df(all_flows)
## the models as a sim_list
all_flows_df[, "sim"]
## sub data frame, a sim_df
all_flows_df[1:5, ]
## sub data frame, not a sim_df (alpha is missing)
all_flows_df[6:10, 2:6]
all_flows_2 <- grid_blvim(distances, log(french_cities$population[1:10]),
seq(1.05, 1.45, by = 0.2),
seq(1, 3, by = 0.5) / 400,
attractiveness,
bipartite = FALSE,
epsilon = 0.1, iter_max = 1000,
)
## replace the sim_list column by the new models
## before
all_flows_df$diversity
all_flows_df$sim <- all_flows_2
## after (all core columns have been updated)
all_flows_df$diversity
Run the code above in your browser using DataLab