Fix accuracy bug in barnett location features
parent
ca1821e314
commit
06bb2b9c73
|
@ -68,8 +68,12 @@ if (nrow(location) > 1){
|
|||
|
||||
location <- location %>%
|
||||
select(timestamp, latitude = double_latitude, longitude = double_longitude, altitude = double_altitude, accuracy)
|
||||
|
||||
outputMobility <- MobilityFeatures(location, ACCURACY_LIM = accuracy_limit, tz = timezone)
|
||||
if(nrow(location %>% filter(accuracy < accuracy_limit)) > 1){
|
||||
outputMobility <- MobilityFeatures(location, ACCURACY_LIM = accuracy_limit, tz = timezone)
|
||||
} else {
|
||||
print(paste("Cannot compute location features because there are no rows with an accuracy value lower than ACCURACY_LIMIT", accuracy_limit))
|
||||
outputMobility <- NULL
|
||||
}
|
||||
|
||||
if(is.null(outputMobility)){
|
||||
write_empty_file(snakemake@output[[1]], requested_features)
|
||||
|
|
Loading…
Reference in New Issue