When users set an output_dir
, the function writes one .csv file with the results for each origin. However, it is common for users to repeat the same origin multiple times in the input of detailed_itineraries()
. We also provide the all_to_all = T
option so that users can easily run all-to-all analysis.
In these situations, the problem is that r5r writes one file for each origin but the file only contains the results for the 1st destination.
Expected outputThe .csv file should include the results from the origin to all destinations.
Reproducible examplelibrary(r5r) # build transport network data_path <- system.file("extdata/poa", package = "r5r") r5r_core <- setup_r5(data_path) # load origin/destination points points <- read.csv(file.path(data_path, "poa_points_of_interest.csv")) # inputs departure_datetime <- as.POSIXct( "13-05-2019 14:00:00", format = "%d-%m-%Y %H:%M:%S" ) det <- detailed_itineraries( r5r_core, origins = points, destinations = points, mode = c("WALK", "TRANSIT"), departure_datetime = departure_datetime, max_trip_duration = 30, drop_geometry = T, all_to_all = T, shortest_path = F, suboptimal_minutes = 10, output_dir = './test' ) ttm <- travel_time_matrix( r5r_core, origins = points, destinations = points, mode = c("WALK", "TRANSIT"), departure_datetime = departure_datetime, max_trip_duration = 30, output_dir = './test' )Situation report
> r5r::r5r_sitrep() $r5r_package_version [1] ‘1.0.1’ $r5_jar_version [1] "6.9" $java_version [1] "11.0.18" $set_memory [1] "-Xmx512m" $session_info R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22621) Matrix products: default locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 [3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C [5] LC_TIME=English_United States.utf8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] r5r_1.0.1 loaded via a namespace (and not attached): [1] Rcpp_1.0.9 rstudioapi_0.14 magrittr_2.0.3 units_0.8-1 [5] tidyselect_1.2.0 R6_2.5.1 rlang_1.0.6 fansi_1.0.3 [9] dplyr_1.0.10 tools_4.2.2 grid_4.2.2 checkmate_2.1.0 [13] data.table_1.14.7 KernSmooth_2.23-20 utf8_1.2.2 cli_3.6.0 [17] e1071_1.7-12 DBI_1.1.3 class_7.3-20 assertthat_0.2.1 [21] tibble_3.1.8 lifecycle_1.0.3 sf_1.0-9 rJava_1.0-6 [25] vctrs_0.5.1 glue_1.6.2 proxy_0.4-27 compiler_4.2.2 [29] pillar_1.8.1 generics_0.1.3 backports_1.4.1 classInt_0.4-8 [33] pkgconfig_2.0.3
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4