Replace NA with 0 in most frequent contact call metric

pull/95/head
JulioV 2020-03-12 11:18:32 -04:00
parent 9069cffa0e
commit ed5d938316
1 changed files with 3 additions and 0 deletions

View File

@ -60,4 +60,7 @@ for(metric in metrics){
features <- merge(features, feature, by="local_date", all = TRUE)
}
if("countmostfrequentcontact" %in% metrics)
features <- features %>% mutate_at(vars(contains('countmostfrequentcontact')), funs(ifelse(is.na(.), 0, .)))
write.csv(features, snakemake@output[[1]], row.names = FALSE)