I have a dataframe
Date repair
<date> <dbl>
2018-07-01 4420
2018-07-02 NA
2018-07-03 NA
2018-07-04 NA
2018-07-05 NA
Where 4420 is time in minutes. I'm trying to get this:
Date repair
<date> <dbl>
2018-07-01 1440
2018-07-02 1440
2018-07-03 1440
2018-07-04 100
2018-07-05 NA
Where 1440 - minutes in one day and 100 what is left. I made it with loop. Can this be achieved in a more elegant way?
repair = c(4420, NA, NA, 4420, NA)
? 2) Output forrepair = c(4420, 100, NA, 4420, NA)
. Is the above two inputs possible or they will never occur? – Salenarepair = c(4420, 100, NA, 4420, NA)
is possible. – Finney