Readme Added

This commit is contained in:
2024-01-10 22:54:51 +01:00
parent 638ed8d666
commit 5ccd3dfee9
2 changed files with 111 additions and 3 deletions
+10 -1
View File
@@ -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")