r5r
r5r copied to clipboard
Error in fareto debug
@mattwigway , you pushed to the repo the function fareto_debug()
some time ago. Only now I've found some time to have a look at it and to add some documentation to the function. However, I cannot create a simple reproducible example. See the error below. Could you give me a hand? perhaps I'm missing something here.
library(r5r)
# build transport network
data_path <- system.file("extdata/poa", package = "r5r")
r5r_core <- setup_r5(data_path = data_path, overwrite = T)
# load origin/destination points
points <- read.csv(file.path(data_path, "poa_hexgrid.csv"))[1:5,]
# load fare structure object
fare_structure_path <- system.file("extdata/poa/fares/fares_poa.zip", package = "r5r")
fare_structure <- read_fare_structure(fare_structure_path)
departure_datetime <- as.POSIXct(
"13-05-2019 14:00:00",
format = "%d-%m-%Y %H:%M:%S"
)
# fareto debug
fd <- fareto_debug(
r5r_core,
origins = points[1,],
destinations = points[10,],
mode = c("WALK", "TRANSIT"),
departure_datetime = departure_datetime,
fare_structure = fare_structure
)
Error in FUN(X[[i]], ...) : java.lang.NullPointerException: Cannot read field "value" because "original" is null