Readme Added
This commit is contained in:
+10
-1
@@ -1,4 +1,13 @@
|
||||
# Read the data
|
||||
df <- read.csv('cleaned.csv')
|
||||
start_milage = min(df$Km_End)
|
||||
|
||||
# Calculate the amount of km driven per row
|
||||
df$diff <- c(0, diff(df$Km_End))
|
||||
|
||||
# Calculate the sum of driven km per driver
|
||||
by(df$diff,df$FahrerIn, sum)
|
||||
|
||||
# Calculate the usages of driven km per driver
|
||||
by(df$diff,df$FahrerIn, length)
|
||||
|
||||
write.csv(df, file="cleaned_with_difference.csv")
|
||||
Reference in New Issue
Block a user