We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3390ea5 commit b3fe8daCopy full SHA for b3fe8da
1 file changed
R/distances_for_injury_function.R
@@ -77,7 +77,8 @@ distances_for_injury_function <- function(journeys, dist) {
77
# if there are multiple people in the taxi apart from the driver this will increase
78
# taxi distances by too much, however taxis are also spending a significant distance
79
# driving around without passengers which is not captured in travel surveys
80
- distances$taxi <- distances$taxi * 2
+ if ('taxi' %in% colnames(distances)) distances$taxi <- distances$taxi * 2
81
+
82
if ('shared_taxi' %in% colnames(distances)) distances$shared_taxi <- distances$shared_taxi * 2
83
84
# multiply auto_rickshaw by 2 to add driver
0 commit comments