Closed natesheehan closed 3 years ago
if (new_site) { new_mode_share_active = data.frame("northwick-park",sum(mode_split_all$walk_goactive),sum(mode_split_all$cycle_goactive),sum(mode_split_all$drive_goactive),sum(mode_split_all$other_goactive)) names(new_mode_share_active) <- c("site_name","walk_active","cycle_active","drive_active","other_active") mode_share_sites_goactive = rbind(mode_share_sites_goactive,new_mode_share_active) } else { mode_share_sites_goactive$walk_active[mode_share_sites_goactive$site_name == site_name] = sum(mode_split_all$walk_goactive) mode_share_sites_goactive$cycle_active[mode_share_sites_goactive$site_name == site_name] = sum(mode_split_all$cycle_goactive) mode_share_sites_goactive$drive_active[mode_share_sites_goactive$site_name == site_name] = sum(mode_split_all$drive_goactive) mode_share_sites_goactive$other_active[mode_share_sites_goactive$site_name == site_name] = sum(mode_split_all$other_goactive) }
This logic doesn't work for duplicated runs in the build.r script. If the new_site flag is true, it will continue to add new rows.
new_site
Will take a look at making this more resilient tomorrow.
This has now been fixed from mine and @Robinlovelace debugging session
This logic doesn't work for duplicated runs in the build.r script. If the
new_site
flag is true, it will continue to add new rows.Will take a look at making this more resilient tomorrow.