Fix bug where location_barnett_metrics wouldn't include local_date

pull/95/head
JulioV 2020-03-05 14:48:48 -05:00 committed by GitHub
parent c2a74b1cba
commit dba2664ae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -31,6 +31,7 @@ accuracy_limit <- snakemake@params[["accuracy_limit"]]
timezone <- snakemake@params[["timezone"]]
metrics_to_include <- intersect(unlist(snakemake@params["metrics"], use.names = F),
c("hometime","disttravelled","rog","maxdiam","maxhomedist","siglocsvisited","avgflightlen","stdflightlen","avgflightdur","stdflightdur","probpause","siglocentropy","minsmissing","circdnrtn","wkenddayrtn"))
metrics_to_include <- c("local_date", metrics_to_include)
# By deafult we use all raw locations: fused without resampling and not fused (gps, network)
location <- read.csv(snakemake@input[["raw"]], stringsAsFactors = F) %>%
@ -61,4 +62,4 @@ if (nrow(location) > 1){
} else {
write_empty_file(snakemake@output[[1]], metrics_to_include)
}
}