Replace NAs with 0 for bluetooth countscansmostuniquedevice
parent
3314040912
commit
5a2049f533
|
@ -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)
|
Loading…
Reference in New Issue