Replace NAs with 0 for bluetooth countscansmostuniquedevice

pull/95/head
JulioV 2020-04-27 21:55:23 +00:00
parent 3314040912
commit 5a2049f533
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
source("packrat/init.R")
library(dplyr)
library(tidyr)
filter_by_day_segment <- function(data, day_segment) {
if(day_segment %in% c("morning", "afternoon", "evening", "night"))
@ -38,4 +39,6 @@ for(requested_feature in requested_features){
features <- merge(features, feature, by="local_date", all = TRUE)
}
features <- features %>% mutate_at(vars(contains("countscansmostuniquedevice")), list( ~ replace_na(., 0)))
write.csv(features, snakemake@output[[1]], row.names = FALSE)