Skip to content

Commit b3fe8da

Browse files
committed
fixed small bug
1 parent 3390ea5 commit b3fe8da

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

R/distances_for_injury_function.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ distances_for_injury_function <- function(journeys, dist) {
7777
# if there are multiple people in the taxi apart from the driver this will increase
7878
# taxi distances by too much, however taxis are also spending a significant distance
7979
# driving around without passengers which is not captured in travel surveys
80-
distances$taxi <- distances$taxi * 2
80+
if ('taxi' %in% colnames(distances)) distances$taxi <- distances$taxi * 2
81+
8182
if ('shared_taxi' %in% colnames(distances)) distances$shared_taxi <- distances$shared_taxi * 2
8283

8384
# multiply auto_rickshaw by 2 to add driver

0 commit comments

Comments
 (0)