Skip to content

Commit

Permalink
analyses: ignored_patches: improve fill_missing_weeks util
Browse files Browse the repository at this point in the history
Signed-off-by: Ralf Ramsauer <[email protected]>
  • Loading branch information
rralf committed Jun 9, 2021
1 parent 9bff1c9 commit eba830f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion analyses/ignored_patches.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ fillup_missing_weeks <- function(data, key) {

missing.weeks <- !(all.weeks %in% data$week)
if (any(missing.weeks)) {
return(rbind(data, data.frame(week=all.weeks[missing.weeks], total=0)))
frame <- data.frame(week = all.weeks[missing.weeks], col = 0)
colnames(frame) <- colnames(data)

return(rbind(data, frame))
}
return (data)
}
Expand Down

0 comments on commit eba830f

Please sign in to comment.