Skip to content

Commit 322ad07

Browse files
committed
fixed small error when dealing with auto_rickshaw distances
1 parent 606d49e commit 322ad07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

R/distances_for_injury_function.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ distances_for_injury_function <- function(journeys, dist) {
8181
if ('shared_taxi' %in% colnames(distances)) distances$shared_taxi <- distances$shared_taxi * 2
8282

8383
# multiply auto_rickshaw by 2 to add driver
84-
distances$auto_rickshaw <- distances$auto_rickshaw * 2
84+
if ('auto_rickshaw' %in% colnames(distances)) distances$auto_rickshaw <- distances$auto_rickshaw * 2
8585

8686
## add all car related distances to car distance
8787
distances$car <- rowSums(distances[, colnames(distances) %in% c("car", "taxi", "shared_auto", "shared_taxi")])

0 commit comments

Comments
 (0)